VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: Ihateit on January 21, 2013, 09:32:26 AM

Title: [ SOLVED ] Showing number of products in Cart checkout page
Post by: Ihateit on January 21, 2013, 09:32:26 AM
Hey guys. I want to show the total number of products in the cart, on the last checkout page (root/templates/templatename/html/com_virtuemart/cart/default.php).

I have been trying some different things;
<?php $array unserialize($_SESSION['__vm']['vmcart']); 
$amount $array->products[1]->amount
if (
$amount != 0){ ?>

and
<?php if ($data->totalProduct==1) { ?>
and
<?php if($total_products ==0) { ?>
But i guess it doesnt know where to find the information. So what would i need to show how many products there are in total, on the last of the checkoutpages.

//Anders - PS. dont know if this is the right place to post this question.
Title: Re: Showing number of products in Cart checkout page
Post by: Ihateit on January 21, 2013, 09:40:29 AM
It was easier done than said;

if(!empty($this->cart->products)) {