silvershop / silvershop-discounts

Adds Discount and Coupon support for SilverShop
Other
9 stars 38 forks source link

Use "updateShippingPackage" for better synchronisation with shipping package #103

Open wernerkrauss opened 4 years ago

wernerkrauss commented 4 years ago

Related to https://github.com/silvershop/silvershop-shipping/issues/62

The discounts module should use "updateShippingPackage", so the shipping costs can be calculated from SubTotal - Discounts.

In some cases SubTotal can mean "free shipping", but "SubTotal - Discount" is less money, so shipping costs will apply.

RVXD commented 4 years ago

We tried to fix it this way, but it creates an infinite loop in the calculation process. We fixed it by supplying the running total to the shipping calculator.