You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When performing the eligibility check for a promotion, the usage limit check should not count the promotable that has been already applied for the promotion.
I suspect the same must be done also when re-computing the amounts in promo actions, otherwise, it sets them to zero.
Here's a test case (I did my best to explain it without letting my brain go into a loop 💥):
Given I have an active promotion with 1 usage limit
Given I have a completed order with the promotion above applied
When I edit and save the promotion' adjustment and the promo has 0 usages left
The adjustment is saved as ineligible and amount set to 0
The promotion changes to 1 usage left
When I edit and save again the promotion' adjustment
The adjustment is saved as eligible and amount to the promo discount
The promotion changes back to "0 usages left"
Rinse and repeat to switch the adjustment to ineligible and back
Reproduced against solidus versions: 2.9.0.alpha and 2.7.1
The text was updated successfully, but these errors were encountered:
Just checking but was your order completed ? it should only count promotion usage for completed order normally. If it does it with incomplete order, that's something weird indeed.
I think you are right, this happens because the eligibility check is done when there are no eligible "usage" left. I think we should add that "usage" to the count somehow to make it work.
When performing the eligibility check for a promotion, the usage limit check should not count the promotable that has been already applied for the promotion.
I suspect the same must be done also when re-computing the amounts in promo actions, otherwise, it sets them to zero.
Here's a test case (I did my best to explain it without letting my brain go into a loop 💥):
0
Rinse and repeat to switch the adjustment to ineligible and back
Reproduced against solidus versions:
2.9.0.alpha
and2.7.1
The text was updated successfully, but these errors were encountered: