From 7ea74ccf4a961fa6b24256dfa6dad6c401d0b0d5 Mon Sep 17 00:00:00 2001 From: Rob Harrington Date: Wed, 12 Apr 2017 16:02:28 +1000 Subject: [PATCH] Order confirmation redirects 'Back to Cart' if cart is non-empty --- app/views/spree/orders/form/_update_buttons.html.haml | 11 ++++++++--- config/locales/en.yml | 2 ++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/app/views/spree/orders/form/_update_buttons.html.haml b/app/views/spree/orders/form/_update_buttons.html.haml index 77f31ce418..46d36e0e5c 100644 --- a/app/views/spree/orders/form/_update_buttons.html.haml +++ b/app/views/spree/orders/form/_update_buttons.html.haml @@ -1,8 +1,13 @@ .row .columns.small-12.medium-3 - = link_to main_app.shop_path, :class => "button expand" do - %i.ofn-i_008-caret-left - = t(:back_to_store) + - if current_order.andand.line_items.present? + = link_to spree.cart_path, :class => "button expand" do + %i.ofn-i_008-caret-left + = t(:order_back_to_cart) + - else + = link_to main_app.shop_path, :class => "button expand" do + %i.ofn-i_008-caret-left + = t(:order_back_to_store) - if order.changes_allowed? .columns.show-for-medium-up.medium-3   .columns.small-12.medium-3 diff --git a/config/locales/en.yml b/config/locales/en.yml index 48b4916fd4..b5735d34f2 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -783,6 +783,8 @@ en: order_includes_tax: (includes tax) order_payment_paypal_successful: Your payment via PayPal has been processed successfully. order_hub_info: Hub Info + order_back_to_store: Back To Store + order_back_to_cart: Back To Cart bom_tip: "Use this page to alter product quantities across multiple orders. Products may also be removed from orders entirely, if required."