I'm working on a custom module that needs to know if/when a user has aborted the checkout process. "Aborting" simply means they landed on the checkout's indexAction but didn't complete the process. It's absolutely essential that I know if/when this happens.
I was thinking maybe set a session variable that they've entered checkout. On each page load, have a block of code run that checks this variable. If true
, it will check which controller is being used. If it isn't the checkout controller, I'll know they've left.
Two problems with my idea:
- I don't have the slightest clue where to put this controller-checking code so it runs on each page load.
- I don't know how to find which controller is handling the request.
I'd greatly appreciate if you could help answer those questions, or even suggest a better approach!