B-219 Sec-55 Noida, India
+918010221733

Remove other shipping if Free shipping available in magento

//To get the subtotal in shipping method (onepage checkout)
$subtotal = Mage::getSingleton(‘checkout/session’)->getQuote()->getSubtotal()
If cart total is less than 500 flat rate will enabled and free shipping will be disabled , for this
app/design/frontend/Your-Namespace /MODULE/template/checkout/onepage/shipping_method/available.phtml
<?php
if($subtotal >=500)
{
// Remove any other shipping methods if free shipping is available
if (array_key_exists(‘freeshipping’, $_shippingRateGroups )) {
$_shippingRateGroups = array(‘freeshipping’ => $_shippingRateGroups[‘freeshipping’]);
}
}
?>
(Visited 82 times, 1 visits today)

Leave a reply

You must be logged in to post a comment.