Another small one, and its properbly just another syntax frack up from my part.
I want to add a property to a unique orderline using the JS API.
Here im just using the the "properties" edition of the "update" functions
var formObj = {"giftwrap": "true" }; TeaCommerce.updateUniqueOrderLineProperties(1168, 134, formObj,false );
The numbers are just hardcoded for testing and is ofc right.
But when i call getOrder again no new properties have been added to the orderline. I know im using the "update" function since i couldnt find an "addUniqueorderlineproperties" function. Gussing this could have something to do with it ?
Adding unique orderline properties with JS
Hey again : )
Another small one, and its properbly just another syntax frack up from my part.
I want to add a property to a unique orderline using the JS API.
Here im just using the the "properties" edition of the "update" functions
The numbers are just hardcoded for testing and is ofc right.
But when i call getOrder again no new properties have been added to the orderline. I know im using the "update" function since i couldnt find an "addUniqueorderlineproperties" function. Gussing this could have something to do with it ?
Might be because you are trying to write your code against the old javascript API. What version of Tea Commerce are you using?
The method looks like this:
TeaCommerce.updateUniqueOrderLineProperties(nodeId, orderLineId, propertyList, settings);
So everything but the false looks right.
/Rune
im running 1.4.3.1
Its returning "null" but nothing is added.
That one is my fault. The documentation is wrong. This is what the method REALLY looks like:
I will fix the docs tomorrow!
/Rune
That is no problemo champ it can happen :)
I will test this tomorrow
And it works :) I will mark your doc update as solution
and my code looks like this now
TeaCommerce.updateUniqueOrderLineProperties(134, formObj)
Fantastic. And I have updated the documentation. Good thing you found the problem.
/Rune
Hey Rune
Another quicky here how do i remove the property from a line again ? There is no function for it.
So far i tried an empty string or "null" or a 0 as value but nothing removes the property
You can't. You can set the value to empty.
/Rune
Okay doky yea i made a work around with true/false values put inside.
But thx for clearing it for me :)
is working on a reply...