3

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
  • cart total based on website id or store id ?
    – Rk Rathod
    Mar 23 '19 at 12:42
  • based on site id or site code.
    – Mehar
    Mar 24 '19 at 8:27
2
+50

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();
}
1
  • Thnkx buddy :)..
    – Rk Rathod
    Apr 1 '19 at 18:24
1

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();
     } 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.