mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Bring in shipment updating
This commit is contained in:
@@ -13,6 +13,7 @@ module Spree
|
||||
def add(variant, quantity = 1, shipment = nil)
|
||||
line_item = order.find_line_item_by_variant(variant)
|
||||
add_to_line_item(line_item, variant, quantity, shipment)
|
||||
shipment.present? ? shipment.update_amounts : order.ensure_updated_shipments
|
||||
update_order
|
||||
end
|
||||
|
||||
@@ -26,6 +27,7 @@ module Spree
|
||||
end
|
||||
|
||||
remove_from_line_item(line_item, variant, quantity, shipment)
|
||||
shipment.present? ? shipment.update_amounts : order.ensure_updated_shipments
|
||||
update_order
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user