Welcome, Guest
Username: Password: Remember me
Use this Category for your support questions about Virtuemart Template - MaterialMart (SKU# FLEX-00020)

TOPIC: choice of variants in the category

choice of variants in the category 5 years 2 months ago #15778

Hi I need to be able to choose the variant in the category view as it makes the standard virtuemart template, I added this code:
<div class=""> <?php echo shopFunctionsF::renderVmSubLayout('addtocart',array('product'=>$product,'rowHeights'=>$rowsHeight[$row], 'position' => array('addtocart'))); ?></div>
in the pro-cat-grid.php sublayout and the dropdown comes out but the choice does not load the child product and the 'Add to Cart' button
example:
new.brugnolaro.com/it/filtro/58-mocassini-donna/
what's missing, how can I replicate the virtuemart standard template function?
The administrator has disabled public write access.

choice of variants in the category 5 years 1 month ago #15784

The simple answer is: you just can't. Child Product can't be selected from the Category page, there are many things going on when you select a variant to load the child product. The price, description, title, rating, picture might be changed. AJAX request is not enough to load all those things for each product, there will be performance leaks, beside UI can be easily messed.

We have solved this dilemma by replacing "Add to Cart" button with "Choose a Variant" link. So if a product has a variant, that particular product can't be added directly from the category page, shopper has to land to product details page and make a selection (to load the child product) and add the product to cart later.

Regards.
The administrator has disabled public write access.
Time to create page: 0.195 seconds

MaterialMart

for Virtuemart 3

Google's Material Design has finally arrived to Virtuemart

Virtumart Template - MaterialMart Virtumart Template - CleanMart Virtumart Template - CleanMart Virtumart Template - CleanMart

Fully responsive!

Buy Now   |   Live Demo