[Skip to main content](#vessel-content)

#   Custom Field Duplicated

##

- **[davec](/forum/user/7092-davec "View davec's Profile")**
- [![davec's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/7092-davec "View davec's Profile") Topic Author
- [ Offline](/forum/user/7092-davec)

Less More

- Posts: 447
- Thank you received: 20
-
-

5 years 8 months ago [\#330036](#330036) by [davec](/forum/user/7092-davec "View davec's Profile")  *[Custom Field Duplicated](/forum/35-orders-management/902023-custom-field-duplicated#330036 "-- HikaShop version -- : 4.4.0 -- Joomla version -- : 3.9.24  Hi  I added some custom code to user / cpanel&#95;orders.php ref  This works perfectly but it is displaying the information twice as per screenhot. Is there a way so this only displays once.  Thanks  David")* was created by *[davec](/forum/user/7092-davec "View davec's Profile")*

-- HikaShop version -- : 4.4.0
-- Joomla version -- : 3.9.24

Hi

I added some custom code to user / cpanel_orders.php ref [ this post](https://www.hikashop.com/forum/orders-management/899611-adding-a-product-custom-field-to-account-page.html)
Code:

&lt;p&gt; &lt;b&gt;ETA:&lt;/b&gt; &lt;?php $class = hikashop_get('class.product'); $data = $class-&gt;get($product-&gt;product_id); echo $data-&gt;eta; ?&gt; &lt;/p&gt;

This works perfectly but it is displaying the information twice as per screenhot. Is there a way so this only displays once.

Thanks

David

- [ ![Screenshot&#95;2021-02-25Order10090481.png](/forum/attachment/52070) ](/forum/attachment/52070 "...er10090481.png") [ ](/forum/attachment/52070?download=1 "...er10090481.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50LzkwMjAyMy1jdXN0b20tZmllbGQtZHVwbGljYXRlZD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86583
- Thank you received: 14324
-
-

5 years 8 months ago [\#330044](#330044) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Custom Field Duplicated](/forum/35-orders-management/902023-custom-field-duplicated#330044 "-- HikaShop version -- : 4.4.0 -- Joomla version -- : 3.9.24  Hi  I added some custom code to user / cpanel&#95;orders.php ref  This works perfectly but it is displaying the information twice as per screenhot. Is there a way so this only displays once.  Thanks  David")*

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50LzkwMjAyMy1jdXN0b20tZmllbGQtZHVwbGljYXRlZD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[davec](/forum/user/7092-davec "View davec's Profile")**
- [![davec's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/7092-davec "View davec's Profile") Topic Author
- [ Offline](/forum/user/7092-davec)

Less More

- Posts: 447
- Thank you received: 20
-
-

5 years 8 months ago [\#330074](#330074) by [davec](/forum/user/7092-davec "View davec's Profile")  Replied by *[davec](/forum/user/7092-davec "View davec's Profile")* on topic *[Custom Field Duplicated](/forum/35-orders-management/902023-custom-field-duplicated#330074 "-- HikaShop version -- : 4.4.0 -- Joomla version -- : 3.9.24  Hi  I added some custom code to user / cpanel&#95;orders.php ref  This works perfectly but it is displaying the information twice as per screenhot. Is there a way so this only displays once.  Thanks  David")*

Hi

Sorry I attached the wrong screenshot.

It is a product custom field This message contains confidential information

which displays on the product page.
Code:

&lt;p class="hika_cpanel_product_price"&gt; &lt;span class="hika_cpanel_product_price_quantity"&gt; &lt;?php echo $product-&gt;order_product_quantity; ?&gt; &lt;/span&gt; &lt;span class="hika_cpanel_product_price_times"&gt; x &lt;/span&gt; &lt;span class="hika_cpanel_product_price_amount"&gt; &lt;?php echo $this-&gt;currencyClass-&gt;format( $product-&gt;order_product_price + $product-&gt;order_product_tax, $order-&gt;order_currency_id ); ?&gt; &lt;/span&gt; &lt;/p&gt; &lt;?php if(!empty($product-&gt;extraData)) echo '&lt;p class="hikashop_order_product_extra"&gt;' . (is_string($product-&gt;extraData) ? $product-&gt;extraData : implode('&lt;br/&gt;', $product-&gt;extraData)) . '&lt;/p&gt;'; ?&gt;&lt;br /&gt;&lt;p&gt; &lt;b&gt;ETA:&lt;/b&gt; &lt;?php $class = hikashop_get('class.product'); $data = $class-&gt;get($product-&gt;product_id); echo $data-&gt;eta; ?&gt; &lt;/p&gt; &lt;div style="clear:both;"&gt;&lt;/div&gt;

The code was added at around line 199.

Thanks

David

- [ ![Screenshot&#95;2021-02-26.png](/forum/attachment/52074) ](/forum/attachment/52074 "...2021-02-26.png") [ ](/forum/attachment/52074?download=1 "...2021-02-26.png")
- [ ![cp-orders.png](/forum/attachment/52075) ](/forum/attachment/52075 "cp-orders.png") [ ](/forum/attachment/52075?download=1 "cp-orders.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50LzkwMjAyMy1jdXN0b20tZmllbGQtZHVwbGljYXRlZD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86583
- Thank you received: 14324
-
-

5 years 8 months ago [\#330077](#330077) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Custom Field Duplicated](/forum/35-orders-management/902023-custom-field-duplicated#330077 "-- HikaShop version -- : 4.4.0 -- Joomla version -- : 3.9.24  Hi  I added some custom code to user / cpanel&#95;orders.php ref  This works perfectly but it is displaying the information twice as per screenhot. Is there a way so this only displays once.  Thanks  David")*

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.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50LzkwMjAyMy1jdXN0b20tZmllbGQtZHVwbGljYXRlZD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.056 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
