VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: rickkh on December 06, 2014, 14:28:05 PM

Title: [Solved] VM3 show total products in mini cart instead of total quantity
Post by: rickkh on December 06, 2014, 14:28:05 PM
Hi,

I have VM3 + J3.3. When I add a product to my cart with 10 quantity, the mini cart on the top right corner shows:
Item(s): 10
Adding another product (for a total of 2) with a quantity of 11 shows:
Item(s): 21

Instead, I would like to show the number of products which is 2 in the example above. Is this a configuration settings and if not which code can I find the mini cart number of Items in?

Thank you!
Title: Re: VM3 show total products in mini cart instead of total quantity
Post by: rickkh on December 06, 2014, 15:43:34 PM
Solved as follows (for VM3 only?)

1- Go to components/com_virtuemart/helpers
2- Open the file "cart.php"
3- Replace the following:
$this->totalProduct += $product -> quantity;
WITH:
$this->totalProduct += 1;