I have magento installation that contains 3 site. Now i want to get the cart total for each site and show in one place. Is there any way to get the cart total based on site ID or site code ?
2 Answers
Try This :-
$storeId = Mage::app()->getStore()->getStoreId;
$quote = Mage::getModel('sales/quote')->getCollection()->addFieldtoFilter('store_id', array('eq' => $storeId));
foreach ($quote as $quotes)
{
$cartTotal = $quotes->getGrandTotal();
}
Try below way..
$storeId = Mage::app()->getStore()->getStoreId;
$quote_collection = Mage::getResourceModel('sales/quote_collection')->setStoreId($storeId);
foreach ($quote_collection as $quote) {
$cartTotal = $quote->getGrandTotal();
}