mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-03 22:06:07 +00:00
Replace fired events with clearer method call
The 'spree.cart.add' event has no listeners in spree_core on in ofn. The 'spree.order.contents_changed' just has a single listener that calls `order.update_distribution_charge`.
This commit is contained in:
@@ -14,9 +14,7 @@ class CartController < BaseController
|
||||
cart_service = CartService.new(order)
|
||||
|
||||
if cart_service.populate(params.slice(:products, :variants, :quantity), true)
|
||||
fire_event('spree.cart.add')
|
||||
fire_event('spree.order.contents_changed')
|
||||
|
||||
order.update_distribution_charge!
|
||||
order.cap_quantity_at_stock!
|
||||
order.update!
|
||||
|
||||
|
||||
Reference in New Issue
Block a user