Sha256: 5aec5cb1b18a4f51e0986e58b88389680ae77c34c6ca422f09db204153c4294d
Contents?: true
Size: 1.28 KB
Versions: 62
Compression:
Stored size: 1.28 KB
Contents
module Workarea module Storefront module Checkout class ShippingController < CheckoutsController # GET /checkout/shipping def shipping @step ||= Storefront::Checkout::ShippingViewModel.new( shipping_step, view_model_options ) end # PATCH /checkout/payment def update_shipping shipping_step.update(params) if request.xhr? updated_shipping_step_summary elsif shipping_step.complete? completed_shipping_step else incomplete_shipping_step end end private def shipping_step @shipping_step ||= Workarea::Checkout::Steps::Shipping.new(current_checkout) end def updated_shipping_step_summary Pricing.perform(current_order, current_shippings) shipping render :summary end def completed_shipping_step flash[:success] = t('workarea.storefront.flash_messages.shipping_options_saved') redirect_to checkout_payment_path end def incomplete_shipping_step Pricing.perform(current_order, current_shippings) shipping render :shipping end end end end end
Version data entries
62 entries across 62 versions & 1 rubygems