cancel
Showing results for 
Search instead for 
Did you mean: 

Fix Broken Sales Rule calculation on Multiship checkout

Fix Broken Sales Rule calculation on Multiship checkout

Magento divides sales rule discount amounts across the orders in a multiship order - it seems to do this based on the percentage of the quote total that the address in question represents.  However, when one of the orders does not meet the conditions of the sales rule, the portion of the discount that would be assigned to that order is just "lost".  Here is a more specific example:
Normal situation:
Example without a subtotal condition on the rule:
Original line item subtotal: $100
Original sales rule discount total: $10

shipment 1 item total: $70
shipment 2 total: $30
shipment 1 = 70% of original total
shipment 2 = 30% of original total
shipment 1 discount: $7
shipment 2 discount: $3

Example WITH subtotal condition of equal or greater than $50 on the discount rule:
Original line item subtotal: $100
Original sales rule discount total: $10
shipment 1 item total: $70
shipment 2 total: $30 (DO NOT MEET $50 minimum condition)
shipment 1 = 70% of original total
shipment 2 = 30% of original total
shipment 1 discount: $7
shipment 2 discount: $0
Would expect all $10 of the discount to be applied to shipment 1 since it qualified for the sales rule and the full $10 discount from the quote should be awarded somewhere.

I have reproduced this on a vanilla magento install with 2.4.5-p1.  The only thing non-core in this install is the adobe product recommendations module which I am using to test a different adobe error in a different ticket.

This issue was investigated in an Adobe Support ticket: https://support.magento.com/hc/en-us/requests/569054 . The investigation found that this has been incorrectly implemented but not able to be fixed as a support request.  Instead this feature request is needed.

The support ticket includes screen shots showing how to set up the scenario, as well as a short video showing what actions to perform to cause the issue.

1 Comment
alliancemi47fa
New Member

Addressing the broken sales rule calculation issue during Multiship checkout requires thorough debugging and testing to identify the root cause. Once pinpointed, implementing the tyre pressure necessary fixes and ensuring comprehensive testing across all scenarios will help resolve the issue effectively. Don't forget to communicate updates to stakeholders and users affected by the fix.