3

At present in Magento 2 Checkout there are two ways you can place the order.

  1. Guest user
  2. Current logged in user

I have the following requirement from one of our client that add the following feature for one customer group under the checkout.

Step 1. they can search for customers or create customer account.

Step 2. Add/choose (if already have shipping address)

Step 3. Placed order for that customer.

Suppose I have customer with id 3 and I want to place an order for customer with id 4, Whereas checkout only allows order placement as a guest or with current logged in user

How is that possible because checkout uses the customerData storage which keeps the information of current logged in user. same for quote

1

I think, is it not a good idea that placing an order on behalf of other customers. I guess that It might be the issue with the security of the user.

Magento does have not any feature like placing the order of a customer another customer account from frontend. So, you have to build your module your self.

In such, I suggest to user rest API. Rest API does not depend on customer authentication. .

1

Install Magento b2b module Add company and users Within company one customer place another customer order

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.