I've installed tea commerce and eventually got it to work (install this as the admin user and save yourself some headache). However now that i'm working through the example shown here i'm now getting the above js error. I've included the tea-commerce.js file and as far as i can see the code is in order. Any ideas?
Yeah - sorry for not having it more visible that is for the 1.x. The best way to see how things are done in 2.x is to download the starter kit for Tea Commerce. http://starterkit.teacommerce.net/
That is because your product need a store associated with it. Add a store picker to a parent node in Umbraco (then you only have to specifiy the store in one place). Now that will work. Be sure to pass the store id along if you dont have a JavaScript variable with the name of _storeId. http://documentation.teacommerce.net/javascript-api/order-lines/addorupdateorderline/
Again thanks your reply. As you can see from the script, I have done that which you've indicated. I've aded a store picker, I've added a macro that outputs that store id (.storeId span) and then passes that store id. The request actually shows that I am passing the store id.
Tea Commerce cant fint the store id for your node. Did you add the store picker with an alias of "store"? That is required. Try and download the starter kit and see how things are done.
TeaCommerce is not defined
Hi
I've installed tea commerce and eventually got it to work (install this as the admin user and save yourself some headache). However now that i'm working through the example shown here i'm now getting the above js error. I've included the tea-commerce.js file and as far as i can see the code is in order. Any ideas?
Thanks
Sean
Hi Sean
Did you install Tea Commerce 2? Because the blog post you is referering is for 1.x - so that might be the problem :)
The concepts are the same but some of the code should be done in slightly a different way.
Kind regards
Anders
Hi Anders
Thanks for your reply. Yes I have installed v2.1.2. I made the obvious mistake assuming the links where for the current version.
Yeah - sorry for not having it more visible that is for the 1.x. The best way to see how things are done in 2.x is to download the starter kit for Tea Commerce.
http://starterkit.teacommerce.net/
Kind regards
Anders
Ok I've found the new docs and updated my script however I know receive this js error.
Themodeldidn't have a store id associated with it - remember to add the Tea Commerce store picker to your Umbraco content tree
here is my javascript
$(function(){ $('.productAddToCart').on('click',function(ev){ var storeId = $('.storeId span').html(); var nodeId = $(this).attr('nodeid'); TC.addOrUpdateOrderLine({'productIdentifier':nodeId, 'quantity':1, 'storeId':storeId}); }); });
That is because your product need a store associated with it. Add a store picker to a parent node in Umbraco (then you only have to specifiy the store in one place). Now that will work. Be sure to pass the store id along if you dont have a JavaScript variable with the name of _storeId.
http://documentation.teacommerce.net/javascript-api/order-lines/addorupdateorderline/
Kind regards
Anders
Hi Anders
Again thanks your reply. As you can see from the script, I have done that which you've indicated. I've aded a store picker, I've added a macro that outputs that store id (.storeId span) and then passes that store id. The request actually shows that I am passing the store id.
See it here
http://www.landsharkdivers.co.uk/shop.aspx
Thanks for your patience.
Tea Commerce cant fint the store id for your node. Did you add the store picker with an alias of "store"? That is required. Try and download the starter kit and see how things are done.
Hi Anders
I've called my store alias storeId. However i've updated my code and it does appear to work now. Thanks for your assistance.
Regards
Sean
Your welcome. Hope you have loads of fun implementing your webshop using Tea Commerce
Kind regards
Anders
is working on a reply...