[SOLVED]Plus and Minus button for quantity in cart page and related questions

Started by WillP, July 06, 2012, 12:39:46 PM

Previous topic - Next topic

WillP

Hi all,

Sorry if this had been answered. Maybe my keyword search return me with no related post.

I would like to add plus and minus button for quantity as in product details page for cart page. I'm able to add the button to the page, however, it is not function able. Appreciate if any of you can advice on this.

In addition, is it possible to:
1. add product variant in cart page. For instance, I added M size shirt to cart. I am able to change the size in cart instead of delete product and add a new one.
2. apply Product Details button function to product image and show product detail page as in lightbox. Means, i click on product image, product page will be displayed in lightbox style instead of switching current page.

Hope to hear from you guys.
Thanks!

WillP

Hi, just to share with you if anyone need this in future.

(Virtuemart 2.0.8, joomla 2.5)
I manage to do it by editing
1. components\com_virtuemart\views\cart\tmpl\default_pricelist.php

Change:
<form action="<?php echo JRoute::_('index.php'); ?>" method="post" class="inline">
To:
<form action="<?php echo JRoute::_('index.php'); ?>" method="post" class="product js-recalculate">

Change:
<input type="text" title="<?php echo  JText::_('COM_VIRTUEMART_CART_UPDATE'?>" class="inputbox" size="3" maxlength="4" name="quantity" value="<?php echo $prow->quantity ?>" />
To:
<input type="text" title="<?php echo  JText::_('COM_VIRTUEMART_CART_UPDATE'?>" class="quantity-input js-recalculate" size="3" maxlength="4" name="quantity" value="<?php echo $prow->quantity ?>" />

Add this right after above code:

<span class="quantity-controls js-recalculate">
<input type="button" class="quantity-controls quantity-plus" />
<input type="button" class="quantity-controls quantity-minus" />
</span>


I have tested on add to cart, update quantity. Seems working well, but, have no tested until purchased done.

Thanks!