Reputation: 145
Spree multiple stock locations allows a product purchase.It takes the product from default store and so on . How to assign priority for the locations on purchase.?
Upvotes: 2
Views: 182
Reputation: 4911
You should implement a Spree::Stock::Prioritizer
and apply the appropriate logic here:
https://github.com/spree/spree/blob/v2.4.3/core/app/models/spree/stock/prioritizer.rb#L38-L40
Worth to look - The Prioritizer
Upvotes: 2