diff --git a/app/views/spree/orders/form/_update_buttons.html.haml b/app/views/spree/orders/form/_update_buttons.html.haml index 3a64a79a43..22ede28e57 100644 --- a/app/views/spree/orders/form/_update_buttons.html.haml +++ b/app/views/spree/orders/form/_update_buttons.html.haml @@ -1,12 +1,12 @@ .row .columns.small-12.medium-3 - - if current_order.andand.distributor == @order.distributor - - if current_order.line_items.present? + - if current_order.nil? || current_order.distributor.nil? || current_order.distributor == @order.distributor + - if current_order&.line_items.present? = link_to main_app.cart_path, :class => "button expand" do %i.ofn-i_008-caret-left = t(:order_back_to_cart) - else - = link_to current_shop_products_path, :class => "button expand" do + = link_to "#{main_app.enterprise_shop_path(@order.distributor)}#/shop", class: "button expand" do %i.ofn-i_008-caret-left = t(:order_back_to_store) - else