"Checkout complete page is viewed" event on the Rules dropdown box

Experimental project

This is a sandbox project, which contains experimental code for developer use only.

Add a "Checkout complete page is viewed" event, so a Drupal Commerce 7.x site builders can trigger various actions exactly at this point of the checkout process.

Creation of this module is prompted by the fact that built-in Commerce Checkout sub-module "Completing the checkout process" or "When an order is paid in full" event does not always stay alive when a user returns back from a payment provider site. That`s because these events are triggered BEFORE redirection to a drupal site and this is the right behaviour in order to make sure the order is paid and we can proceed with the checkout. But the problem is that payment providers may differently handle redirection process and do it in a multi-step manner making events in the question dead for the moment user sees our "Checkout complete" page.

For those using Commerce Immediate Login module there is an exported rule in the README file enabling to log in user when he/she completes their first (and only) purchase on the site. You can add your own actions to this rule, for example - redirect user to your custom checkout complete page or whatever.

Note that "NOT[commerce-order:owner:created], Operator: is lower than, Data value: now -3 minutes" condition is added of the security implication, because user may have previous orders on the site but never logged in before which is at their discretion whether to return back (log in) on your drupal site or not and there may be a case when an order is paid by another user who is NOT actually the owner of the account for which the order is assigned. I`ve made it possible automatically to log in not later than 3 minutes after a new account for an anonymous user was created (when "Completing the checkout process" event is triggered). Change this value if you need to.

For more information check this issue.

Project information

  • caution Minimally maintained
    Maintainers monitor issues, but fast responses are not guaranteed.
  • caution Maintenance fixes only
    Considered feature-complete by its maintainers.
  • Project categories: E-commerce
  • Created by drugan on , updated