I keep getting the error:INNEREXCEPTION:System.ArgumentException: The model doesn't have a store id associated with it - remember to add the Tea Commerce store picker to your Umbraco content tree when trying to add to basket:
I've added a tea commerce store picker to my root and can see in my source it's writing out a javascript variable storeId = 1
I've had to clear out the name of the client. the webstore is under the first node under Content and is equal to the first node under Master Catalogue.
The productIdentifier was pointing to the actual product under the 'Master Catalogues' what it needed to point to was under the Website -> Catalogue -> product (this is just a doc type with a content link to the actual master product).
This now works.
Thanks for your very quick responses and pointing me in the right direction.
calling addOrUpdateOrderLine - The model doesn't have a store id associated with it - but it does!
I'm running Umbraco 6.1.3 and TeaCommerce 2.1.2
I'm following the examples on http://documentation.teacommerce.net/javascript-api/order-lines/addorupdateorderline/
I keep getting the error:INNEREXCEPTION:System.ArgumentException: The model doesn't have a store id associated with it - remember to add the Tea Commerce store picker to your Umbraco content tree when trying to add to basket:
I've added a tea commerce store picker to my root and can see in my source it's writing out a javascript variable storeId = 1
I've tried many different ways including:
TC.addOrUpdateOrderLine({ 'productIdentifier': 999, 'quantity': 4, 'properties': { color: 're1d', size: '410' }, 'storeId': 1}); TC.addOrUpdateOrderLine({ productIdentifier: fullSku, quantity: 1, storeId:storeId}); TC.addOrUpdateOrderLine({ 'storeId': storeId, 'productIdentifier': 1262, 'quantity': 1 })
Can't seem to get it adding to basket.I know my store Id is 1 from looking in the database Any ideas?
Thanks Rob
Have you published all your content. Tried and refresh the Umbraco xml cache?
Kind regards
Anders
Thanks for the amazing quick response. Yes I've re-published the website from the root content node, re-started IIS.
If I do: var order = TC.getCurrentOrder({ storeId: storeId });
it works fine and creates me a row in the teacommerce order table with my hash.
even when I hard code the store id in the url it doesn't work.
Could you take a screenshot of your umbraco node structure - what node/product you try to add - and where the store picker is added as a property?
I've had to clear out the name of the client. the webstore is under the first node under Content and is equal to the first node under Master Catalogue.
Could you make a circle around the umbraco node that have the id 999 - which is the one that you try to add?
Hi,
You pointed me in the correct direction with your last message.
Basically: TC.addOrUpdateOrderLine({ 'productIdentifier': 999, 'quantity': 4, 'properties': { color: 're1d', size: '410' }, 'storeId': 1});
The productIdentifier was pointing to the actual product under the 'Master Catalogues' what it needed to point to was under the Website -> Catalogue -> product (this is just a doc type with a content link to the actual master product).
This now works.
Thanks for your very quick responses and pointing me in the right direction.
Rob
No problem - glad you got it solved! :)
Kind regards
Anders
is working on a reply...