The following default Rules should cover the needs of checkout and do away with most of the checkout settings.
- If an anonymous user checks out with an existing e-mail address... change the order and customer profile(s) to point to the uid. Associate this uid with the referenced customer profiles.
- If an anonymous user checks out with a non-existent e-mail address... create a new user with status settings and notification e-mails matching the current registration settings. Associate this uid with the order and with the referenced customer profiles.
- Send an order invoice e-mail - can a user even view their own orders yet? - and/or an administrator notification for the order.
Comments
Comment #1
rszrama commentedComment #2
rszrama commentedOk, the latest patches in #1044342: Errors creating and using newly created entities in rules make the rule to create new user accounts during checkout possible. If the 1044342_save_original_wrapper.patch isn't committed, the rule will need modification to load the user after saving it to get the new uid for the subsequent actions.
I also added in a simple e-mail notification for the new order with a link to the order's customer view page.
Comment #3
BenK commentedSubscribing
Comment #4
rszrama commentedTo get around #1044332: Define the status property for the core user and comment entity, I've also added a definition for the user status property via the alter hook in a way that will not interfere once the Entity module starts defining it itself.
To get around the remaining issue with #1044342: Errors creating and using newly created entities in rules, I've changed the Rule to load the newly created user account immediately after creating it and using that fetched account to set the uid of the order. Unfortunately, we still need fago's patch in comment 6 to get committed. Once that happens, I can now default this rule to enabled and close this issue.
So, to test this, all you should need now is this patch: http://drupal.org/node/1044342#comment-4069856
Comment #5
rszrama commentedAnd it's committed. Yay!