Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
is it possible to add custom fields to the billing address?
I would need to add the "taxnumber" as a mandatory field.
In terms of just literally adding extra fields, you can store whatever you want in an orders properties collection, so if you need to store your tax number, you can store that in a custom property on the order.
I'm guessing there is more to this question than this though and you might be referring to showing it in the back office, or you might be referring to capturing the extra field with Vendr Checkout.
If you need further info, please clarify where / how you wish to use that property.
thanks for your immediate reply.
Yes, I would need to display it in various places:
1) You can't extend Vendr.Checkout with custom properties. It is meant as a simple drop in solution for people that need a quick setup. As soon as you need anything custom, you'll need to create your own checkout flow. You can use the Vendr.Checkout source as a basis though as this is all on GitHub https://github.com/vendrhub/vendr-checkout. Essentially though, you'll need to add an extra field to capture "taxnumber" and then when you call AddProduct on the order, you'll pass this through as an additional property ( https://vendr.net/docs/core/1-4-0/reference/vendr-core/orderextensions/#addproduct-3-of-8 ).
2) We don't have a way to extend the customer details dialog, but what you can do, and what we do on our vendr site is to display these extra properties in the "Addition Info" section in the bottom right hand side of the order edit screen. These can be added to using the order editor config file documented here https://vendr.net/docs/core/1-4-0/key-concepts/order-editor-config/ (You'll want to read this generally, but the bit specific to Additional Info is under the heading Additional Info Config Options)
3) Assuming you are using the Vendr.Checkout OOTB email templates, again, you'll need to swap these for custom ones. You can copy the ones from Vendr.Checkout and update these to output the extra property you have captured. All emails have access to the order entity and so you can access the custom property you capture in it's properties collection. You can then render that out however you see fit.
Hope this helps
1) do I need to uninstall vendr-checkout nuget package and instead add the Vendr.Checkout.csproj project to my Visual Studio solution?
2) "Addition Info" section is fine for me
3) I think I will manage to do so
You could fork the code for the Vendr.Checkout project and update this independently. You could then use it's build script to generate a bespoke package that you could then install over the top of the existing Vendr.Checkout package. I believe this should do the trick.
Thank you Matt.
Works as described!
Have a nice day.
Glad to hear you got it all working 👍
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted