I am working on ajax cart. When i update the cart qty, I am trying to reload the quote but its not loading properly


How to reload the quote so that total calculation should happen properly in magento1 we use cart::init()

  • 1
    did you get any success on this? – Pallavi Sinha Nov 3 '16 at 12:22
  • did you get any success on this? i am getting same problem – Navin Bhudiya Feb 15 '18 at 8:42

I hope this may helps you

After add to cart run this code:

use Magento\Framework\Session\SessionManagerInterface;
use Magento\Framework\Stdlib\Cookie\CookieMetadataFactory;
use Magento\Framework\Stdlib\Cookie\PublicCookieMetadata;
use Magento\Framework\Stdlib\CookieManagerInterface;

in constructor:

    CookieManagerInterface $cookieManager,
    CookieMetadataFactory $cookieMetadataFactory,
    SessionManagerInterface $sessionManager,

After product was added to cart

$metadata = $this->_cookieMetadataFactory

$sectiondata = json_decode($this->_cookieManager->getCookie('section_data_ids'));

$sectiondata->cart += 1000;


Before trying above code try with frontend/section.xml :

     <section name="cart"/>

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.