Search code examples
phpmagentomagento2shipping-method

Magento 2.3 shipping


I have developed a system using Magento 2.3 and now almost everything is done even the payment gateway. Now the last part I have to do is adding the shipping method and cost. My requirements are so simple and my requirements are, when an order is placed and if the cart value is below 1000 I have to add 200 for shipping and if the cart value is more than 1000 then we give free shipping. Along with the cart value we also have to define the locations ( only from specific locations the orders can be placed ). For example if we take America only from California and Los Angeles can place the order and if the order value is less than 1000 then shipping cost is 200 and if it is above 1000 then free shipping.

Following are methods I tried but I didn't get the expected results.

  1. Free shipping. In Magento shipping is done based on the country not based on the countries locations so this method failed.

  2. Flat rate. I couldn't define the minimum amount and I couldn't define the locations.

  3. Table rate. I could define the shipping cost and the locations but unfortunately cost is based on the maximum value ( sub total and above ) not the minimum value.

As I have mentioned my requirements are simple we have to define the location And if the cost is low we charge shipping and if it's high we give free shipping.


Solution

  • i am posting the answer so that it will be beneficial for others and the solution is, in general magento doesn't support shipping based on locations or it doesn't support certain conditions for example ( sub total between 2000 and 100000 or 0 and 2000 ) etc. so in order to overcome this issue we have to install extensions which suits our requirements. so for my scenario i used the ( webshopapps matrixrate ) which is a free extension and i am now fine with shipping.