Restrict custom field to product variant

  • Posts: 181
  • Thank you received: 3
  • Hikaserial Standard Hikashop Business
4 days 6 hours ago #366496

Hello, i need to show custom field only on special product variant, not just for whole product, but for one or couple of variants. How to do that?

Please Log in or Create an account to join the conversation.

  • Posts: 83568
  • Thank you received: 13522
  • MODERATOR
4 days 3 hours ago #366498

Hi,

If you have a custom field of the table "product" and you configure different values for it in different variants of the product in the backend, the system will automatically refresh the displayed value of that custom field on the frontend when you change the variant.

If you're talking about a custom field of the table "item", which you want to be available only for some variants of the product, there is no option to do that. Now, it's not impossible, but it requires to add some custom code. Here is a subject where someone else did it :
www.hikashop.com/forum/product-category-...characteristics.html

Please Log in or Create an account to join the conversation.

  • Posts: 181
  • Thank you received: 3
  • Hikaserial Standard Hikashop Business
3 days 11 hours ago #366512

My custom field is in table "order"

Please Log in or Create an account to join the conversation.

  • Posts: 83568
  • Thank you received: 13522
  • MODERATOR
3 days 7 hours ago #366513

Hi,

For a custom field of the table "order", you'll want to customize the file checkout / show_block_fields via the menu Display>Views.
There, you'll want to take into account the product objects in $cart->products to skip or not the display of the fields.

Please Log in or Create an account to join the conversation.

Time to create page: 0.056 seconds
Powered by Kunena Forum