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

#   Custom fields by product in checkout

##

- **[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
-
-

15 years 6 months ago [\#14527](#14527) by [momentis](/forum/user/364-momentis "View momentis's Profile")  Replied by *[momentis](/forum/user/364-momentis "View momentis's Profile")* on topic *[Re: Custom fields by product in checkout](/forum/4-how-to/14363-custom-fields-by-product-in-checkout?start=20#14527 "Okay, nicolas, here's a tough one!!  When users add a product into the shopping cart, I want to be able to give them 4 fields to enter in data, pertaining to that product, and submit with the order. To clarify, a user enters ProductA, ProductB and ProductC into the cart. I would like them to be able to enter, should they wish, information in four fields (FieldA, FieldB, FieldC, FieldD).  Is this possible? I can create custom product fields, but these are used for entry in the back-end. These fields would just be textboxes for my purposes. I cannot use the Characteristics, because this forces a drop-down, and I need free-entry textboxes.  Is this possible at all in the shop or checkout process?")*

FYI - the front-end Product-&gt; show view is version 1.4.9

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

15 years 6 months ago [\#14528](#14528) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Custom fields by product in checkout](/forum/4-how-to/14363-custom-fields-by-product-in-checkout?start=20#14528 "Okay, nicolas, here's a tough one!!  When users add a product into the shopping cart, I want to be able to give them 4 fields to enter in data, pertaining to that product, and submit with the order. To clarify, a user enters ProductA, ProductB and ProductC into the cart. I would like them to be able to enter, should they wish, information in four fields (FieldA, FieldB, FieldC, FieldD).  Is this possible? I can create custom product fields, but these are used for entry in the back-end. These fields would just be textboxes for my purposes. I cannot use the Characteristics, because this forces a drop-down, and I need free-entry textboxes.  Is this possible at all in the shop or checkout process?")*

You custom field is fine. What about the product edition page ?

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

15 years 6 months ago [\#14530](#14530) by [momentis](/forum/user/364-momentis "View momentis's Profile")  Replied by *[momentis](/forum/user/364-momentis "View momentis's Profile")* on topic *[Re: Custom fields by product in checkout](/forum/4-how-to/14363-custom-fields-by-product-in-checkout?start=20#14530 "Okay, nicolas, here's a tough one!!  When users add a product into the shopping cart, I want to be able to give them 4 fields to enter in data, pertaining to that product, and submit with the order. To clarify, a user enters ProductA, ProductB and ProductC into the cart. I would like them to be able to enter, should they wish, information in four fields (FieldA, FieldB, FieldC, FieldD).  Is this possible? I can create custom product fields, but these are used for entry in the back-end. These fields would just be textboxes for my purposes. I cannot use the Characteristics, because this forces a drop-down, and I need free-entry textboxes.  Is this possible at all in the shop or checkout process?")*

What is the product edition page?

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

15 years 6 months ago [\#14533](#14533) by [momentis](/forum/user/364-momentis "View momentis's Profile")  Replied by *[momentis](/forum/user/364-momentis "View momentis's Profile")* on topic *[Re: Custom fields by product in checkout](/forum/4-how-to/14363-custom-fields-by-product-in-checkout?start=20#14533 "Okay, nicolas, here's a tough one!!  When users add a product into the shopping cart, I want to be able to give them 4 fields to enter in data, pertaining to that product, and submit with the order. To clarify, a user enters ProductA, ProductB and ProductC into the cart. I would like them to be able to enter, should they wish, information in four fields (FieldA, FieldB, FieldC, FieldD).  Is this possible? I can create custom product fields, but these are used for entry in the back-end. These fields would just be textboxes for my purposes. I cannot use the Characteristics, because this forces a drop-down, and I need free-entry textboxes.  Is this possible at all in the shop or checkout process?")*

It appears to have something to do with the way the field was populated. When I added the field, I used a sql query in phpMyAdmin to populate the field. This appears to be what caused the problem, because if I add another field and populate the value in the back-end product page, the display works as expected.

So, if I am going to populate this when I upload products I just need to ensure the data is written correctly into the #__hikashop_product table.

Sorry for the inconvenience!!!

Rick

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

15 years 6 months ago -  15 years 6 months ago [\#14536](#14536) by [momentis](/forum/user/364-momentis "View momentis's Profile")  Replied by *[momentis](/forum/user/364-momentis "View momentis's Profile")* on topic *[Re: Custom fields by product in checkout](/forum/4-how-to/14363-custom-fields-by-product-in-checkout?start=20#14536 "Okay, nicolas, here's a tough one!!  When users add a product into the shopping cart, I want to be able to give them 4 fields to enter in data, pertaining to that product, and submit with the order. To clarify, a user enters ProductA, ProductB and ProductC into the cart. I would like them to be able to enter, should they wish, information in four fields (FieldA, FieldB, FieldC, FieldD).  Is this possible? I can create custom product fields, but these are used for entry in the back-end. These fields would just be textboxes for my purposes. I cannot use the Characteristics, because this forces a drop-down, and I need free-entry textboxes.  Is this possible at all in the shop or checkout process?")*

AHA!!! I think I may have found something!!

Everything works as expected on the products that do not contain Characteristics. Products that display a Characteristic are ALWAYS displaying the extra fields, and the value of the "show_fields" field is always showing Y.

For products that do not have Characteristics, the custom Item fields are suppressed as I would expect.

If you want access to the front or back-end to see this in action, let me know!!

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

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

15 years 6 months ago [\#14537](#14537) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Custom fields by product in checkout](/forum/4-how-to/14363-custom-fields-by-product-in-checkout?start=20#14537 "Okay, nicolas, here's a tough one!!  When users add a product into the shopping cart, I want to be able to give them 4 fields to enter in data, pertaining to that product, and submit with the order. To clarify, a user enters ProductA, ProductB and ProductC into the cart. I would like them to be able to enter, should they wish, information in four fields (FieldA, FieldB, FieldC, FieldD).  Is this possible? I can create custom product fields, but these are used for entry in the back-end. These fields would just be textboxes for my purposes. I cannot use the Characteristics, because this forces a drop-down, and I need free-entry textboxes.  Is this possible at all in the shop or checkout process?")*

You said that you set your field via a mysql query. When you use characteristics for a product, hikashop will create automatically a variant per combination of thes values of the characteristics. That allows you to set specific information for some values like for example to change the price.
These variants are also saved in the product table. Also, when you have a product with a variant, if there is data in the variant field, the variant field is used instead of the main product field.
So I suppose that all the variants of your product have the field with Y. Which means that whatever the value of the main product, the value of the variant displayed will be used.
It's the normal behaviour.
The problem is your query. You should only set your field when the value "main" is in the "product_type" field of the product table.

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

15 years 6 months ago [\#14539](#14539) by [momentis](/forum/user/364-momentis "View momentis's Profile")  Replied by *[momentis](/forum/user/364-momentis "View momentis's Profile")* on topic *[Re: Custom fields by product in checkout](/forum/4-how-to/14363-custom-fields-by-product-in-checkout?start=20#14539 "Okay, nicolas, here's a tough one!!  When users add a product into the shopping cart, I want to be able to give them 4 fields to enter in data, pertaining to that product, and submit with the order. To clarify, a user enters ProductA, ProductB and ProductC into the cart. I would like them to be able to enter, should they wish, information in four fields (FieldA, FieldB, FieldC, FieldD).  Is this possible? I can create custom product fields, but these are used for entry in the back-end. These fields would just be textboxes for my purposes. I cannot use the Characteristics, because this forces a drop-down, and I need free-entry textboxes.  Is this possible at all in the shop or checkout process?")*

I am sorry for my lack of understanding on this, but I am still confused.

In the simplest terms, how can I set up the custom Product field to only display the Item fields based on this Product field? Assuming some of my products have variants, how can I do this?

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

15 years 6 months ago [\#14540](#14540) by [momentis](/forum/user/364-momentis "View momentis's Profile")  Replied by *[momentis](/forum/user/364-momentis "View momentis's Profile")* on topic *[Re: Custom fields by product in checkout](/forum/4-how-to/14363-custom-fields-by-product-in-checkout?start=20#14540 "Okay, nicolas, here's a tough one!!  When users add a product into the shopping cart, I want to be able to give them 4 fields to enter in data, pertaining to that product, and submit with the order. To clarify, a user enters ProductA, ProductB and ProductC into the cart. I would like them to be able to enter, should they wish, information in four fields (FieldA, FieldB, FieldC, FieldD).  Is this possible? I can create custom product fields, but these are used for entry in the back-end. These fields would just be textboxes for my purposes. I cannot use the Characteristics, because this forces a drop-down, and I need free-entry textboxes.  Is this possible at all in the shop or checkout process?")*

Finally, I see the light!!!

Looking at the table again, I just realized what you were saying - when there are variants the product table is populated with additional products for each variant. My query was setting a value for ALL products, including the variant "products". Once I deleted the values from all of the variant "products", it started working perfectly.

Again, sorry it took me SO long to understand the problem!!!!!! :blush: :blush: :blush:

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

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