News:

Support the VirtueMart project and become a member

Main Menu

[ SOLVED ] Showing number of products in Cart checkout page

Started by Ihateit, January 21, 2013, 09:32:26 AM

Previous topic - Next topic

Ihateit

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.

Ihateit

It was easier done than said;

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