Author Topic: How to get $total from cart or $_SESSION['cart']... Newbie problem  (Read 6425 times)


  • Beginner
  • *
  • Posts: 2

I'm quite new in php and redesigning some custom virtuemart modul for sending cart to email...

What I want is to get variable $total from cart to my modul... because this module is calculating total price from database and it's not working riht since we applied custom atributes with price changes +/-.

So my question is how to get value of $total from $_SESSION['cart'] or simple how to get value $total from cart page where is calculated ok.

Thanks  ???


  • Beginner
  • *
  • Posts: 18
  • VirtueMart Version: 1.1.6 Stable
Re: How to get $total from cart or $_SESSION['cart']... Newbie problem
« Reply #1 on: March 16, 2016, 17:04:57 pm »
Try this:

<?php $total = round($db->f("order_total"), 2); ?>
Joomla 1.5.22 | Virtuemart 1.1.6 Stable | PHP 5.3.13