VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: Beni on November 11, 2013, 17:58:17 PM

Title: Cart qty number of different products - POSSIBLE?
Post by: Beni on November 11, 2013, 17:58:17 PM
Hi,
I searched this question but not found. Sorry, It is possible, that a simple thing but I can't solve.
I want to display in cart module not a full product qty, only a different products qty.
Eg: now: add to cart 5 apples, 3 bananas. Cart module display 8 items.
I want to show only 2 items!
It is possible? Thanks for reviews!
Sorry for my English!
Title: Re: Cart qty number of different products - POSSIBLE?
Post by: GJC Web Design on November 11, 2013, 20:05:53 PM
do u mean like attached?

modules/mod_virtuemart_cart/tmpl/default.php from ~ line 51

original
<div class="total_products"><?php echo  $data->totalProductTxt ?></div>
<div class="show_cart"rel="nofollow">
<?php if ($data->totalProduct and $show_price) echo  $data->cart_show?>
</div>
<div style="clear:both;"></div>


change to

<div class="total_products"><?php #echo  $data->totalProductTxt ?></div>
<div style="clear:both;"></div>
<div class="show_cart"rel="nofollow">
<?php if ($data->totalProduct and $show_price) echo  $data->cart_show?>
</div>
<div style="clear:both;"></div>




[attachment cleanup by admin]
Title: Re: Cart qty number of different products - POSSIBLE?
Post by: Beni on November 11, 2013, 21:23:57 PM
Thanks, GJC Web Design!
But I don't want this.
Only show the total different products. See in attachment.
In this image, add to cart 2 bananas and 3 apples. But show only the total price and the different product qty (2).

[attachment cleanup by admin]
Title: Re: Cart qty number of different products - POSSIBLE?
Post by: Maxim Pishnyak on November 11, 2013, 21:52:35 PM
Beni, I'm sure you'll be able to count ordered positions IF you will at least TRY to do this yourself first.
Title: Re: Cart qty number of different products - POSSIBLE?
Post by: PRO on November 12, 2013, 01:57:03 AM
you cannot do this without changing the JS

Title: Re: Cart qty number of different products - POSSIBLE?
Post by: Beni on November 12, 2013, 06:42:52 AM
Thanks. Important for me, I would like to hack this... How do I?