0

Can anyone help me with this?

I want some information from the session after order is placed. I tried customer session and even my own new session but after placing order am bot getting anything in session.

I tried to save my custom session on sales_order_save_commit_after but when am trying to fetch this get nothing

Can anyone tell me how we can fetch data from the session after placing an order. I believe everything getting reset.

1

The only way i can think of keeping the session after success would be to overwrite/extend

Magento/Checkout/Controller/Onepage/Success.php

Find:

$session->clearQuote();

Change to

//$session->clearQuote();

Not recommended what id suggest doing extend the checkout controller and create an event before clearQuote and set the session data as part of this event. and then you will be able to access all data needed through an observer

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.