Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Magento update subtotal item issue
 
KrzysztofPeksa
Jr. Member
 
Total Posts:  5
Joined:  2013-04-18
 

Hello everyone smile

I can’t update subtotal item in cart. I created module with observe checkout_cart_product_add_after I can get subtotal price from item:

$subtotal Mage::getSingleton('checkout/cart')->getQuote()->getSubtotal();
but I can’t update this, for exmaple:

$subtotal $subtotal 100;
Mage::getSingleton('checkout/session')->getQuote()->setSubtotal($subtotal);
Mage::getSingleton('checkout/cart')->getQuote()->setSubtotal($subtotal);
Mage::getSingleton('checkout/session')->getQuote()->save();
Mage::getSingleton('checkout/cart')->getQuote()->save();

If I run in my Observer

print_r($subtotal); exit;
I get correct updated subtotal. In cart page I have still orginal subtotal without change.

I’ll be grateful for any tips and help.
Additional hints:
http://stackoverflow.com/questions/16347262/magento-update-subtotal-item

 
Magento Community Magento Community
Magento Community
Magento Community
 
KrzysztofPeksa
Jr. Member
 
Total Posts:  5
Joined:  2013-04-18
 

Ok I can get subtotal, but which way I should choose to save subtotal and see this new subtotal in cart / checkout page?

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top