Reputation: 121
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 grand total showing with shipping cost so I have to remove this shipping cost in my cart grand 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?
Upvotes: 1
Views: 872
Reputation: 121
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>setShipping</method>
</your_module_shipping_observer>
</observers>
</checkout_cart_save_before>
</events>
</frontend>
And in your observer try this
public function setShipping($observer) {
$event = $observer->getEvent();
$cart = $event->getCart();
$shippingaddress = $cart->getQuote()->getShippingAddress();
$shippingaddress->setShippingMethod('')->save();
return;
}
Upvotes: 1