Copied to clipboard

Flag this post as spam?

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


  • Daniel Bardi 927 posts 2562 karma points
    Nov 13, 2010 @ 21:34
    Daniel Bardi
    0

    Products not adding to cart

    I am using umbraco v 4.6.0.Alpha (Assembly version: 1.0.3926.24556).

     

    I followed the steps show here: http://anders.burla.dk/umbraco/i-installed-tea-commerce-whats-next/

    This is my javascript:

    function addToCart(nodeId){
      var orderLine TeaCommerce.addOrderLine(nodeId1false);
      if (orderLine != null)
      {
        alert('Item was added to cart successfully!');
        window.location "/online-shop/cart";
      }
      else
      {
        alert('Item was not added to cart!');
      }
      return false;
    }

    The cart page uses the MiniCart.xslt in a macro, but nothing is returned.

    The xslt calls teacommerce:GetOrderXml()... The result is blank.

    Am I doing something wrong?

  • Rune Grønkjær 1372 posts 3103 karma points
    Nov 13, 2010 @ 23:04
    Rune Grønkjær
    0

    Hi Daniel,

    No, you are doing it just right.Looks like we pushed the release out to hard. (Never release anything on a friday :D)

    Would you try pasting this into your javascript:

    TeaCommerce.subscribeToOnCartUpdateError(function (error) { 
     alert("Cart Error: \n" + error.responseText);
    });

     

    This will show you the server error that no doubt is happening. Maybe print out the responseText to your page instead. Then you can post it here and we can handle it.

    Sorry about the inconvenience.

    /Rune

     

     

     

  • Daniel Bardi 927 posts 2562 karma points
    Nov 13, 2010 @ 23:06
    Daniel Bardi
    0

    Thanks for the fast reply.... I'll post back the response.

  • Daniel Bardi 927 posts 2562 karma points
    Nov 13, 2010 @ 23:12
    Daniel Bardi
    0

    This is the resulting message:

    Cart Error: 

    <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.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 System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)

       at umbraco.presentation.umbracobase.requestModule.invokeMethod(restExtension myExtension, Object[] paras) in d:\TeamCity\buildAgent\work\75c63e4d2422667e\umbraco\presentation\umbracobase\baseHttpModule.cs:line 154

     

    INNEREXCEPTION:

    System.ArgumentNullException: Value cannot be null.

       at System.Threading.Monitor.ReliableEnter(Object obj, Boolean& lockTaken)

       at System.Threading.Monitor.Enter(Object obj, Boolean& lockTaken)

       at TeaCommerce.Data.Controllers.OrderController.AddOrderLine(Order order, Int32 nodeId, Decimal quantity, Boolean overwriteQuantity)

       at TeaCommerce.Base.AddOrderLine(Int32 nodeId, Decimal quantity)]]></error>

  • Rune Grønkjær 1372 posts 3103 karma points
    Nov 13, 2010 @ 23:14
    Rune Grønkjær
    0

    Super

    Going to bed now. It's night in Denmark. We'll get back to you, hopefully tomorrow. But we might first have a new release on monday.

    /Rune

  • Daniel Bardi 927 posts 2562 karma points
    Nov 13, 2010 @ 23:19
    Daniel Bardi
    0

    Is there a workaround in the meantime?

  • Rune Grønkjær 1372 posts 3103 karma points
    Nov 14, 2010 @ 09:51
    Rune Grønkjær
    0

    Sorry about the late answer this time. Had to sleep for a while.

    I will talk to Anders Burla today and see what we can do. Cannot promise anything though.

    /Rune

  • Rune Grønkjær 1372 posts 3103 karma points
    Nov 14, 2010 @ 13:24
    Rune Grønkjær
    0

    Hi Daniel,

    I have a build here that works for me.
    http://www.teacommerce.dk/build/teacommerce_bin.zip

    /Rune

  • Rune Grønkjær 1372 posts 3103 karma points
    Nov 14, 2010 @ 13:29
    Rune Grønkjær
    0

    Could you try looking in the database. See if theres an order, and see if that order has an orderline.

    /Rune

  • Daniel Bardi 927 posts 2562 karma points
    Nov 14, 2010 @ 19:47
    Daniel Bardi
    0

    Just downloaded the build... I'll check for the orderlines and post back.

  • Daniel Bardi 927 posts 2562 karma points
    Nov 14, 2010 @ 19:57
    Daniel Bardi
    0

    Here is the resulting error... now that you included the pdb files we can see the line numbers:

     

    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.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 System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)

       at umbraco.presentation.umbracobase.requestModule.invokeMethod(restExtension myExtension, Object[] paras) in d:\TeamCity\buildAgent\work\75c63e4d2422667e\umbraco\presentation\umbracobase\baseHttpModule.cs:line 154

     

    INNEREXCEPTION:

    System.ArgumentNullException: Value cannot be null.

       at System.Threading.Monitor.ReliableEnter(Object obj, Boolean& lockTaken)

       at System.Threading.Monitor.Enter(Object obj, Boolean& lockTaken)

       at TeaCommerce.Data.Controllers.OrderController.AddOrderLine(Order order, Int32 nodeId, Decimal quantity, Boolean overwriteQuantity) in D:\Dokumenter\Visual Studio 2010\Projects\Tea Commerce\TeaCommerce\TeaCommerce.Data\Controllers\OrderController.cs:line 286

       at TeaCommerce.Data.Controllers.OrderController.AddOrderLine(Order order, Int32 nodeId, Decimal quantity) in D:\Dokumenter\Visual Studio 2010\Projects\Tea Commerce\TeaCommerce\TeaCommerce.Data\Controllers\OrderController.cs:line 282

       at TeaCommerce.Base.AddOrderLine(Int32 nodeId, Decimal quantity) in D:\Dokumenter\Visual Studio 2010\Projects\Tea Commerce\TeaCommerce\TeaCommerce\Base\Base.cs:line 75

  • Daniel Bardi 927 posts 2562 karma points
    Nov 14, 2010 @ 20:07
    Daniel Bardi
    0

    BTW.. no order or orderlines in the database.

  • Daniel Bardi 927 posts 2562 karma points
    Nov 14, 2010 @ 20:29
    Daniel Bardi
    0

    I decompiled the Teacommerce.dll and found the CurrentOrderId property.

            public static longCurrentOrderId

            {

                get

                {

                    if ((HttpContext.Current.Session != null) && (HttpContext.Current.Session["TeaCommerce_OrderId"] != null))

                    {

                        long orderId = (long)HttpContext.Current.Session["TeaCommerce_OrderId"];

                        Order order = OrderController.GetOrder(orderId);

                        if (order.IsOrder)

                        {

                            CurrentFinalizedOrderId = new long?(order.Id);

                            CurrentOrderId = null;

                        }

                        return (long?)HttpContext.Current.Session["TeaCommerce_OrderId"];

                    }

                    return null;

                }

                set

                {

                    HttpContext.Current.Session["TeaCommerce_OrderId"] = value;

                }

            }

     

    It appears that if the session value is null then it returns null instead of creating a new order id.

    Where is CurrentOrderId set?

  • Rune Grønkjær 1372 posts 3103 karma points
    Nov 14, 2010 @ 21:54
    Rune Grønkjær
    0

    Thanks for the information Daniel. Will look into it tomorrow. As usual it's allmost bedtime here :)

    It just strikes me that your base may not have access to session state. Would you check if your web config has:

    <modules runAllManagedModulesForAllRequests="True">

    Because that MIGHT be causing it, as we don't have the same problem in our version.

    /Rune

     

  • Rune Grønkjær 1372 posts 3103 karma points
    Nov 14, 2010 @ 21:56
    Rune Grønkjær
    0

    Thanks for the information Daniel. Will look into it tomorrow. As usual it's allmost bedtime here :)

    It just strikes me that your base may not have access to session state. Would you check if your web config has:

     

    <modules runAllManagedModulesForAllRequests="True">

     

    Because that MIGHT be causing it, as we don't have the same problem in our version.

    /Rune

  • Rune Grønkjær 1372 posts 3103 karma points
    Nov 14, 2010 @ 21:57
    Rune Grønkjær
    0

    Oups, posted that twice :)

  • Daniel Bardi 927 posts 2562 karma points
    Nov 14, 2010 @ 22:12
    Daniel Bardi
    0

    Yes.. web.config has the follows:

    <modules runAllManagedModulesForAllRequests="true">

  • Jesper Ordrup 1019 posts 1528 karma points MVP
    Nov 15, 2010 @ 10:39
    Jesper Ordrup
    2

    Daniel, are you running on Juno nightly build? Earlier has problems with base and session.

    /jesper ordrup

  • Daniel Bardi 927 posts 2562 karma points
    Nov 15, 2010 @ 10:46
    Daniel Bardi
    0

    Screen grab of version below...

  • Rune Grønkjær 1372 posts 3103 karma points
    Nov 15, 2010 @ 10:48
    Rune Grønkjær
    1

    Yes, thats it Jesper. Of cause.

    I didn't check your version number. Should have done that. We had them fix the error in the 4.6 Alpha, but first in a later version. Get the latest version and it will work:

    http://nightly.umbraco.org/umbraco%204.6/4.6%20Alpha/

    /Rune

  • Daniel Bardi 927 posts 2562 karma points
    Nov 15, 2010 @ 10:59
    Daniel Bardi
    0

    Thanks.. Thought I had gotten the latest from codeplex... I'll give it a go.

  • Daniel Bardi 927 posts 2562 karma points
    Nov 15, 2010 @ 11:01
    Daniel Bardi
    0

    Where the fixes in the assemblies only?

    Will make it easier if I only need to copy the bin folder.

  • Rune Grønkjær 1372 posts 3103 karma points
    Nov 15, 2010 @ 11:03
    Rune Grønkjær
    1

    Yes the bin files should be enough

  • Daniel Bardi 927 posts 2562 karma points
    Nov 15, 2010 @ 11:05
    Daniel Bardi
    0

    That did it... it's working as expected now!

    Thank you for you assistance... 

  • Rune Grønkjær 1372 posts 3103 karma points
    Nov 15, 2010 @ 11:08
    Rune Grønkjær
    1

    That's super.

    By the way. We are working on how to fix umbraco 4.5, so that we can have it working in that version as well. Until then you guys have to upgrade to latest 4.6 Alpha.

    1.0.3958.21661 and forward should do it.

     

  • Jesper Ordrup 1019 posts 1528 karma points MVP
    Nov 15, 2010 @ 11:09
    Jesper Ordrup
    0

    Who the f*ck stole my solution karma :-) (just kidding)

    /j

  • Rune Grønkjær 1372 posts 3103 karma points
    Nov 15, 2010 @ 11:10
    Rune Grønkjær
    0

    Seems like I did. ;)

    Thanks Daniel

  • Daniel Bardi 927 posts 2562 karma points
    Nov 15, 2010 @ 11:11
    Daniel Bardi
    0

    Sorry Jesper... I did give you a High Five...

    It was be better to give the Solved to Rune since his post contained the link... it'll help other users.

     

  • Jesper Ordrup 1019 posts 1528 karma points MVP
    Nov 15, 2010 @ 11:21
    Jesper Ordrup
    0

    No problem - if you fix the file manager for 4.5 then :-)

  • Daniel Bardi 927 posts 2562 karma points
    Nov 15, 2010 @ 11:22
    Daniel Bardi
    0

    Ahh.. not yet... trying to finish up some client work before I can venture back to that one.

  • Zac 39 posts 61 karma points
    Nov 20, 2010 @ 08:53
    Zac
    0

    Has this been fixed for Umbraco 4.5.2?

    I am trying to evaluate this product and getting an error adding a product, slightly different error message though:

    Cart Error:

    <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.Controllers.OrderController.AddOrderLine(Order order, Int32 nodeId, Decimal quantity, Boolean overwriteQuantity)

     

       at TeaCommerce.Data.Controllers.OrderController.AddOrderLine(Order order, Int32 nodeId, Decimal quantity)

     

       at TeaCommerce.Base.AddOrderLine(Int32 nodeId, Decimal quantity)]]></error>

  • Daniel Bardi 927 posts 2562 karma points
    Nov 20, 2010 @ 09:03
    Daniel Bardi
    0

    TeaCommerce is only working on the latest 4.6.alpha version.

  • Rune Grønkjær 1372 posts 3103 karma points
    Nov 20, 2010 @ 09:18
    Rune Grønkjær
    1

    Luckily that is wrong. This thursday we released the 1.0.0 version and that one runs on 4.5. So go and get it :)

    We have set us up the DEMO site.

    http://demo.teacommerce.dk/

    We demoed it yesterday at the http://umbracodkfestival.dk 

  • Daniel Bardi 927 posts 2562 karma points
    Nov 20, 2010 @ 09:23
    Daniel Bardi
    0

    Brilliant!   That'll make my client happy!

  • Rune Grønkjær 1372 posts 3103 karma points
    Nov 20, 2010 @ 09:24
    Rune Grønkjær
    0

    Hi zac

    Have you checked which fields Tea Commerce try's to add from the product node. Sounds like it's trying to fetch a node property that does not exist. You can check that in the admin section under general settings.

    Remember that all products must have a price. And that price's alias must be the same in the Tea Commerce admin. 

    /Rune

     

     

  • Zac 39 posts 61 karma points
    Nov 20, 2010 @ 09:32
    Zac
    0

     

    Yes the properties are all set according to the blog post by Anders.

    I have productName and productNumber set in the Order Lines setttings and then productPrice set in the currency for USD, which is the default.

    Using a fresh install of umbraco 4.5.2 and using the 1.0.0 version of teaCommerce.

  • Rune Grønkjær 1372 posts 3103 karma points
    Nov 20, 2010 @ 09:39
    Rune Grønkjær
    0

    @zac - i think you found the first bug in Tea Commerce - the system dosen't check if the VAT group isn't used and thats making the error - try specify a VAT group property on the product document type and specify that property name in "general settings" in Tea Commerce and try again

  • Zac 39 posts 61 karma points
    Nov 20, 2010 @ 09:47
    Zac
    0

    yep that was it, thanks. Product looks good by the way. I think you have the "right sized lego pieces" for an umbraco plugin. Now just need a few additional features: variations, digital downloads, discounts, affiliates .... :)

  • Daniel Bardi 927 posts 2562 karma points
    Nov 20, 2010 @ 09:49
    Daniel Bardi
    0

    How are variations handled in TeaCommerce?

  • Rune Grønkjær 1372 posts 3103 karma points
    Nov 20, 2010 @ 10:01
    Rune Grønkjær
    0

    @zac We will very soon implement the posibility to hook into some (Don't know wich, where and how many yet) events, that will enable you to manipulate the order at different stages. We want to sell Tea Commerce in a Tea Commerce solution obviously, so we will need to e-mail the license along with the confirmation e-mail.

    Variants are allready supported in a limited amount. Read about it here: http://rune.gronkjaer.dk/en-US/2010/11/10/umbraco-e-commerce-webshop/

    Discounts and affiliates, we have no plan on implementing. We will though be open to suggestions but there is no budget for it at present.

    /Rune

  • Zac 39 posts 61 karma points
    Nov 20, 2010 @ 10:06
    Zac
    0

    ill ask some more about lisencing in another thread.

Please Sign in or register to post replies

Write your reply to:

Draft