Class: Workarea::Storefront::Checkout::AddressesController

Inherits:
Workarea::Storefront::CheckoutsController show all
Defined in:
app/controllers/workarea/storefront/checkout/addresses_controller.rb

Instance Method Summary collapse

Methods inherited from Workarea::Storefront::CheckoutsController

#new

Methods inherited from ApplicationController

#current_layout, #current_user_info, #health_check, #layout_content

Methods included from OrderLookup

#lookup_order, #lookup_order=

Methods included from Workarea::Storefront::CurrentCheckout

#clear_current_order, #completed_order, #completed_order=, #current_checkout, #current_order, #current_order=, #current_shipping, #current_shippings, #logout

Instance Method Details

#addressesObject

GET /checkout/addresses



8
9
10
11
12
13
# File 'app/controllers/workarea/storefront/checkout/addresses_controller.rb', line 8

def addresses
  @step ||= Storefront::Checkout::AddressesViewModel.new(
    addresses_step,
    view_model_options
  )
end

#update_addressesObject

PATCH /checkout/addresses



16
17
18
19
20
21
22
23
24
# File 'app/controllers/workarea/storefront/checkout/addresses_controller.rb', line 16

def update_addresses
  addresses_step.update(params)

  if addresses_step.complete?
    completed_addresses_step
  else
    incomplete_addresses_step
  end
end