I am developing M2 store for a company that just serves only for domestic users. I recently bought the Amasty Inventory module and made the domestic cities.(No shipping available to the countries different) )
I have two logical pattern where I have no idea to start off with..
Ar01
If total cart price is greater than X amount, free delivery available within city 1 to city 15,
even if the cart price is lower than X amount(in city 1 to city 15) that he will have to pay L amount(A fixed rate).
Ar02
even if the cart price greater or lower than X amount if he's not entitled the upon city list(city 1 to city 15) that he'll have to pay for shipping L amount(The fixed rate]
I am using Magento 2.2.2
if someone has an idea how to start off this module please let me know in real quick
Best Answer
What I understand from your question is you wanted to set shipping amount to 0 if some specific conditions matches .
You can override a collect method in your custom module and can set shipping amount to 0 off course after checking some conditions .
create some custom module Custom/Shippingamount
add registration.php
add module.xml file inside Custom/Shippingamount/etc directoy
add sales.xml file inside Custom/Shippingamount/etc directoy
now create RemoveShippingPrice.php file inside Custom/Shippingamount/Model directory where we are going to set the shipping price to 0 .