1

I created a custom step checkout after payment step.

This new step calls "Resume Order".

In that step, I need to show the selected shipping address, selected payment method.

I know that checkout is built with js, so how can I get all the previous selected items from shipping, payment and cart?

The step is already created like magento documentation

So, how to bring previous selected data from previous checkout steps?

Khoa TruongDinh
  • 32,054
  • 11
  • 88
  • 155
Diego Queiroz
  • 401
  • 4
  • 15

1 Answers1

0

See the sidebar code. It's a good example.

vendor/magento/module-checkout/view/frontend/layout/checkout_index_index.xml

vendor/magento/module-checkout/view/frontend/web/js/view/summary

Example:

1) Get Payment from quote Magento_Checkout/js/model/quote: quote.paymentMethod(). See here: vendor/magento/module-checkout/view/frontend/web/js/action/select-payment-method.js

2) Shipping Address and Billing Address: quote.billingAddress() and quote.shippingAddress().

3) Quote items data: quote.totals().items

Can read more here: https://magento.stackexchange.com/a/133732/33057

Khoa TruongDinh
  • 32,054
  • 11
  • 88
  • 155