display limited to with product option

  • Posts: 503
  • Thank you received: 21
  • Hikashop Business
1 year 5 months ago #344507

-- HikaShop version -- : 4.6.1
-- Joomla version -- : 3.10.11
-- PHP version -- : 7.4

Hi,

Would it be possible to have the "display limited to" option in the custom fields section be selected by product options too, instead of only by other custom fields?
It would make many things much easier, f.e. to show some extra info just for a specific product with selected options.

Attachments:

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

  • Posts: 81118
  • Thank you received: 12980
  • MODERATOR
1 year 5 months ago #344509

Hi,

It's difficult to do with the "display limited to" as the mechanism has never been made to be able to handle options.
It would require heavy work to handle everything because it has implications server-side to allow or not the add to cart when the custom item field is required but hidden by the "display limited to".

If you just want to hide/display a custom item field on the product page, without taking into account the "required" setting, you should be able to do it with a bit of javascript added to the product page.
Here is an example of this done for a characteristic dropdown and a custom item field:
www.hikashop.com/support/forum/product-c...characteristics.html
For options, hkAfterUpdateVariant needs to be replaced by hkContentChanged and XXX by the id of the option dropdown.

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

  • Posts: 503
  • Thank you received: 21
  • Hikashop Business
1 year 5 months ago #344579

Hi,

Well this works fine for me, thanks!

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

Time to create page: 0.056 seconds
Powered by Kunena Forum