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

0

Your Answer

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

Browse other questions tagged or ask your own question.