We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Package#shipping_methods https://github.com/spree/spree/blob/3-0-stable/core/app/models/spree/stock/package.rb#L68 is based on parts shipping categories, but store owner can set separate shipping category for assembly itself.
I propose to override https://github.com/spree/spree/blob/3-0-stable/core/app/models/spree/stock/package.rb#L64..L66 with:
module Spree module Stock Package.class_eval do def shipping_categories contents.map { |item| item.line_item.variant.shipping_category }.compact.uniq end end end end
What do you think about it?
The text was updated successfully, but these errors were encountered:
looks good to me
Sorry, something went wrong.
No branches or pull requests
Package#shipping_methods https://github.com/spree/spree/blob/3-0-stable/core/app/models/spree/stock/package.rb#L68 is based on parts shipping categories, but store owner can set separate shipping category for assembly itself.
I propose to override https://github.com/spree/spree/blob/3-0-stable/core/app/models/spree/stock/package.rb#L64..L66 with:
What do you think about it?
The text was updated successfully, but these errors were encountered: