I have multiple product variations types on my site.

For one of them, I set up the Local stock.

When I was trying to finalize the order checkout flow with 2 products (one of them is always in stock and another one in a local stock) the stock transaction doesn't create.

I have made a little research and found a bug in code with "foreach".

CommentFileSizeAuthor
#2 OrderEventSubscriber-3094179-2.patch2.85 KBunrealauk

Comments

unrealauk created an issue. See original summary.

unrealauk’s picture

Assigned: unrealauk » Unassigned
Status: Active » Needs review
StatusFileSize
new2.85 KB

Please, review my solution for that.

unrealauk’s picture

Version: 8.x-1.x-dev » 8.x-1.0-alpha3
guy_schneerson’s picture

Status: Needs review » Reviewed & tested by the community

Great work. This was a silly bug but a significant one. thanks for the patch.

guy_schneerson’s picture

Status: Reviewed & tested by the community » Fixed

Committed without the comment changes as comments were ok. excellent fix. Our stock is much safer now.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.