Create Event to prompt user account creation after purchase
Permalink
Hello everyone,
I've posted over in ecommerce to see if it was possible to have an option to enter a password after completing a purchase in order to create a new user account.
For example, after purchase, the next page would say thank you for your purchase and then say something like:
Would you like to create an account? Just enter a password in the field below:
[insert password field]
Then the account would automatically set the username as the email address that was provided earlier in the checkout process and input the previous order details in their account.
--
I was told that this is possible through creating an "event" with the core_commerce_on_checkout_finish_order.
However, after reviewing:
https://www.concrete5.org/documentation/developers/system/events...
I'm unsure exactly what I need to add to the site_events.php file.
--
Something like:
Any assistance with teaching me how this can be accomplished would be truly appreciated, as I'd really like to learn and understand how this is done.
Thank you,
-concreteart
I've posted over in ecommerce to see if it was possible to have an option to enter a password after completing a purchase in order to create a new user account.
For example, after purchase, the next page would say thank you for your purchase and then say something like:
Would you like to create an account? Just enter a password in the field below:
[insert password field]
Then the account would automatically set the username as the email address that was provided earlier in the checkout process and input the previous order details in their account.
--
I was told that this is possible through creating an "event" with the core_commerce_on_checkout_finish_order.
However, after reviewing:
https://www.concrete5.org/documentation/developers/system/events...
I'm unsure exactly what I need to add to the site_events.php file.
--
Something like:
Events::extend('core_commerce_on_checkout_finish_order', '...
Any assistance with teaching me how this can be accomplished would be truly appreciated, as I'd really like to learn and understand how this is done.
Thank you,
-concreteart
Anything?
I believe as it is, you can force customers to login before they are able to make a purchase. Might not be what you're looking for but its a thought !!
Here is an example of how the concrete wall add on can be integrated with core actions on a site. Gives you an idea what needs to be done...
https://gist.github.com/jamesshannon/4356289...
https://gist.github.com/jamesshannon/4356289...
Thank you enlil, I will take a look. I just do not want to force people to login prior and rather leave it as an option after purchase.
I just poked around a bit and see an "easy" option available. Visit dashboard > full sitemap. click to show system pages and add a block prompting account creation to the "finish" page ;)