• Drupal site with "Member" and "Spouse" roles.
  • For any given married couple, Member and Spouse each have their own user accounts.
  • entity reference field from spouse defines the relationship between the 2 users
  • an order exists, belonging to Member user (order->uid)

Desired functionality:

  • Regardless of the uid value for order, allow either Member or Spouse to proceed through checkout and payment for the order.

I realize this is not possible through vanilla Drupal Commerce. I'm looking for any ideas that will help me figure out how to implement this via existing Drupal techniques, or a custom module.

Specific questions:

  • Has anyone achieved this successfully?
  • Are the any specific ways (Drupal techniques) that could help solve this?
  • What specific hooks or overrides should I be looking at?

Bonus points for elegant workarounds or shortcuts like a simple hook_access override, or a clever way to just-in-time reassign the order uid.

  • Please note my minor edits ... since asking "Is there a module for it?" is not allowed, according to the rules of this site (I did not invent them ...). Even though "There is a module for it!" is allowed as an answer ... Feel free to further rephrase, etc if needed ... Good luck! Mar 10 '16 at 17:31
  • Yeah, no i give up. Posted support request to Drupal issue queue. Mar 10 '16 at 21:08
  • Already? What's the link on D.O? Mar 10 '16 at 21:12
  • drupal.org/node/2685071 Mar 11 '16 at 2:02

You may want to look at https://www.drupal.org/project/masquerade module for some ideas to see how it does the switching since it allows:

"...(anyone with enough permissions) to switch users and surf the site as that user (no password required). That person can switch back to their own user account at any time."

You can then write a custom module.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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