The last order ID, which is set on the checkout session, is never cleared. Hence, Mage::getSingleton('checkout/session')->getLastRealOrderId() always returns the last real order ID if the user ordered in his current session. Hence, we track the order again and again if the user keeps visiting other pages after checkout success.
This PR makes sure that the order is only tracked on the checkout success page.
The last order ID, which is set on the checkout session, is never cleared. Hence,
Mage::getSingleton('checkout/session')->getLastRealOrderId()
always returns the last real order ID if the user ordered in his current session. Hence, we track the order again and again if the user keeps visiting other pages after checkout success.This PR makes sure that the order is only tracked on the checkout success page.