-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Admin] Search by name in stock #5506
Comments
Thanks for reporting. I think the issue is here: 6db4f52#r1383302271. We tried and by removing the cc @softr8 This might be a good first contribution if anyone is interested. |
Temp Hotfix for anybody else # app/overrides/hairdom/controllers/spree/admin/stock_items_controller/fix_search.rb
module Hairdom
module Spree
module Admin
module StockItemsController
module FixSearch
def variant_scope
scope = ::Spree::Variant
.accessible_by(current_ability)
.order(:sku)
.includes(
:images,
stock_items: :stock_location,
product: :variant_images,
option_values: :option_type
)
scope = scope.where(product: @product, is_master: !@product.has_variants?) if @product
scope = scope.by_stock_location(params[:stock_location_id]) if params[:stock_location_id].present?
scope
end
::Spree::Admin::StockItemsController.prepend self
end
end
end
end
end |
Can I work on this? Thanks |
@mehboobali98 you are welcome! |
Hi @kennyadsl @vokshirg, is this issue still open? To work on it |
@FranciscoJBrito yes! |
Hey folks, I opened #5660 to address this. I don't think it's complete yet, so I marked it as draft, but at the minimum it has a useful feature spec. |
Solidus Version:
4.2
To Reproduce
/admin/stock_items?variant_search_term=search_query&button=
OR
Current behavior
exception:
Expected behavior
correct search query
Screenshots
The text was updated successfully, but these errors were encountered: