From 924128098bb7ccfc9eb829b74c72e1abdcfc056e Mon Sep 17 00:00:00 2001 From: Will Marshall Date: Thu, 15 May 2014 16:27:49 +1000 Subject: [PATCH] Restricting shipping methods --- app/views/checkout/_order.rabl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/checkout/_order.rabl b/app/views/checkout/_order.rabl index 9903795493..36e5a98eed 100644 --- a/app/views/checkout/_order.rabl +++ b/app/views/checkout/_order.rabl @@ -18,8 +18,8 @@ child current_order.ship_address => :ship_address do end node :shipping_methods do - Hash[current_order.distributor.shipping_methods.collect { - |method| [method.id, { + Hash[current_order.available_shipping_methods("front_end").collect { |method| + [method.id, { require_ship_address: method.require_ship_address, price: method.compute_amount(current_order).to_f, name: method.name