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

#   Display product custom field on Order

##

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

Less More

- Posts: 100
- Thank you received: 1
-
-

12 years 5 months ago -  12 years 5 months ago [\#162203](#162203) by [paddyrolls](/forum/user/1931-paddyrolls "View paddyrolls's Profile")  *[Display product custom field on Order](/forum/25-install-update/869352-display-product-custom-field-on-order#162203 "-- HikaShop version -- : 2.3.1 -- Joomla version -- : 3x -- PHP version -- : x5x  Hi  I would like to display the custom field for table &quot;product&quot; on the Order View and Files - show and listing.  In the Show file, I have used the below to get the product details..  get($product-&gt;product&#95;id); ?&gt;  I use echo $data-&gt;FIELD&#95;COLUMN&#95;NAME;  However I would like to retrieve the custom field &quot;Title&quot; instead of the Value.  If I use the below, it gives all the custom field value but not related to the item in the order.  $fieldsClass = hikashop&#95;get('class.field'); $fields = $fieldsClass-&gt;getFields('frontcomp',$this-&gt;row,'product','checkout&amp;task=state');  Could you advise how I can retrieve the custom fields related to the product on the order only.  Thanks  Patrick")* was created by *[paddyrolls](/forum/user/1931-paddyrolls "View paddyrolls's Profile")*

-- HikaShop version -- : 2.3.1
-- Joomla version -- : 3x
-- PHP version -- : x5x

Hi

I would like to display the custom field for table "product" on the Order View and Files - show and listing.

In the Show file, I have used the below to get the product details..

&lt;?php $productclass = hikashop_get('class.product'); $data = $productclass-&gt;get($product-&gt;product_id); ?&gt;

I use echo $data-&gt;FIELD_COLUMN_NAME;

**However I would like to retrieve the custom field "Title" instead of the Value.**

If I use the below, it gives all the custom field value but not related to the item in the order.

$fieldsClass = hikashop_get('class.field');
$fields = $fieldsClass-&gt;getFields('frontcomp',$this-&gt;row,'product','checkout&amp;task=state');

Could you advise how I can retrieve the custom fields related to the product on the order only.

Thanks

Patrick

Last edit: 12 years 5 months ago by [paddyrolls](/forum/user/1931-paddyrolls "View paddyrolls's Profile").

The following user(s) said Thank You: [pepecortez](/forum/user/31475-pepecortez "View pepecortez's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzg2OTM1Mi1kaXNwbGF5LXByb2R1Y3QtY3VzdG9tLWZpZWxkLW9uLW9yZGVyP3RtcGw9bWFya2Rvd24=) 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: 86592
- Thank you received: 14329
-
-

12 years 5 months ago [\#162216](#162216) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Display product custom field on Order](/forum/25-install-update/869352-display-product-custom-field-on-order#162216 "-- HikaShop version -- : 2.3.1 -- Joomla version -- : 3x -- PHP version -- : x5x  Hi  I would like to display the custom field for table &quot;product&quot; on the Order View and Files - show and listing.  In the Show file, I have used the below to get the product details..  get($product-&gt;product&#95;id); ?&gt;  I use echo $data-&gt;FIELD&#95;COLUMN&#95;NAME;  However I would like to retrieve the custom field &quot;Title&quot; instead of the Value.  If I use the below, it gives all the custom field value but not related to the item in the order.  $fieldsClass = hikashop&#95;get('class.field'); $fields = $fieldsClass-&gt;getFields('frontcomp',$this-&gt;row,'product','checkout&amp;task=state');  Could you advise how I can retrieve the custom fields related to the product on the order only.  Thanks  Patrick")*

Hi,

You're almost there.
You need to do like that after the two pieces of code you gave : Code:

echo $fieldsClass-&gt;show($fields['FIELD_COLUMN_NAME'],$data-&gt;FIELD_COLUMN_NAME);

Of course, it goes without saying that the FIELD_COLUMN_NAME need to be replaced by the column name of the field ![:)](/media/kunena/emoticons/3.png ":)")

The following user(s) said Thank You: [pepecortez](/forum/user/31475-pepecortez "View pepecortez's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzg2OTM1Mi1kaXNwbGF5LXByb2R1Y3QtY3VzdG9tLWZpZWxkLW9uLW9yZGVyP3RtcGw9bWFya2Rvd24=) 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.044 seconds

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