Update responses to use cable_ready

This commit is contained in:
Matt-Yorkley
2021-08-16 16:21:18 +01:00
parent 7fa9457550
commit 03abc395f2
3 changed files with 10 additions and 6 deletions

View File

@@ -8,6 +8,7 @@ class SplitCheckoutController < ::BaseController
include OrderStockCheck
include Spree::BaseHelper
include CheckoutCallbacks
include CableReady::Broadcaster
helper 'terms_and_conditions'
helper 'checkout'
@@ -25,7 +26,10 @@ class SplitCheckoutController < ::BaseController
redirect_to_step
else
flash.now[:error] = I18n.t('split_checkout.errors.global')
render :edit, status: :unprocessable_entity
render operations: cable_car.replace(
selector: "#checkout", html: render_to_string(partial: "split_checkout/checkout", formats: [:html])
), status: :unprocessable_entity
end
end

View File

@@ -0,0 +1,4 @@
%checkout.row#checkout
.small-12.medium-12.columns
= render partial: "split_checkout/tabs"
= render partial: "split_checkout/form"

View File

@@ -19,10 +19,6 @@
.sub-header.show-for-medium-down
= render partial: "shopping_shared/order_cycles"
%checkout.row
.small-12.medium-12.columns
= render partial: "split_checkout/tabs"
= render partial: "split_checkout/form"
= render partial: "checkout"
= render partial: "shared/footer"