I installed the v2 starter kit (for TC v2!?) and it looks really nice, the code is extensive ... however, it isn't really much help for me to get started - sorry!
I cannot use the starter kit as it is because I need to install TC into an existing website.
Can someone give me the basic setup to add a "Add to Basket" button on a product page using Razor? Or would a JavaScript solution be better?
The product code field is "productCode". I copied the basket code from here http://documentation.teacommerce.net/razor-api/ and it shows zero products / total cost, I just can't get anything to add into the basket :-(
The most simple way would be to use the HTML api to add a product. Just start by making a product doc type in Umbraco with a price property with the alias that you have specified at the currency in Tea Commerce. Then use the html API to add - see here: http://documentation.teacommerce.net/html-api/order-line/addorupdateorderline/
I feel like I am just randomly stabbing in the dark at the moment :-(
I have installed the HTML form and when I click the "add to order" button the browser redirects to /base/TC/FormPost.aspx, the source of which is
<error><![CDATA[MESSAGE: Exception has been thrown by the target of an invocation.
STACKTRACE:
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Umbraco.Web.BaseRest.RestExtensionMethodInfo.Invoke(String[] parameters)
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 at TeaCommerce.Umbraco.Configuration.InformationExtractors.XmlNodeProductInformationExtractor.GetStoreId(XPathNavigator model, Boolean useCachedInformation) at TeaCommerce.Umbraco.Configuration.InformationExtractors.XmlNodeProductInformationExtractor.HasAccess(Int64 storeId, XPathNavigator model, Boolean useCachedInformation) at TeaCommerce.Api.Web.FormPostHandler.AddOrUpdateOrderLine(Int64 storeId, IDictionary`2 formFields, IDictionary`2 settings) at TeaCommerce.Api.Web.FormPostHandler.FormPost()]]></error>
What does that mean?
By the way, I haven't been able to find any instructions on how to setup a shop Umbraco - is there any help anywhere?
This error message should explain it a bit: "The model doesn't have a store id associated with it - remember to add the Tea Commerce store picker to your Umbraco content tree".
This means you have to add a store picker to your doc type in Umbraco and select the store. TC will locate it recursive. So add it a the website node level.
Very simple get started instructions
I installed the v2 starter kit (for TC v2!?) and it looks really nice, the code is extensive ... however, it isn't really much help for me to get started - sorry!
I cannot use the starter kit as it is because I need to install TC into an existing website.
Can someone give me the basic setup to add a "Add to Basket" button on a product page using Razor? Or would a JavaScript solution be better?
The product code field is "productCode". I copied the basket code from here http://documentation.teacommerce.net/razor-api/ and it shows zero products / total cost, I just can't get anything to add into the basket :-(
Hi Gordon
The most simple way would be to use the HTML api to add a product. Just start by making a product doc type in Umbraco with a price property with the alias that you have specified at the currency in Tea Commerce. Then use the html API to add - see here:
http://documentation.teacommerce.net/html-api/order-line/addorupdateorderline/
That is the basics of adding a product.
Kind regards
Anders
I feel like I am just randomly stabbing in the dark at the moment :-(
I have installed the HTML form and when I click the "add to order" button the browser redirects to /base/TC/FormPost.aspx, the source of which is
What does that mean?
By the way, I haven't been able to find any instructions on how to setup a shop Umbraco - is there any help anywhere?
Hi Gordon
This error message should explain it a bit: "The model doesn't have a store id associated with it - remember to add the Tea Commerce store picker to your Umbraco content tree".
This means you have to add a store picker to your doc type in Umbraco and select the store. TC will locate it recursive. So add it a the website node level.
Kind regards
Anders
is working on a reply...