VirtueMart cart calculation
Posted: Wed May 30, 2007 10:00 am
I have been making some edits to virtuemart on joomla and I have encountered a slight problem that I cannot work around. Basically I am trying to display the amount of products that exist in the cart... I use the following code to print the session:
And I am resulted with the following:
Thanks![/quote]
Code: Select all
echo '<pre>Session:<br>';
print_r($_SESSION);
echo '</pre>';What I am trying to do is count all the values within the [ quantity ] part, so in this case, it would total upto 5... any ideas on how to do this?.Session:
Array
(
[cart] => Array
(
[idx] => 2
[0] => Array
(
[quantity] => 4
[product_id] => 1
[description] =>
)
[1] => Array
(
[quantity] => 1
[product_id] => 2
[description] =>
)
)
Thanks![/quote]