Author Topic: Generic child variant does not show 'Add to cart'  (Read 1408 times)

nistune

  • Beginner
  • *
  • Posts: 21
  • A beginner
Generic child variant does not show 'Add to cart'
« on: August 04, 2016, 09:58:41 am »
Joomla! Version 3.6.0
VirtueMart 3.0.16
Tried default Prostart template, as well as that from CreatorCK templates

I've noticed both this on my setup, as well as the demo site. Using the demo site

On the products page
https://demo.virtuemart.net/generic-child-variant-a-detail
1. Select Generic child variant (in the demo page you have GVC-A, GVC-B, GVC-C)
2. Still shows 'Choose a variant'
3. You cannot 'add to cart' once selecting a variant

However the behaviour is different on the product page:
https://demo.virtuemart.net/generic-child-cart-variant-detail
1. Choose a variant
2. Page refreshes and then 'Add to cart' is displayed

Shouldnt the products list page act the same was as the individual product page? Otherwise I dont see the point of listing variants on the products list page (and selecting them) if nothing happens?

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4608
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Generic child variant does not show 'Add to cart'
« Reply #1 on: August 04, 2016, 11:00:56 am »
I think, it's something wrong in the javascript.
It work in my case, but when you choose next product and after previous product, you don't see the same product, so you have another bug in the demo page.

nistune

  • Beginner
  • *
  • Posts: 21
  • A beginner
Re: Generic child variant does not show 'Add to cart'
« Reply #2 on: August 04, 2016, 11:50:44 am »
Is there anything I can do to fix that?

Seeing the same thing on this page:
http://www.nistune.com/test/index.php/nistune-shop/maf-equipment

Select the different bung type but there is no 'add to cart' afterwards

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4608
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Generic child variant does not show 'Add to cart'
« Reply #3 on: August 04, 2016, 17:27:23 pm »
I think, it's a template problem. The category container is not right.
in your site :
Virtuemart.container = jQuery('.productdetails-view');
Virtuemart.containerSelector = '.productdetails-view'; //]]>
But category container have class .category-view
So in Virtuemart.updateContent  Virtuemart.containerSelector cannot load the product and no fallback exist if the container do not exist.

I don't know if this is solved in new releases and i already reported that this script do not work always to the team So wait that a core developer try to understand and update the code, so it works always(but perhaps it's solved today in VM 3.0.17?).