Good morning, I'm trying to make it possible to select a child variant from the category view and add it to the cart without redirecting to the product page. At first I thought it was a problem with my template but with VMBeez3, which is the one used in demo.virtuemart, it still doesn't work. Any ideas?
I would also need it to work on any template.
Demo link : https://www.fitorequip.cat/prova-llista.html
I'm using Virtuemart 3.8.6 and Joomla 3.9.22
Thanks in advance!
UPDATE : Now it don't redirect, but no changes in product and no add to cart button....
Strange update, You do not tell us what You have done...
Turn off cache and cache plugins perhaps, check for JS errors in console ?
Jörgen @ Kreativ Fotografi
I seem to remember that you cannot select a child variant from the category page as in order to add the variant to the cart it has first to be loaded to replace the parent - that cannot be done. The child is therefore loaded in its product details page.
correct Jenks, it is a separate product so the dropdown is as u say simply loading the "different" product -- then it can be added.
I have been asked for this functionality a few times ( load to cart on selecting the variant ) but I think it would only confuse users...
You can add to cart via a link so it may be possible to change the links called by the select but still don't think its a good idea from a functional point of view
Yes, this is wrong idea - put child product from parent product to cart on category list.
If you really need then you must find solution self, not from me, sorry bro
Sorry, I was out for a few hours after fixing it. What I was looking for was to avoid that when selecting a variant from the category view, I was redirected to the product page, I wanted ajax to load the variant in the category view itself and with the possibility of being added to the cart without changing the URL. As is done at http://demo.virtuemart.net/.
Finally I discovered that it was a problem with the template that shows the products, product_slim and product_horizon, I don't know why but it works with one and not with the other.
do u mean this setting?
vmadmin-config->template->Use ajax for category content
Quote from: GJC Web Design on November 19, 2020, 11:02:57 AM
do u mean this setting?
vmadmin-config->template->Use ajax for category content
I know this setting, i activated then at first attempt, but with product_slim template it doesn't work for me... With product_horizon yes.