hi guys,
trying to get rid of the annoying split shipping charge for our customers
they are getting charged twice for shipping since some of their orders might come from multiple stock locations
when choosing a "flat rate' shipping
so if the shipping charge is 5$ but they have 1 item from one stock location and another from a different one
they are charged 10$ for shipping
does it make sense to override the build_packages methods to return only one package to avoid the double charge?
has anyone done this properly?
here is the method i am trying to override.
Spree
Stock
Coordinator
def build_packages(packages = Array.new)
StockLocation.active.each do |stock_location|
next unless stock_location.stock_items.where(:variant_id => order.line_items.pluck(:variant_id)).exists?
packer = build_packer(stock_location, order)
packages += packer.packages
end
end
end