Copied to clipboard

Flag this post as spam?

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


  • Chen 39 posts 68 karma points
    Apr 26, 2011 @ 15:59
    Chen
    0

    Error when trying to add to cart

    I have followed set up guide on Anders Burla's blog (http://anders.burla.dk/umbraco/i-installed-tea-commerce-whats-next/), but when I click on 'add to cart' and call the 'TeaCommerce.addOrderLine(nodeId, 1, false)' nothing happens. After checking Firebug's console log, there's an erro:

     

    <error>
        <![CDATA[MESSAGE:
            Exception has been thrown by the target of an invocation.
           
            STACKTRACE:
            at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& 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 System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
            at TeaCommerce.Presentation.TeaCommerceBase.RequestModule.invokeMethod(restExtension myExtension, Object[] paras)
           
            INNEREXCEPTION:
            System.Xml.XPath.XPathException: Expression must evaluate to a node-set.
            at MS.Internal.Xml.XPath.XPathParser.ParseNodeTest(AstNode qyInput, AxisType axisType, XPathNodeType nodeType)
            at MS.Internal.Xml.XPath.XPathParser.ParseStep(AstNode qyInput)
            at MS.Internal.Xml.XPath.XPathParser.ParseRelativeLocationPath(AstNode qyInput)
            at MS.Internal.Xml.XPath.XPathParser.ParseRelativeLocationPath(AstNode qyInput)
            at MS.Internal.Xml.XPath.XPathParser.ParseRelativeLocationPath(AstNode qyInput)
            at MS.Internal.Xml.XPath.XPathParser.ParsePathExpr(AstNode qyInput)
            at MS.Internal.Xml.XPath.XPathParser.ParseUnionExpr(AstNode qyInput)
            at MS.Internal.Xml.XPath.XPathParser.ParseMultiplicativeExpr(AstNode qyInput)
            at MS.Internal.Xml.XPath.XPathParser.ParseRelationalExpr(AstNode qyInput)
            at MS.Internal.Xml.XPath.XPathParser.ParseEqualityExpr(AstNode qyInput)
            at MS.Internal.Xml.XPath.XPathParser.ParseOrExpr(AstNode qyInput)
            at MS.Internal.Xml.XPath.QueryBuilder.Build(String query, Boolean allowVar, Boolean allowKey)
            at System.Xml.XPath.XPathExpression.Compile(String xpath, IXmlNamespaceResolver nsResolver)
            at System.Xml.XPath.XPathNavigator.SelectSingleNode(String xpath)
            at TeaCommerce.Data.Order.GetOrCreateOrderLine(Int32 nodeId, Nullable`1 orderLineId, Boolean isUnique)
            at TeaCommerce.Base.AddOrderLine(Order order, Int32 nodeId, Nullable`1 orderLineId, Decimal quantity, Boolean isUnique, Boolean overwriteQuantity)
            at TeaCommerce.Base.AddOrderLine(Int32 nodeId, Nullable`1 orderLineId, Decimal quantity, Boolean isUnique)
            at TeaCommerce.Base.AddOrderLine(Int32 nodeId, Decimal quantity)]]>
    </error>

    It might have been better if I installed the Tea Commerce starter kit, but I had to implement Tea Commerce on top of an existing Umbraco site and didn't really want to mess up all the docType and templates that were already in place.

    I am completely new to Tea Commerce, this might be something really obvious.

     

    Thanks in advance.

    Chen

     

  • Rune Grønkjær 1372 posts 3103 karma points
    Apr 26, 2011 @ 16:04
    Rune Grønkjær
    0

    Hi Chen,

    Are you using the new or the old umbraco xml schema?
    What versions of Umbraco and Tea Commerce do you have installed?

    /Rune

  • Chen 39 posts 68 karma points
    Apr 26, 2011 @ 16:08
    Chen
    0

    Hi Rune,

    It's Umbraco 4.7 and Tea Commerce 1.2.1.0 

    It's on the new xml schema.

    Thanks.

    Chen

  • Rune Grønkjær 1372 posts 3103 karma points
    Apr 26, 2011 @ 16:12
    Rune Grønkjær
    0

    Thats good.

    It's probably a problem with your settings then. Check the general settings in the Tea Commerce section. Specifically the settings under "Product" must match the structure of your products.

    /Rune

  • Chen 39 posts 68 karma points
    Apr 26, 2011 @ 16:27
    Chen
    0

    Hi Rune,

    Do I need to provide all properties for the product docType, even the ones inherited ones?

    Thanks!

    Chen

  • Rune Grønkjær 1372 posts 3103 karma points
    Apr 26, 2011 @ 16:36
    Rune Grønkjær
    0

    You only need to write to one you actually need on your orderline. The aliases you write in "Order line property aliases" will be copied to the orderline when it is added to the cart. You can both write ones that are directly on the property AND one that are only inherited. If Tea Commerce cannot find a specific property on the product it will look up the tree, trying to find a match.

    /Rune

  • Chen 39 posts 68 karma points
    Apr 26, 2011 @ 16:42
    Chen
    0

    Hi Rune,

    I have updated the 'Order line property aliases' field (productName,productID,productPriceGBP,productImage,productCategory,productDescription), but I still seem to be getting the same error whenever I click on the 'add to cart' button.

    Sorry to be a pain.

    Chen

  • Rune Grønkjær 1372 posts 3103 karma points
    Apr 26, 2011 @ 17:27
    Rune Grønkjær
    0

    No trouble at all. Just glad to help.

    Try removing all the aliases and  then add to cart.

    How about the VATgroup alias? Is that filled out?

    I trust you are adding the correct node id to the cart!?

    /Rune

  • Chen 39 posts 68 karma points
    Apr 26, 2011 @ 18:12
    Chen
    0

    Hi Rune,

    I removed all the aliases and still no luck :(

    The VAT group alias, is that the name filed? or the VAT field? The default one is 0%(Name) and 0(VAT), so I set a new one with 20% and 20. and put in 'VAT group property alias' 20%.

    The product ID seem to be correct.

    Thanks.

    Chen

  • Anders Burla 2560 posts 8256 karma points
    Apr 26, 2011 @ 18:56
    Anders Burla
    1

    Hi Chen, Anders from Tea Commerce joining the chat.

    Could you try and send me login info for the solution or is it a local website? You can send it to info [at] teacommerce.dk and I could try and have a look at what might be wrong with the setup.
  • Rune Grønkjær 1372 posts 3103 karma points
    Apr 27, 2011 @ 11:43
    Rune Grønkjær
    0

    It was because you had the value "20%" in the "VAT group property alias" in the general settings of Tea Commerce, but didnt have a property named that on the product document type. So the system could find it. Just removed the "20%" value and i works.

    If this post helped you, could you mark it as a solution to your problem :)

    /Rune

  • Chen 39 posts 68 karma points
    Apr 29, 2011 @ 14:50
    Chen
    1

    Thank you Anders and Rune for helping me out on this. 

  • Rune Grønkjær 1372 posts 3103 karma points
    Apr 29, 2011 @ 16:52
    Rune Grønkjær
    0

    No problem. We're just glad to help.

    Remember to mark the answer so others can find it.

    /Rune

Please Sign in or register to post replies

Write your reply to:

Draft