Jeevachaithanyan Sivanandan

Disable free shipping for purchase below certain amount - OpenCart

In technology · 1 min read

If you are OC developer or shop owner, some time you might need to disable that  “Choose shipping method” option and make it default with some thing. For example, if customer make a purchase below certain amount say 10$, you wont have to provide free shipping, you need to put the flat rate shipping, then obviously, you dont want to show that select option between other shipping methods. How to to do this in OpenCart. well here is the trick. The ideas to disable all other shipping methods once the purchase total amount is less that  triggering  amount for free-shipping.

Steps.

1. open this file /your_OpenCartInstallation_DIRcatalog/model/flat.php

2. find the line         $method_data = array();

3. below that line paste this code

         if ($this->cart->getSubTotal() > $this->config->get(‘free_total’)) {          $status = FALSE;       } 

 

 

thats all.