Header Ad

Friday, April 2, 2010

Retriving Cart Amount in Magento

The following code will be helpful to get the cart totals informaiton in magento.
$mageFilename = 'app/Mage.php';
require_once $mageFilename;

umask(0);
Mage::app();

Mage::getSingleton('core/session', array('name'=>'frontend'));

$session = Mage::getSingleton('checkout/session');

$totals = $session->getQuote()->getTotals();

No comments: