Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Could I please request that the README.md file be updated to add this notation:
To avoid creation of duplicate user accounts (and perhaps even duplicate orders), be sure that the Commerce Checkout rule "Create a new account for an anonymous order" is disabled.
My apologies for not providing a patch. I'm still learning how to do that. If I'm able to figure that out before there is a solution to this request, I'll post it.
Many thanks,
Anne
Comment | File | Size | Author |
---|---|---|---|
#3 | 2776811-disable-commerce-account-rule-3.patch | 764 bytes | Kingdutch |
Comments
Comment #2
KingdutchThe attached patch is not for documentation but will actually perform the action for the user by using
hook_default_rules_configuration_alter
.Comment #3
KingdutchThe previous patch had a slight issue:
commerce_checkout_password_default_rules_configuration_alter will set the 'active' property to false on the 'commerce_checkout_new_account' rule whether that rule exists or not. Causing the following error:
Warning: Creating default object from empty value in commerce_checkout_password_default_rules_configuration_alter() (line 17 of commerce_checkout_password/commerce_checkout_password.rules_defaults.inc).
This version of the patch adds an if statement to check if the rule actually exists before disabling it.
Comment #4
cravecode CreditAttribution: cravecode commentedThanks for the followup testing @Kingdutch!
Comment #5
cravecode CreditAttribution: cravecode commentedComment #6
cravecode CreditAttribution: cravecode commented@anneeasterling and @Kingdutch,
On a fresh install of Commerce Kickstart 7.x-2.45, I can't replicate the duplicate user behavior. I've ran several test orders with "Create a new account for an anonymous order" and Commerce Checkout Password enabled, without issue.