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?

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.