0

cart is empty after add to cart (in private window working fine) magento 1.9.2 programmatically.

i've used

$cart = Mage::getSingleton('checkout/cart'); //getModel
$cart->init(); 
$cart->addProduct($product, $qty);  // update session
$session->setCartWasUpdated(true);
$cart->save();
$quote->setIsActive(1);
$quote->collectTotals()->save();
Mage::getSingleton('checkout/session')->setCartWasUpdated(true);
  • 1
    did you checked in all browsers ? same issue everywhere ? also try clearing your browser cookies and var/session once , than check in normal window..... – Baby in Magento Jul 5 '17 at 7:11
  • I agree with @BabyinMagento, sound like a cookie/session issue. – Niels Jul 5 '17 at 8:25
  • yes i've tried but not working cleared all session and cookie – 55840 Jul 5 '17 at 13:00
  • @ssatish4u pls check link1 , link2 , link3 and link4.... – Baby in Magento Jul 6 '17 at 5:44

Your Answer

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

Browse other questions tagged or ask your own question.