I’m having this strange problem:
I am using “table rate” shipping, with shipping dependent on weight.
I added a function that is tied to the event “checkout_cart_update_items_after” (did that through the config.xml of the new module containing the function).
Now, the problem occurs when the client increases the Qty of an item in the cart page, crossing to a higher shipping rate in the table of shipping rates.
The function is being called by the event dispatcher. Accessing the cart using various ‘get...()’ methods shows it as updated, however the getPrice() for the table rate shipping still computes the price for the previous shipping weight!
I am using the following code to iterate over the shipping method prices within the called function:
$_shippingRateGroups = Mage::getSingleton(’checkout/session’)->getQuote()->getShippingAddress()->getGroupedAllShippingRates();
foreach ($_shippingRateGroups as $code => $_rates):
$that = Mage::getSingleton(’checkout/session’);
Mage::log("add_default_shipping: shipping price for “.$code.”: “.count($_rates).” + “.$_rates->getPrice());
Any ideas why the getPrice() method for table rate doesn’t compute new rate based on updated quantities, even though it is called as part of the checkout_cart_update_items_after event ?