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);
4
  • 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..... Commented Jul 5, 2017 at 7:11
  • I agree with @BabyinMagento, sound like a cookie/session issue.
    – Niels
    Commented Jul 5, 2017 at 8:25
  • yes i've tried but not working cleared all session and cookie
    – Mahendra
    Commented Jul 5, 2017 at 13:00
  • @ssatish4u pls check link1 , link2 , link3 and link4.... Commented Jul 6, 2017 at 5:44

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.