Get order object via tea commerce 2 javascript API
Hi,
I'm trying to write out a custom property from the Tea Commerce order via the javascript API. I'm starting by creating an 'order' object, which I should then be able to get the properties from. I thought this would work:
$(function(){
var currentOrder = TC.GetCurrentOrder( _storeId );
});
But it gives an error: 'Uncaught TypeError: Object #<Object> has no method 'GetCurrentOrder''.
Get order object via tea commerce 2 javascript API
Hi,
I'm trying to write out a custom property from the Tea Commerce order via the javascript API. I'm starting by creating an 'order' object, which I should then be able to get the properties from. I thought this would work:
But it gives an error: 'Uncaught TypeError: Object #<Object> has no method 'GetCurrentOrder''.
Can anyone point me in the right direction here?
Thanks
The store id needs to be parsed as a JSON property list. So try this:
TC.getCurrentOrder({storeId:_storeId})
Kind regards
Anders
is working on a reply...