[Solved] VM3 show total products in mini cart instead of total quantity

Started by rickkh, December 06, 2014, 14:28:05 PM

Previous topic - Next topic

rickkh

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!

rickkh

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;