I can see in the console all the properties being posted, and the order is saved just fine, but I don't see the extra info anywhere. Can you please tell me what I'm doing wrong?
If I add the "discountCode" property to my code - then the property is added and has the value of "code". So that one is working as well. Try and cut into it works and then you know which line is making funny business with you :)
To implement discount code you can add the codes as nodes. Then when the code is added - you use the Tea Commerce event system to get notificed of the properties has changed. Now validate the code and if its valid - add a order property that is server side only with the discount. Now use that discount percent in a custom order calculator to change the pricing. http://our.umbraco.org/projects/website-utilities/tea-commerce/tea-commerce-support/40731-Pricing-based-on-quantity?p=0
If you use FireFox and FireBug - then your console will show you all the javascript posts and the response. Then click the JSON tab and you see the JSON returned and can click through the order object. There you have the properties and their values etc.
That is because the Razor file that show the order isnt showing custom properties that you add. You can just change the Razor file in the Scripts(razor)/tea-commerce/edit-order.cshtml. Thats simple :)
Remember to update to the latest Tea Commerce. Think we removed the "serverSideOnly" attribute from teh JSON result :)
Yes! That was it! I've edited edit-order.cshtml and the custom properties are actually working fine.
The Tea Commerce package I use is from Tea Commerce 2.1.1.zip but I checked the value of the versions of the dlls and it still says 2.0.0. Don't know if that's a problem or not.
Ahh - that is because its a thing i fixed in 2.1.2 :)
The dll will always have 2.0.0 in its version because of some copilation stuff in .NET and references to dll files. So the right version is to see in the Umbraco admin and then see install packages.
Custom properties issue
Hello,
I'm using the Javascript API to add the address and shipping info, but I need some other properties as well. This is what I've tried:
I can see in the console all the properties being posted, and the order is saved just fine, but I don't see the extra info anywhere. Can you please tell me what I'm doing wrong?
Thanks!
Hi
I just ran this code - and properties was added just fine - used FF and FireBug
Kind regards
Anders
Hi Anders,
Yes, firstName and lastName are fine. It's the others, "twitter", "discountCode" that are missing.
By the way, can you please give me a quick tip on how to implement discount codes?
Thanks a lot!
If I add the "discountCode" property to my code - then the property is added and has the value of "code". So that one is working as well. Try and cut into it works and then you know which line is making funny business with you :)
To implement discount code you can add the codes as nodes. Then when the code is added - you use the Tea Commerce event system to get notificed of the properties has changed. Now validate the code and if its valid - add a order property that is server side only with the discount. Now use that discount percent in a custom order calculator to change the pricing.
http://our.umbraco.org/projects/website-utilities/tea-commerce/tea-commerce-support/40731-Pricing-based-on-quantity?p=0
Kind regards
Anders
Thanks, I understand the discount workflow. That's pretty much what I had in mind, just didn't do my homework :) Thanks!
Where should I be seeing these custom properties in the Tea Commerce section? Maybe I'm just looking at it wrong...
If you use FireFox and FireBug - then your console will show you all the javascript posts and the response. Then click the JSON tab and you see the JSON returned and can click through the order object. There you have the properties and their values etc.
Kind regards
Anders
I do see them in the JSON response (though in Chrome):
But I don't see them saved anywhere in the Tea Commerce section.
That is because the Razor file that show the order isnt showing custom properties that you add. You can just change the Razor file in the Scripts(razor)/tea-commerce/edit-order.cshtml. Thats simple :)
Remember to update to the latest Tea Commerce. Think we removed the "serverSideOnly" attribute from teh JSON result :)
Yes! That was it! I've edited edit-order.cshtml and the custom properties are actually working fine.
The Tea Commerce package I use is from Tea Commerce 2.1.1.zip but I checked the value of the versions of the dlls and it still says 2.0.0. Don't know if that's a problem or not.
Thanks a lot for helping me, Anders!
Ahh - that is because its a thing i fixed in 2.1.2 :)
The dll will always have 2.0.0 in its version because of some copilation stuff in .NET and references to dll files. So the right version is to see in the Umbraco admin and then see install packages.
Is 2.1.2 already available for download? I cannot find it :| Is upgrading only a matter of overwriting the dlls?
Thanks!
No it has not been released - so that is why :)
Upgrading is just installing the package again. We make sure things merge and is overwritten.
Kind regards
Anders
is working on a reply...