damanic / ls1-module-shop

Lemonstand V1 - Core Shop Module
2 stars 2 forks source link

shop_shippingfixed_action.php #18

Closed putty2000 closed 1 month ago

putty2000 commented 1 month ago

How could this be edited to discount the amount same amount from each product that matches the conditions?

Example: Cart has a product with quantity of 2 products that match the conditions. Discount is set to $5. Total discount would be $10 off shipping?

damanic commented 1 month ago

@putty2000 What you are asking for is beyond the scope of the discount action.

The doubling of discount for each unit suggests your shipping quotes double for each unit, in which case consider setting the discount amount to percentage equivalent of $5.

If shipping quotes are not that simple you might be better off applying the $5 discount to the unit price instead of the shipping quote.

You may also be able to find a solution using per product shipping cost on the products shipping tab in combination with discount rules and available shipping methods.

Alternatively you could set up multiple shipping discount rules to cover each quantity you are likely to sell.

putty2000 commented 1 month ago

Trying to manage this using the discount engine to show certain shipping methods based on conditions of what manufacturers are present in the cart, but the Terminating Rule doesn't seem to be working as per the docs: "The Terminating Rule checkbox instructs LemonStand to stop further rules processing if the current rule took effect."

damanic commented 1 month ago

@putty2000 I take it you are running last shop module release v1.40.9 ? https://github.com/damanic/ls1-module-shop/releases/tag/1.40.9

Testing here the terminating rule setting does work when applying a fixed shipping quote discount image

When shipping discount was set to not terminating both the shipping and subtotal discount applied. When the shipping discount was set to terminating only the shipping discount applied.