Hallo,
Currently in OpenCart 3.0.3.2 the free shipping module when enabled works only under one condition, that is if the total amount of the order is above certain value it is activated.
How can I add a second condition so that if only both conditions are true the free shipping will be activated.
For example: total anount of the order is above $100 and the weight of the item is less than 10 kg.
Thank you in advance!
Currently in OpenCart 3.0.3.2 the free shipping module when enabled works only under one condition, that is if the total amount of the order is above certain value it is activated.
How can I add a second condition so that if only both conditions are true the free shipping will be activated.
For example: total anount of the order is above $100 and the weight of the item is less than 10 kg.
Thank you in advance!
Last edited by stefg on Sat Jan 22, 2022 11:44 pm, edited 1 time in total.
It is do able try to look at the free shipping file and do the same.stefg wrote: ↑Sat Jan 22, 2022 12:59 pmHallo,
Currently in OpenCart 3.0.3.2 the free shipping module when enabled works only under one condition, that is if the total amount of the order is above certain value it is activated.
How can I add a second condition so that if only both conditions are true the free shipping will be activated.
For example: total anount of the order is above $100 and the weight of the item is less than 10 kg.
Thank you in advance!
Urgent Questions shoot here: khnaz35@gmail.com
Enjoy nature
You can edit the code and add any condition you like.
Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com
You will have to modify the extension code, or purchase a different shipping extension to do this. I have one called Formula-Based Shipping that lets you set Free Shipping rates based on weight + total. You'd set it up like this:
------------------------------------------------------------------------------
CHARGE #1
Title: Free Shipping
Group: FS
Charge Type: Total
Charge Field: 100-99999 = 0.00
Rule: Weight of cart = 0-9.999
------------------------------------------------------------------------------
Feel free to take a look at the screenshots and demo site, and if you're interested let me know at www.getclearthinking.com/contact if you have any questions.
------------------------------------------------------------------------------
CHARGE #1
Title: Free Shipping
Group: FS
Charge Type: Total
Charge Field: 100-99999 = 0.00
Rule: Weight of cart = 0-9.999
------------------------------------------------------------------------------
Feel free to take a look at the screenshots and demo site, and if you're interested let me know at www.getclearthinking.com/contact if you have any questions.
Should I look into admin -> controller -> extension -> shipping -> free.php or admin -> view -> template -> extension -> shipping -> free.twig or somewhere else?khnaz35 wrote: ↑Sat Jan 22, 2022 8:30 pmIt is do able try to look at the free shipping file and do the same.stefg wrote: ↑Sat Jan 22, 2022 12:59 pmHallo,
Currently in OpenCart 3.0.3.2 the free shipping module when enabled works only under one condition, that is if the total amount of the order is above certain value it is activated.
How can I add a second condition so that if only both conditions are true the free shipping will be activated.
For example: total anount of the order is above $100 and the weight of the item is less than 10 kg.
Thank you in advance!
Opencart works on the mcvl model. So you have to make changes everywhere.
Urgent Questions shoot here: khnaz35@gmail.com
Enjoy nature
If you don't mind messing with the code in: catalog/model/extension/shipping/free.php
find
After add:
That should work for you
Mike
find
Code: Select all
} else {
$status = false;
}
Code: Select all
$weight = $this->cart->getWeight();
if ($weight > '10') { $status = false; }
// 10 limit
Mike
cue4cheap not cheap quality
That works! So simple! Thank you very much!Cue4cheap wrote: ↑Sat Jan 22, 2022 11:26 pmIf you don't mind messing with the code in: catalog/model/extension/shipping/free.php
findAfter add:Code: Select all
} else { $status = false; }
That should work for youCode: Select all
$weight = $this->cart->getWeight(); if ($weight > '10') { $status = false; } // 10 limit
Mike

Who is online
Users browsing this forum: CJC and 9 guests