0

I have add product in cart after that i have checkout page, now in checkout page i will fill the all details also select shipping method but not proceed order.after that i have going on cart then my grandtotal showing with shipping cost so i have to remove this shipping cost in my cartgrand total because customer can confusion how that total will increase.so i will only show product total with text in cart if i am select shipping method they can't be display in cart only show at checkout time. Is this possible in magento 1.9 ?

  • U must remove shipping from the quote before rending your cart, overide the controller – Mohamed El Mrabet Nov 28 '17 at 8:40
  • Can you explain in detail ? like file name or else method etc.. – meet Nov 28 '17 at 8:42
  • I ll send you ana answer after one hour ok – Mohamed El Mrabet Nov 28 '17 at 8:45
1

Try this Create an observer in checkout_cart_save_before

    <frontend>
        <events>
            <checkout_cart_save_before>
                <observers>
                <your_module_shipping_observer>
                    <type>singleton</type>
                    <class>Your_Module/observer</class>
                    <method>setFreeShipping</method>
                </your_module_shipping_observer>
                </observers>
            </checkout_cart_save_before>
        </events>
    </frontend>

And in your observer try this

    public function setFreeShipping($observer) {
        $event = $observer->getEvent();
        $cart = $event->getCart();
        $shippingaddress = $cart->getQuote()->getShippingAddress();
        $shippingaddress->setShippingMethod('')->save();
        return;
    }

Tell me if that's helped you?

  • Only one changes in our method name is setShipping and you can defined method is setFreeShipping.other wise all are working fine.thanks – meet Nov 28 '17 at 9:29
  • Sorry, i'm glad to hear that – Mohamed El Mrabet Nov 28 '17 at 9:32

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.