Add code

Thursday 31 May 2018

Magento 1 : Hide other shipping methods when free shipping is available

To prevent other shipping options to display when Free Shipping is available, add the following code to your template:



Open :
/app/design/frontend/[Your_package]/[Your_theme]/template/checkout/onepage/shipping_method/available.phtml




<?php
if ( array_key_exists('freeshipping', $_shippingRateGroups )) {
unset($_shippingRateGroups["flatrateperproduct"]);
}
?>

Then ,  flatrateperproduct Method will be remove from the shipping method.

10 comments:

  1. This one my favorite question ie "How to hide other shipping methods?". You nicely explain the code with good example. As, I am Magento ecommerce programmer and I'm a big fan of Magento as compared to another CMS's. I always looking up to the blogs to get solutions of my query.

    ReplyDelete
    Replies
    1. Thank you somuch. Sorry for the late response. Please contact for any type of help from Magento. Sure i will try to help you dear.

      Delete
  2. Outstanding work author. Knowledgeable enough. We will surely share your work. Anyway, If you are interested and looking for
    website developeryou may visit our website. You can also check our available services to offer. Thank you and More power!!

    ReplyDelete
    Replies
    1. Thanks for the comment. You may ask any help about Magento. Sure i will try to do help if i can dear. Thanks

      Delete
  3. There is a wide community of highly-experienced and proficient Web Developers in India who holds immense expertise on the best practices of Website Development. If it still sounds hard to choose the right web framework and technology; review the requirements and objectives of your project.

    ReplyDelete
    Replies
    1. Thanks for the comment. You may ask any help about Magento. Sure i will try to do help if i can dear. Thanks

      Delete
  4. Due to the rapid increase in eCommerce marketing, the overall economy has increased over the past time. Along with this crucial time, online growth for Magento eCommerce development became more important. In short, Adobe sensei revealed new product recommendations for Artificial intelligence (AI) as well as machine level language to customers, including businesses.

    ReplyDelete
    Replies
    1. Thanks for the comment. You may ask any help about Magento. Sure i will try to do help if i can dear. Thanks

      Delete
  5. Great content , really informative and useful , appreciate you enlightening us with this! Pls also give magento ecommerce development in Pakistan a thought for better business experience. The post explains about diversity of front end development really helpful for everyone, Cheers!

    ReplyDelete
    Replies
    1. Thanks for the comment. You may ask any help about Magento. Sure i will try to do help if i can dear. Thanks

      Delete

Magento : 404 error is showing admin page

Hello, Sometimes we may get the error on admin page once done with the Magento installation. In that scenario, we have to do the following: ...