Jump to content

Disable double shipping costs when various Warehouses


Eutanasio

Recommended Posts

Hi,

How can I do to stop Prestashop v1.7.x charging twice shipping costs when an order contains products from various warehouses? for those cases we just collect items in 1 warehouse before proceeding with a single shipping, so no need to scare customers with double shipping costs!

Thanks

Link to comment
Share on other sites

PrestaShop will create multiple package, each with a shipping cost : https://github.com/PrestaShop/PrestaShop/blob/1.7.7.x/classes/Cart.php#L2519

If you want customer paid only shipping cost for the first package, your carrier module should implement fonction getPackageShippingCost() in order to set shipping cost to zero for others packages. See https://github.com/PrestaShop/PrestaShop/blob/1.7.7.x/classes/Cart.php#L3878

Link to comment
Share on other sites

1 hour ago, Janett said:

PrestaShop will create multiple package, each with a shipping cost : https://github.com/PrestaShop/PrestaShop/blob/1.7.7.x/classes/Cart.php#L2519

If you want customer paid only shipping cost for the first package, your carrier module should implement fonction getPackageShippingCost() in order to set shipping cost to zero for others packages. See https://github.com/PrestaShop/PrestaShop/blob/1.7.7.x/classes/Cart.php#L3878

Thanks for the answer! I don't use any modules for carriers, just use the native Prestashop carriers system, so nothing I can configure from that side.

How would you suggest I can do it in my case?

Thanks

Link to comment
Share on other sites

You should create your own carrier module and implement getPackageShippingCost() with logic to return free shipping after the first package.

A carrier module is not hard to do, you can find an example here : https://github.com/Xaconi/prestashopcarriertester

This example needs some changes to implement getPackageShippingCost() and recommendations of https://devdocs.prestashop.com/1.7/modules/carrier/

Link to comment
Share on other sites

  • 2 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...