Ranjith
Ranjith

Reputation: 145

How to assign the priority for the multiple stock location on purchase in spree?

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

Answers (1)

gmacdougall
gmacdougall

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

Related Questions