On Umbraco 8 , I'm looking at creating a Member and some other logic while using the Vendr Checkout Plugin.
Currently I'd like the user to create an account upon entering their contact information.
At the /checkout/customer-information page I'd like to add a password field in the VendrCheckoutInformationPage.cshtml, I can see the form and it posts to UpdateOrderInformation in VendrCheckoutSurface.
I assume I'm hooking into the save/update event here? Normally I'd of sone all this manually but with Vendr Checkout im unsure where I need to be hooking into the update events for UpdateOrderInformation.
Anyone able to point me in the right direction here please?
When you say add a password field, is this just for creating the member account?
If so, I think personally I'd be tempted to add it on the Comfirmation page and have something like "Enter a password to come back to your order later". You can then have that form post to your own custom SurfaceController passing the order ID and the password then you can extract the customer email from the order and setup the member accordingly.
This would save you having to modify the Vendr Checkout stuff.
Failing this, you may need to pull the source for Vendr Checkout and run on a custom codebase modifying the customer details controller to add the member logic in.
Thanks, yeh just been looking at the OrderSavingNotification so good to know I was in the right area.
Hopefully I can do it at the end of the checkout as the rest seems a bit long winded to do especially with the ETC I've been given to implement the feature.
Vendr Checkout only knows how to handle the properties it was built for so if you are adding new prooperties you'll need to also extend the controller to handle this extra property.
Currently the only real way to do that is to build a custom build of the package with a modified controller.
Realisticly, as soon as you need something that Vendr Checkout doesn't do, you'll likely want to use a custom checkout flow / custom build.
Create Member - Vendr Checkout
Hi
On Umbraco 8 , I'm looking at creating a Member and some other logic while using the Vendr Checkout Plugin.
Currently I'd like the user to create an account upon entering their contact information.
At the /checkout/customer-information page I'd like to add a password field in the VendrCheckoutInformationPage.cshtml, I can see the form and it posts to UpdateOrderInformation in VendrCheckoutSurface.
I assume I'm hooking into the save/update event here? Normally I'd of sone all this manually but with Vendr Checkout im unsure where I need to be hooking into the update events for UpdateOrderInformation.
Anyone able to point me in the right direction here please?
Hi Neil,
When you say add a password field, is this just for creating the member account?
If so, I think personally I'd be tempted to add it on the Comfirmation page and have something like "Enter a password to come back to your order later". You can then have that form post to your own custom SurfaceController passing the order ID and the password then you can extract the customer email from the order and setup the member accordingly.
This would save you having to modify the Vendr Checkout stuff.
Matt
Hey Matt
Thanks for answering so quickly.
Ah yes, I have normally done that before, wait until the user is at the confirmation page stage and then create them as a member from there.
However, I'm assigned a ticket that asks to create the member where they fill out their email address, password and first and last name.
I'll ask for clarity on it. But yeh it does seem easier to do at the end of the checkout through a custom surface controller.
If it isn't, what would be the approach to hook into the contact information save event from the vendr checkout?
Hey Neil,
You can find details on hooking into events here https://vendr.net/docs/core/2.1.0/umbraco-v8/key-concepts/events/ So you could try listening for
OrderSavingNotication
and see if you can get what you need from there to create the member.Failing this, you may need to pull the source for Vendr Checkout and run on a custom codebase modifying the customer details controller to add the member logic in.
Matt
Hi
Thanks, yeh just been looking at the
OrderSavingNotification
so good to know I was in the right area.Hopefully I can do it at the end of the checkout as the rest seems a bit long winded to do especially with the ETC I've been given to implement the feature.
Thanks again buddy!
Hey Matt
Im wanting to add in the 'Password' field into the VendrCheckoutInformationPage.cshtml is it a case of just adding the following:
And then maybe call:
This would be in
Is there anything else i need to do to tell it to save this property against the order?
Hey Neil,
Vendr Checkout only knows how to handle the properties it was built for so if you are adding new prooperties you'll need to also extend the controller to handle this extra property.
Currently the only real way to do that is to build a custom build of the package with a modified controller.
Realisticly, as soon as you need something that Vendr Checkout doesn't do, you'll likely want to use a custom checkout flow / custom build.
Yeh, thought that might be the case reading through the Doc's. I think we have gone down the Vendr Checkout route as a quick win.
But I think we're trying to do too much with it and at this stage, we're going to have to go a custom route I think as more features get requested.
Thanks tho, It just confirms what I probably already knew :)
is working on a reply...