0

I tried to follow the example on how to create quote and order from the following URL: http://webkul.com/blog/create-quote-and-order-programmatically-in-magento2/.

I notice that from line 50 to 58 of the code, it will create a customer entity and save it. However, is that really necessary to do it if the customer is a guest that would not have a login credential?

Also what would it mean if a customer pay as a guest but already have login account with the same email? Would the order be linked?

Thank you,

2 Answers 2

1

It is not necessary to create customer account, You obviously can proceed with guest but more important thing is this script is meant for programmatically creating order so it is totally dependent on your requirement whether you will be creating order for existing customers or as guest else Magento already has it's existing order functionality which it follows during checkout.

1

No, creating a customer account is not necessary to order (unless you have Magento configured to disable guest checkout).

If you submit a guest order, it will remain a guest order. It will not be linked to any existing customer account that might exist.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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