- Posts: 447
- Thank you received: 20
Custom Field Duplicated
5 years 7 months ago #330036
by davec
Custom Field Duplicated was created by davec
-- HikaShop version -- : 4.4.0
-- Joomla version -- : 3.9.24
Hi
I added some custom code to user / cpanel_orders.php ref this post
This works perfectly but it is displaying the information twice as per screenhot. Is there a way so this only displays once.
Thanks
David
-- Joomla version -- : 3.9.24
Hi
I added some custom code to user / cpanel_orders.php ref this post
Code:
<p>
<b>ETA:</b> <?php $class = hikashop_get('class.product');
$data = $class->get($product->product_id);
echo $data->eta; ?>
</p>
This works perfectly but it is displaying the information twice as per screenhot. Is there a way so this only displays once.
Thanks
David
Please Log in or Create an account to join the conversation.
5 years 7 months ago #330044
by nicolas
Replied by nicolas on topic Custom Field Duplicated
Hi,
There is no text "ETA:" in your screenshot.
So as far as I understand, your code is not run at all or you didn't provide the correct screenshot.
Also, it would help that you tell us where you added your code in the cpnal_orders.php file
There is no text "ETA:" in your screenshot.
So as far as I understand, your code is not run at all or you didn't provide the correct screenshot.
Also, it would help that you tell us where you added your code in the cpnal_orders.php file
Please Log in or Create an account to join the conversation.
5 years 7 months ago #330074
by davec
Replied by davec on topic Custom Field Duplicated
Hi
Sorry I attached the wrong screenshot.
It is a product custom field
The code was added at around line 199.
Thanks
David
Sorry I attached the wrong screenshot.
It is a product custom field
This message contains confidential information
which displays on the product page.Code:
<p class="hika_cpanel_product_price">
<span class="hika_cpanel_product_price_quantity">
<?php echo $product->order_product_quantity; ?>
</span>
<span class="hika_cpanel_product_price_times"> x
</span>
<span class="hika_cpanel_product_price_amount">
<?php echo $this->currencyClass->format( $product->order_product_price + $product->order_product_tax, $order->order_currency_id ); ?>
</span>
</p>
<?php
if(!empty($product->extraData))
echo '<p class="hikashop_order_product_extra">' . (is_string($product->extraData) ? $product->extraData : implode('<br/>', $product->extraData)) . '</p>';
?><br /><p>
<b>ETA:</b> <?php $class = hikashop_get('class.product');
$data = $class->get($product->product_id);
echo $data->eta; ?>
</p>
<div style="clear:both;"></div>
The code was added at around line 199.
Thanks
David
Please Log in or Create an account to join the conversation.
5 years 7 months ago #330077
by nicolas
Replied by nicolas on topic Custom Field Duplicated
Hi,
I don't think that the code you provided corresponds to the display on your screenshot.
You've added the code in the area displaying the listing of products of cpanel_orders.
But your screenshot doesn't contain that area. It only contains the "additional information" area which normally appear on the order / show.php view file.
So I can only think that you've added that code at another place, or again, the screenshot is not the correct one.
I suppose that's also why you're getting confused as to why it doesn't do what you want.
I don't think that the code you provided corresponds to the display on your screenshot.
You've added the code in the area displaying the listing of products of cpanel_orders.
But your screenshot doesn't contain that area. It only contains the "additional information" area which normally appear on the order / show.php view file.
So I can only think that you've added that code at another place, or again, the screenshot is not the correct one.
I suppose that's also why you're getting confused as to why it doesn't do what you want.
Please Log in or Create an account to join the conversation.
Time to create page: 0.174 seconds