0

The default behavior for Drupal Commerce is that an anonymous user get's registered only after the checkout process completes and an order is paid in full. I am trying to create a new checkout rule to register an user just after he/she enters his/her e-mail address, but failing to find the right rule on admin/config/workflow/rules/reaction/manage/rules_sd/add/event.

I have modified my checkout flow, so that a user can enter his/her e-mail at the first step like shown in the screenshot:

Checkout workflow

Unfortunately, there is no rule something like "After entering an e-mail". Does anyone have a suggestion how to overcome this problem?

enter image description here

On /admin/commerce/config/checkout/rules it says:

When a customer advances to the checkout completion page, rules reacting on the Completing the checkout process are evaluated. Default rules handle standard tasks like updating the order status, sending order e-mails, and creating accounts for anonymous users. You can edit these or add additional rules to customize your checkout workflow.

Does this mean I can't trigger any actions until checkout completes? Not very much convenient if so.

Edit: I've also found this somewhat similar discussion: How to force account creation before commerce checkout is complete?

1 Answer 1

0

If you are wanting to do something during the checkout process, your best bet is to use a hook_form_alter() on the checkout forms and add your own submit handler. In this case you're looking at the commerce_order_account_pane. Remember that panes are fieldsets within a per-page form, so you'll want to look for the router page form and put your submit handler there.

1
  • Thanks, but I am afraid your suggestion is out of my technical skills. Do you think I need to code a custom module? Mind giving some more details?
    – Nick
    Nov 27, 2015 at 18:47

Your Answer

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

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