cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2 getLastRealOrderId not working after checkout with enabled page cache

Magento 2 getLastRealOrderId not working after checkout with enabled page cache

Hi. I created payment gateway module. What it does is to redirect after checkout to the gateway page. But while page cache is enabled the method for getting last real order id is returning null(it is used to get order id from session). When I this type of cache it is working.

Is there any way to use my module without disabling page cache? Thanks in advance.

1 REPLY

Re: Magento 2 getLastRealOrderId not working after checkout with enabled page cache

There are 2 simple steps to use your module without disabling page cache.

Please see the detailed instruction here:

[Fix It Series] Magento 2 Error: getLastRealOrderId Doesn’t Work After Checkout With Enabled Page Ca...  

[ Tigren - Elite Magento E-commerce Solutions Provider - www.tigren.com ]