I TC 2.2 that functionality was removed and moved to the settings area of the store where you can specify what order line properties that makes an order line unique. So that is where you specify that.
Hey, I might be stupid but I cant figure out how to do this. I want that every product I add should get a separate orderline. So Ive set "Product property aliases unique" to "sku", like this. what am I missing?
If you add a product with the same SKU then they are not unique. So you need to have a property at your order lines that make it unique and then use that property alias as the unique property alias setting. Maybe you could add a Guid as a property with the name "makeUnique". That should do the trick.
I'm running into a similar issue, does the property that is unique have to exist on the product itself, or can it be passed in as a property in the form data at the time the form is submitted? (As I have tried that and I can't seem to get it to split the orderlines).
The property making the order line unique can be anything. It does not have to come from the product. Your can add your own properties to the orderline using the AddOrUpdateOrderLine method. Read more about it here:
Thanks Rune, you pushed me into the right direction, we were passing the unique field as an argument, but instead it needed to be part of the orderline properties. Now it seems to be working great :)
isUnique not creating separate order line
I add to my orders via the HTML-API like this:
It doesn't create unique order lines. I've checked the DB. It just adds to the quantity. What am I missing?
Hi Kasper
I TC 2.2 that functionality was removed and moved to the settings area of the store where you can specify what order line properties that makes an order line unique. So that is where you specify that.
Sorry for not updating the documentation
Ah alright, nice. That is actually pretty neat (in my case anyways). Great new feature! Thanks alot.
Anders the 'Product property aliases' setting. What is that for?
That is properties that is automatic copied from the Umbraco node to the Tea Commerce order line.
Perfect. I just separate them with a comma?
yes
Hey, I might be stupid but I cant figure out how to do this. I want that every product I add should get a separate orderline. So Ive set "Product property aliases unique" to "sku", like this. what am I missing?
If you add a product with the same SKU then they are not unique. So you need to have a property at your order lines that make it unique and then use that property alias as the unique property alias setting. Maybe you could add a Guid as a property with the name "makeUnique". That should do the trick.
Kind regards
Anders
Hi Anders,
I'm running into a similar issue, does the property that is unique have to exist on the product itself, or can it be passed in as a property in the form data at the time the form is submitted? (As I have tried that and I can't seem to get it to split the orderlines).
Hi Tom,
The property making the order line unique can be anything. It does not have to come from the product. Your can add your own properties to the orderline using the AddOrUpdateOrderLine method. Read more about it here:
http://documentation.teacommerce.net/html-api/order-line/addorupdateorderline/
/Rune
Thanks Rune, you pushed me into the right direction, we were passing the unique field as an argument, but instead it needed to be part of the orderline properties. Now it seems to be working great :)
is working on a reply...