spree-multi-domain icon indicating copy to clipboard operation
spree-multi-domain copied to clipboard

[Admin::Order) Search/Add variants will list ALL variants

Open krtschmr opened this issue 7 years ago • 0 comments

isn't it better if i can search only the products/variants that belongs to the store which the order belongs to ? i patched that. i add data-store-id to the body, send that in the ajax-request and then scope it

Spree::Api::V1::VariantsController.class_eval do 
  def scope
    #...
    variants.where(store_id: params[:store_id]).accessible_by(current_ability, :read) 

anybody know a better solution?

krtschmr avatar Jul 30 '16 21:07 krtschmr