Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Gordon Saxby 1347 posts 1608 karma points
    Jan 15, 2014 @ 12:03
    Gordon Saxby
    0

    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 :-(

  • Anders Burla Johansen 2560 posts 8256 karma points
    Jan 15, 2014 @ 12:48
    Anders Burla Johansen
    0

    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

  • Gordon Saxby 1347 posts 1608 karma points
    Jan 16, 2014 @ 00:09
    Gordon Saxby
    0

    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?

     

  • Anders Burla Johansen 2560 posts 8256 karma points
    Jan 20, 2014 @ 17:48
    Anders Burla Johansen
    0

    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

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies