Author Topic: Modify cart page to show quantity +/-  (Read 895 times)

discjockeyr

  • Beginner
  • *
  • Posts: 29
Modify cart page to show quantity +/-
« 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

WillP

  • Beginner
  • *
  • Posts: 17
Re: Modify cart page to show quantity +/-
« Reply #1 on: July 06, 2012, 12:46:43 pm »
Hi, i get same request, have you found solution on his?

discjockeyr

  • Beginner
  • *
  • Posts: 29
Re: Modify cart page to show quantity +/-
« Reply #2 on: July 06, 2012, 23:19:38 pm »
no, as nobody answer i leave it as it is

WillP

  • Beginner
  • *
  • Posts: 17
Re: Modify cart page to show quantity +/-
« Reply #3 on: July 07, 2012, 04:18:18 am »
I see, thanks anyway. Will update here if i get solution.

WillP

  • Beginner
  • *
  • Posts: 17
Re: Modify cart page to show quantity +/-
« Reply #4 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!