- Issue created by @Zevior
- πΊπΈUnited States rszrama
Ultimately, it's up to Commerce Stock to find a way to prevent this from happening. Commerce Core has no knowledge of or model for accommodating stock levels defined by other modules at this point.
- π³π±Netherlands Zevior
@rszrama shouldn't the promotion code check the target product's availability using AvailabilityManager? That sounds like a way to give modules an opportunity to deny the action.
- Status changed to Postponed: needs info
about 1 year ago 5:00pm 15 December 2023 - π¬π§United Kingdom guy_schneerson
Stock does not currently use the AvailabilityManager and has its own system. It does however have an Empty (Always TRUE) implementation that would be good to implement and I'll be happy to look into it if it will solve this issue.
However, it looks to me like the auto-add does not trigger the AvailabilityManager->check() so I can't see anything we can do. @rszrama do you have an idea of how to approach this or can the Auto Add use the AvailabilityManager or some other method to hook in?