Copied to clipboard

Flag this post as spam?

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


  • Laurie 6 posts 37 karma points
    Jun 20, 2013 @ 17:35
    Laurie
    0

    500 server error on basket add

    Hello 

    I'm currently setting up a new site and have run into a problem where I get a 500 server error when using the html api. we are using TC v2.1.2 but it also happens with 2.1.1 on Umbraco v6.0.5  The form used to submit is  

     

    <form  action="/base/TC/FormPost.aspx" method="post">
        <p class="price">&pound;19.16</p>
        <div class="addArea">
            <select name="quantity" id="quantity" class="pretty dk">
                <option value="1">1</option>
            </select>
            <input type="hidden" name="productid" value="1527"/>
            <input name="AddOrUpdateOrderLine" value="productIdentifier : productid, quantity : quantity" type="hidden"/>
            <input name="storeId" value="1" type="hidden" />
            <input type="submit" name="btnAdd" id="btnAdd" class="addToBasketButton" value="Add to Basket" />
        </div>
    </form>
    

    (this was copied from a working site)

    The error is shown below

    STACKTRACE:

     

       at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)

       at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)

       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)

       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 didn'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()

     

     

    Any help would be appreciated

    Thanks

  • Laurie 6 posts 37 karma points
    Jun 20, 2013 @ 18:01
    Laurie
    0

    Please ignore,  I re-read the error message found the problem and can't delete the topic for some reason.

  • Lewis Smith 192 posts 577 karma points c-trib
    Jan 10, 2018 @ 13:26
    Lewis Smith
    0

    I'm running into the same issue, any solution?

  • Anders Burla Johansen 2560 posts 8256 karma points
    Jun 21, 2013 @ 11:52
    Anders Burla Johansen
    0

    Hi Laurie

    Great you solved it :)

    Kind regards
    Anders

  • bob 19 posts 39 karma points
    Jun 28, 2016 @ 15:46
    bob
    0

    Hi laurie,

    Would you like to share how you solved the issue?

    Bob

Please Sign in or register to post replies

Write your reply to:

Draft