0

I am using Drupal 7 and the Drupal Commerce module. I need the ability to create an order as administrator user and let users continue with the checkout. What I have tried:

Do you have any idea?

0

Could you create a new "shopper" user for this customer, then assign the order to them? Make sure the role has proper permissions, workflow, etc. But then they will be the owner of the order and should be able to complete payment (and all the other checkout features like confirmation email).

0

The only way this can work by default is when you create an order for an existing user and ensure they login prior to attempting to access the form. However, I doubt you should be directing them to the payment page - that page has special logic attached to it that may not make it the ideal point of direction. Much better to send people to the checkout page that actually has the payment checkout pane on it.

If you want to link customers to the checkout form and ensure they're logged in, use a URL like:

https://www.example.com/user/login?destination=checkout/##

If the customer is already logged in, they will be redirected to the checkout form without any issues. If they aren't, they will be prompted to log in. The order ## must match an order that you have assigned to their user account in order for them to then view checkout for that order.

For a customer who does not yet exist in your system, you'll have to create an account for them first and ensure they can access it. There may be a contributed module out there that would let you include a token or something in the URL to grant anonymous access to the order, but I've never heard of it. It's theoretically possible through hooks Commerce offers, I've just never heard of anyone developing it.

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.