0

Enabled shipping charge in my Magento1.9 store is table_rate and in store pickup.

If As a login user I have added few items into my cart and logout. I login again and moving to cart page. It is not showing and shipping charges on cart screen. If I do refresh the same page, it shows shipping charges from table rate.

I logout and login again, moving to cart again shipping charges is not showing and do refresh it appears.

This seems inconsistent.

Try 1#: I disabled all custom modules and flushed cache. No luck

Try 2#: Disabled all custom modules switched to default theme (not rwd, magento default). Flushed cache. No luck.

0

i fixed this issue by a custom code to set shipping_method as null

config.xml

<?xml version="1.0"?>
    <config>
        <modules>
            <Ocra_CartShipping>
                <version>1.3.0</version>
            </Ocra_CartShipping>
        </modules>
        <global>
        <models>
            <ocra_cartshipping>
                <class>Ocra_CartShipping_Model</class>
            </ocra_cartshipping>
        </models>
            <events>
            <sales_quote_collect_totals_before>
                <observers>
                    <ocra_cartshipping>
                        <class>ocra_cartshipping/observer</class>
                        <method>handleShippingMethod</method>
                    </ocra_cartshipping>
                </observers>
            </sales_quote_collect_totals_before>
            </events>
        </global>
    </config>

Observer.php

<?php
class Ocra_CartShipping_Model_Observer {
    public function handleShippingMethod($observer) {


        $quote = $observer->getEvent()->getQuote();
        $shippingAddress = $quote->getShippingAddress();
        $billingAddress = $quote->getBillingAddress();


        if(Mage::app()->getRequest()->getControllerName() == 'checkout_cart'){
            $shippingAddress->setShippingMethod(null);
            $shippingAddress->save();

            $saveQuote = true;
        }
    }
}
| improve this answer | |

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.