VirtueMart Forum

VirtueMart 1.1.x [ Old version - no longer supported ] => Questions VM 1.1 ( the only active board for the old version) => Topic started by: discjockeyr on April 11, 2011, 16:25:03 pm

Title: Modify cart page to show quantity +/-
Post by: discjockeyr on April 11, 2011, 16:25:03 pm
Hi,

I have a request from a customer reagrding the shopping cart (not the minicart) so instead of edit the number in quantity box to have a +/- options to modify the quantity. Is this possible?
Thanks in advance
Title: Re: Modify cart page to show quantity +/-
Post by: WillP on July 06, 2012, 12:46:43 pm
Hi, i get same request, have you found solution on his?
Title: Re: Modify cart page to show quantity +/-
Post by: discjockeyr on July 06, 2012, 23:19:38 pm
no, as nobody answer i leave it as it is
Title: Re: Modify cart page to show quantity +/-
Post by: WillP on July 07, 2012, 04:18:18 am
I see, thanks anyway. Will update here if i get solution.
Title: Re: Modify cart page to show quantity +/-
Post by: WillP on July 07, 2012, 06:10:02 am
Hi, just to share with you if you 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:
Code: [Select]
<form action="<?php echo JRoute::_('index.php'); ?>" method="post" class="inline">To:
Code: [Select]
<form action="<?php echo JRoute::_('index.php'); ?>" method="post" class="product js-recalculate">
Change:
Code: [Select]
<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:
Code: [Select]
<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:
Code: [Select]
<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!