News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

show the total number Products in the add to cart popup

Started by ibnati, February 25, 2018, 18:49:34 PM

Previous topic - Next topic

ibnati

hello

i want show the total number Products (carts Product) in the add to cart popup

also i used this cod in the padded.php

$cart = VirtueMartCart::getCart(); //getting cart object
$dat = $cart->cartProductsData;
echo "Total Product Count: " . count($dat)."\n";
$cart->prepareCartData();

but it does not show the the correct number

how can i fix this please ?

Ghost

That shows the count of unique products. Try this instead:

$this->cart->prepareCartData();
echo $this->cart->totalProduct;

ibnati