Author Topic: [Solved] VM3 show total products in mini cart instead of total quantity  (Read 1206 times)

rickkh

  • Beginner
  • *
  • Posts: 30
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

  • Beginner
  • *
  • Posts: 30
Re: VM3 show total products in mini cart instead of total quantity
« Reply #1 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;