From ef56574d826d56983eaa6c24b9e536e00fad3ab0 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Wed, 8 Jan 2014 11:37:38 +1100 Subject: [PATCH] Pass quantity to OrderPopulator --- app/controllers/spree/orders_controller_decorator.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/spree/orders_controller_decorator.rb b/app/controllers/spree/orders_controller_decorator.rb index 180c09bec6..d080b6bb8e 100644 --- a/app/controllers/spree/orders_controller_decorator.rb +++ b/app/controllers/spree/orders_controller_decorator.rb @@ -5,13 +5,13 @@ Spree::OrdersController.class_eval do before_filter :update_distribution, :only => :update before_filter :filter_order_params, :only => :update - # Patch Orders#populate to provide distributor_id and order_cycle_id to OrderPopulator + # Patch Orders#populate to populate multi_cart (if enabled) def populate if OpenFoodNetwork::FeatureToggle.enabled? :multi_cart populate_cart params.slice(:products, :variants, :quantity, :distributor_id, :order_cycle_id) end populator = Spree::OrderPopulator.new(current_order(true), current_currency) - if populator.populate(params.slice(:products, :variants)) + if populator.populate(params.slice(:products, :variants, :quantity)) fire_event('spree.cart.add') fire_event('spree.order.contents_changed') respond_with(@order) do |format|