0

I have a Drupal Commerce 7 installation which isn't firing the Completing the checkout process event.

Steps I've tried:

  • I've rebuilt Rule's cache
  • I've rechecked the integrity of the rules
  • I've set "Log debug information to the system log" (Log all warnings and errors)
  • I've disabled all of the rules bound to the event "Completing the checkout process"
  • I've created a new rule, which will only send an email.

However, the e-mail is never sent and I don't see the rule being written on the log.

I've tried to submit correctly the order in the storefront (with a "normal" user and with an Admin user).

I've tried to use different types of payment.

I've tried to change the order status to "Checkout complete" in the Backoffice.

What else I'm missing? What's making this event not firing?

Based on others posts, I've checked the rules for other events and realized there's a rule "Commerce order message: changing status", for the event "After updating an existing commerce order". It has the following actions: Creates new entity Message Type Commerce Order: state change of the order Set a data value message:message-commerce-order = commerce-order Set a data value message:arguments:order-status = [commerce-order:status-title] Set a data value message:arguments:order-status-previous = [commerce-order-unchanged:status-title]

However, this doesn't seem to be responsible for the event never firing, or is it?

Can anybody help me and shed some light on this?

This is the Rules debug information I get, after changing the Order status to Complete, directly on the Backoffice:

Rules debug information: " Reacting on event After updating an existing commerce order.

0 ms Reacting on event After updating an existing commerce order.
11.574 ms Evaluating conditions of rule Delete shipping line items on shopping cart updates. [edit]
13.432 ms The condition data_is evaluated to FALSE [edit]
13.442 ms AND evaluated to FALSE.
13.546 ms Evaluating conditions of rule Commerce order message: changing status. [edit]
14.047 ms The condition data_is evaluated to FALSE [edit]
14.057 ms AND evaluated to TRUE.
" Rule Commerce order message: changing status fires. [edit]
    0 ms Rule Commerce order message: changing status fires.
    6.493 ms Evaluating the action entity_create. [edit]
    7.441 ms Added the provided variable message of type message [edit]
    9.105 ms Evaluating the action data_set. [edit]
    24.349 ms Evaluating the action data_set. [edit]
    26.206 ms Evaluating the action data_set. [edit]
    26.454 ms Rule Commerce order message: changing status has fired.
40.578 ms Saved message of type message.
46.594 ms Finished reacting on event After updating an existing commerce order.

Still no information regarding the firing of "Completing the checkout process" event...

2
  • On the order edit page, there is a link "Simulate checkout completion". Does your Rule fire then? Also do you see any errors in the Drupal log, or in the server php error log? Commented Jun 9, 2018 at 1:16
  • Manually updating the order status to completed does not fire the event in question. Another follow-up question to the one above and Pierre's advice below is what payment gateway are you using? That could be the culprit. Commented Jun 13, 2018 at 4:05

1 Answer 1

1

Debugging is the art of eliminating possible causes for an issue. In this case, your issue could be because ... your rule is disabled.

As per the 'I've disabled all of the rules bound to the event "Completing the checkout process" ...', double check that the rule you want to fire is (still) enabled. If it isn't, then make sure to enable it (again).

Also, your question states "the e-Mail is never send": it could well be because something (different from your rule not firing) is wrong. So therefor, add an extra Rules Action to the rule you're struggling with, as the very first Rules Action, and which is only to "show a message on the site"", and with a message like "Bingo" (or whatever). Then rerun your testcase, and verify if you do get such "Bingo":

  • If you do, your rule has fired ... and your real issue is related to sending the eMail.
  • If you don't, (temporary) remove ALL Rules Conditions in your rule and retry. If in that case you do get a "Bingo", then your issue is related to one or more of your Rules Conditions (though the rule did fire).

The above is how I typically do most of my Rules debugging, in cases where some rule seems to not fire (stupid, but pretty effective).

If none of the above debugging tips helps ... then edit your question and include an export of the rule you are debugging (in that case I might further improve my anwer).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.