Skip to content

Ensure automatic discounts can be fulfilled#2509

Open
ryanmitchell wants to merge 1 commit into
lunarphp:1.xfrom
ryanmitchell:fix/buy-x-y-automatic
Open

Ensure automatic discounts can be fulfilled#2509
ryanmitchell wants to merge 1 commit into
lunarphp:1.xfrom
ryanmitchell:fix/buy-x-y-automatic

Conversation

@ryanmitchell

Copy link
Copy Markdown
Contributor

the processAutomaticDiscounts method in BuyXGetY doesnt current consider whether the discount item can be fulfilled, so errors can be thrown in user land when trying to add an item to cart that has no available stock.

this PR updates the logic to ensure we only choose items that can be fulfilled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant