You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When no shipment methods are assigned to vendor, any order with items from that vendor will fail in the shippment state with the error "We are unable to calculate shipping rates for the selected items".
The origin for that issue its in the package_decorator.rb when you override the shipping methods:
def shipping_methods
if (vendor = stock_location.vendor)
vendor.shipping_methods.to_a
else
shipping_categories.map(&:shipping_methods).reduce(:&).to_a
end
end
May be you could replace this code to allow the "default" shippments methods for any vendor unless some specific method are assigned to it. Something like this:
def shipping_methods
if ( (vendor = stock_location.vendor) && vendor.shipping_methods.present? )
vendor.shipping_methods.to_a
else
shipping_categories.map(&:shipping_methods).reduce(:&).to_a
end
end
I think this is the fast solution right now but the appropriate one would be to modify the models to assign shipping methods to vendors (and not vendors to shipping_methods)
The text was updated successfully, but these errors were encountered:
When no shipment methods are assigned to vendor, any order with items from that vendor will fail in the shippment state with the error "We are unable to calculate shipping rates for the selected items".
The origin for that issue its in the package_decorator.rb when you override the shipping methods:
May be you could replace this code to allow the "default" shippments methods for any vendor unless some specific method are assigned to it. Something like this:
I think this is the fast solution right now but the appropriate one would be to modify the models to assign shipping methods to vendors (and not vendors to shipping_methods)
The text was updated successfully, but these errors were encountered: