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

#   Use custom fields in separate columns in cart

##

- **[momentis](/forum/user/364-momentis "View momentis's Profile")**
- [![momentis's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar364.jpg)](/forum/user/364-momentis "View momentis's Profile") Topic Author
- [ Offline](/forum/user/364-momentis)

Less More

- Posts: 202
- Thank you received: 2
-
-

13 years 6 months ago [\#103265](#103265) by [momentis](/forum/user/364-momentis "View momentis's Profile")  *[Use custom fields in separate columns in cart](/forum/2-general-talk-about-hikashop/81648-use-custom-fields-in-separate-columns-in-cart#103265 "I am using custom fields to pass information to the cart from an add-to-cart URL. The fields are an ID and a Description, using custom fields of the type &quot;Item&quot;.  By default, the custom fields are displayed below the product name, like this image:  I would like to change the Cart layout so that each custom field has its own column, like this:  Because of the unique nature of how I am using the shop, these two fields will always exist and they will be the only fields needed in the cart. Is this possible?")* was created by *[momentis](/forum/user/364-momentis "View momentis's Profile")*

I am using custom fields to pass information to the cart from an add-to-cart URL. The fields are an ID and a Description, using custom fields of the type "Item".

By default, the custom fields are displayed below the product name, like this image:
[ ![current-cart.jpg](/forum/attachment/10069) ](/forum/attachment/10069 "current-cart.jpg")

I would like to change the Cart layout so that each custom field has its own column, like this:
[ ![desired-cart.jpg](/forum/attachment/10070) ](/forum/attachment/10070 "desired-cart.jpg")

Because of the unique nature of how I am using the shop, these two fields will always exist and they will be the only fields needed in the cart. Is this possible?

- [ ![current-cart.jpg](/forum/attachment/10069) ](/forum/attachment/10069 "current-cart.jpg") [ ](/forum/attachment/10069?download=1 "current-cart.jpg")
- [ ![desired-cart.jpg](/forum/attachment/10070) ](/forum/attachment/10070 "desired-cart.jpg") [ ](/forum/attachment/10070?download=1 "desired-cart.jpg")

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26400
- Thank you received: 4080
-
- [](http://obsi.dev)
-

13 years 6 months ago [\#103281](#103281) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Use custom fields in separate columns in cart](/forum/2-general-talk-about-hikashop/81648-use-custom-fields-in-separate-columns-in-cart#103281 "I am using custom fields to pass information to the cart from an add-to-cart URL. The fields are an ID and a Description, using custom fields of the type &quot;Item&quot;.  By default, the custom fields are displayed below the product name, like this image:  I would like to change the Cart layout so that each custom field has its own column, like this:  Because of the unique nature of how I am using the shop, these two fields will always exist and they will be the only fields needed in the cart. Is this possible?")*

Hi,

You have to edit the view "product &#124; show_block_custom_item" (for item custom fields) or "product &#124; show_block_custom_main" (for product custom fields).

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

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

- **[momentis](/forum/user/364-momentis "View momentis's Profile")**
- [![momentis's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar364.jpg)](/forum/user/364-momentis "View momentis's Profile") Topic Author
- [ Offline](/forum/user/364-momentis)

Less More

- Posts: 202
- Thank you received: 2
-
-

13 years 6 months ago -  13 years 6 months ago [\#103296](#103296) by [momentis](/forum/user/364-momentis "View momentis's Profile")  Replied by *[momentis](/forum/user/364-momentis "View momentis's Profile")* on topic *[Use custom fields in separate columns in cart](/forum/2-general-talk-about-hikashop/81648-use-custom-fields-in-separate-columns-in-cart#103296 "I am using custom fields to pass information to the cart from an add-to-cart URL. The fields are an ID and a Description, using custom fields of the type &quot;Item&quot;.  By default, the custom fields are displayed below the product name, like this image:  I would like to change the Cart layout so that each custom field has its own column, like this:  Because of the unique nature of how I am using the shop, these two fields will always exist and they will be the only fields needed in the cart. Is this possible?")*

The views you pointed me to do not seem to contain the code I am looking for. It is in the cart during the checkout process, and those files do not seem to be what I need. I can affect changes to the screen by editing the "Cart" file in "Checkout" view. In that code I can see where it is pulling the custom fields. I just don't know how to change the file to meet my needs.

Thanks for the help so far, though!!!

Last edit: 13 years 6 months ago by [momentis](/forum/user/364-momentis "View momentis's Profile").

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26400
- Thank you received: 4080
-
- [](http://obsi.dev)
-

13 years 6 months ago [\#103319](#103319) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Use custom fields in separate columns in cart](/forum/2-general-talk-about-hikashop/81648-use-custom-fields-in-separate-columns-in-cart#103319 "I am using custom fields to pass information to the cart from an add-to-cart URL. The fields are an ID and a Description, using custom fields of the type &quot;Item&quot;.  By default, the custom fields are displayed below the product name, like this image:  I would like to change the Cart layout so that each custom field has its own column, like this:  Because of the unique nature of how I am using the shop, these two fields will always exist and they will be the only fields needed in the cart. Is this possible?")*

Hi,

The "checkout &#124; cart" view does not display the product custom fields but you can add the code to display them.
The "item custom fields" are loaded and displayed in the view using this code: Code:

foreach($this-&gt;extraFields['item'] as $field){ $namekey = $field-&gt;field_namekey; if(empty($row-&gt;$namekey)) continue; echo '&lt;p class="hikashop_cart_item_'.$namekey.'"&gt;'.$this-&gt;fieldsClass-&gt;getFieldName($field).': '.$this-&gt;fieldsClass-&gt;show($field,$row-&gt;$namekey).'&lt;/p&gt;'; }

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

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

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