In my ecommerce implementation I am utilising the Vendr Checkout plugin, however the site I am creating has a separate booking form, so I am capturing first name, last name, email address and address details in that form, the thing I can't work out is how to set the following properties as they seem to be read only when creating the order?
CustomerInfo.FirstName
CustomerInfo.LastName
CustomerInfo.Email
Basically I want to make some of the above fields on the first page of the Vendr Checkout page to be readonly.
Lastly I may need to be able to adapt the Vendr checkout process further, so I was wondering if the source code for that plugin is available to adapt?
These fields are all managed from the orders Properties collection, those are just the only fields we need to expose in a way that Vendr needs to have access to them.
So to set them you would do it via the properties collection order.SetProperty("firstName", customerFirstName); The expected property aliases are "firstName", "lastName" and "email". These are available as constants in the Vendr.Core.Constants.Properties.Customer namespace.
Regarding the source code, yes, the Vendr.Checkout package is fully open source and can be accessed from our GitHub account here https://github.com/vendrhub/vendr-checkout
CustomerInfo attributes
Hey Matt,
In my ecommerce implementation I am utilising the Vendr Checkout plugin, however the site I am creating has a separate booking form, so I am capturing first name, last name, email address and address details in that form, the thing I can't work out is how to set the following properties as they seem to be read only when creating the order?
Basically I want to make some of the above fields on the first page of the Vendr Checkout page to be readonly.
Lastly I may need to be able to adapt the Vendr checkout process further, so I was wondering if the source code for that plugin is available to adapt?
Thanks in advance.
Graham
Hi Graham,
These fields are all managed from the orders Properties collection, those are just the only fields we need to expose in a way that Vendr needs to have access to them.
So to set them you would do it via the properties collection
order.SetProperty("firstName", customerFirstName);
The expected property aliases are "firstName", "lastName" and "email". These are available as constants in theVendr.Core.Constants.Properties.Customer
namespace.Regarding the source code, yes, the Vendr.Checkout package is fully open source and can be accessed from our GitHub account here https://github.com/vendrhub/vendr-checkout
Hope this helps
/Matt
Thanks Matt,
A very prompt and useful reply as always, the properties are now being set as I want and thanks for sending me the link to github for Vendr Checkout
Graham
is working on a reply...