Custom Order Line property

TeaCommerce v3.1? ( not totally sure how to check).

I want to add a custom property to either every order line, or specific ones if that isn’t more complicated.

I’ve tried looking through the docs on the TeaCommerce website and couldn’t find any help. I’ve also Google’d it and haven’t found a definitive answer.

There is a process that happens after the order has been made. Once that process has completed, I need to record the result on some, but not necessarily all, order lines.

I then need to be able to retrieve the “result” to show it in the admin / order details page. I also need to be able to check it at other times / places in the website.

I’ve seen mention of adding the field alias on the “Store → Product Tab → Product property aliases field”. Does that add the field to all order lines? What about existing orders?

It’s fine for the field to be there all of the time, on all order lines.

Do I then just reference it in the same way as a normal property?

orderLine.Properties["propertyAlias"]

Can I set the value using the Javascript API? (Do you have an example?)


This is a companion discussion topic for the original entry at https://our.umbraco.com/forum/94031-custom-order-line-property