Let customer checkout as guest but provide them an option to type password and create account if desired on order succes
Posted: Sat Jun 06, 2020 9:23 pm
I am requested to make an extension for opencart version 2.2 that allow the customers to checkout as guest by default (without giving them an option to checkout as guest or register an account). And if the customer completes all the checkout steps and land on order success page only then he should be given an option to create an account by providing a password only if he so desired. (i.e he doesn't need to re-type all fields he typed to checkout as guest again just to create an account on the store, instead he only need to provide the password to access the account and other fields should be fetched from data he already entered during checkout as guest)
And if he doesn't want to create an account he can leave it as it is without typing any password and his order should be treated as complete but as a guest though.
any idea how to implement this?
If I use $this->customer->addCustomer($data) function then I can create an accountbut my concern is how to pass guest data to this function on thank you page /order success page?
I will really appreciate if any great master can help me with it.
And if he doesn't want to create an account he can leave it as it is without typing any password and his order should be treated as complete but as a guest though.
any idea how to implement this?
If I use $this->customer->addCustomer($data) function then I can create an accountbut my concern is how to pass guest data to this function on thank you page /order success page?
I will really appreciate if any great master can help me with it.