-- HikaShop version -- : 3.1.1
-- Joomla version -- : 3.7.1
-- PHP version -- : 7.1.2
-- Browser(s) name and version -- : chrome/safari latest on mac
-- Error-message(debug-mod must be tuned on) -- : no error
I have a customised view (which is working fine on a live hikashop 2.x site).
In this view I am automatically setting a variant's value via a Javascript call (depending on where the user is in the site).
Basically, I use the following logic:-
1. I check to see if the page is in the section of the site where I need to set the variant.
2. If it is:-
I get the specific characteristic element (hikashop_product_characteristic_5)
var SetFragrance = document.getElementById("hikashop_product_characteristic_5");
I get the specific characteristic container and hide it (as I'm setting it automatically)
I set the variant using:-
SetFragrance.value = the_characteristic_option_id;
And then call hikashopupdatevariant with the SetFragrance option
hikashopUpdateVariant(SetFragrance);
I have checked and double checked my logic (which is working on 2.5) but when I click the Add to Cart button the variant is not set, and it adds the product with the last variant option in the list.
I've convinced myself that there has been a change in the way that the Hikashop add to cart code works!
Any help or pointers you can provide would be useful! Have shared the front end URL in private - happy to provide back end access.
Thanks!