标签: ruby-on-rails spree
狂欢多个库存位置允许购买产品。它从默认商店获取产品等。如何为购买地点分配优先权。?
答案 0 :(得分:2)
您应该实现Spree::Stock::Prioritizer并在此处应用适当的逻辑:
Spree::Stock::Prioritizer
https://github.com/spree/spree/blob/v2.4.3/core/app/models/spree/stock/prioritizer.rb#L38-L40
值得一看 - The Prioritizer