How do I add custom properties to the order such as AddressLine2 and Title? I've looked through old posts but couldn't figure it out - they were all very old posts, so not sure if it's a different process now.
So you just add them the same as any other properties? I had tried that before posting and it didn't seem to work, so I thought there must be more to it.
Will have a look again, I must have missed something.
The documentation is for the latest version of Tea Commerce, so be sure to run that :)
But it should work as that code works on the demo site that is online at demo.teacommerce.net
Custom Order Properties
How do I add custom properties to the order such as AddressLine2 and Title? I've looked through old posts but couldn't figure it out - they were all very old posts, so not sure if it's a different process now.
Thanks
You can use the HTML, Razor or JavaScript API to do it. Normally it would be done in a cart step using the HTML API or JS API with client validation.
https://documentation.teacommerce.net/html-api/order-property/addorupdateorderproperties/
https://documentation.teacommerce.net/javascript-api/order-properties/addorupdateorderproperties/
https://documentation.teacommerce.net/razor-api/order-property/addorupdateorderproperties/
Kind regards
Anders
So you just add them the same as any other properties? I had tried that before posting and it didn't seem to work, so I thought there must be more to it.
Will have a look again, I must have missed something.
The documentation is for the latest version of Tea Commerce, so be sure to run that :) But it should work as that code works on the demo site that is online at demo.teacommerce.net
I must have had a typo in the first attempt, this is working great now.
is working on a reply...