Copied to clipboard

Flag this post as spam?

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


  • Micah 4 posts 24 karma points
    Jun 23, 2014 @ 20:33
    Micah
    0

    '... have not been added to cart.'

    I'm working on reviving a website based on Umbraco 4.7.2 and TeaCommerce (version 8?). When trying to add items to a cart I get this javascript alert:

    '... have not been added to cart.'

    followed by:

    'Failure to add option ... [object Object]'

    I haven't been able to find any other errors or clues as to what is going wrong.

    What do you think is wrong, or how would you go about debugging this?

    (edit)

    I have found the error function that is throwing up the alert. The variable 'data' that is passed in was:

    { "readyState": 4, "responseText": "{Current Pages html (will provide if helpful)}", "status": 200, "statusText": "OK" }

  • Anders Burla 2560 posts 8256 karma points
    Jun 24, 2014 @ 10:08
    Anders Burla
    0

    Do you have a link and a description of how we reproduce this thing?

    Kind regards
    Anders

  • Micah 4 posts 24 karma points
    Jun 25, 2014 @ 01:36
    Micah
    0

    Unfortunately I didn't set up the site and I don't have the hours to setup another and attempt to reproduce. The live site, which has working binaries and is based on a new (and unavailable) version of the source, can be seen here (It's behind a login)

    I know you don't have enough information to tell me what's wrong. What I'm hoping for is some debugging advice for an error of this nature or some best guesses.

    Thank you for replying so quickly.

  • Micah 4 posts 24 karma points
    Jun 25, 2014 @ 19:20
    Micah
    0

    For anyone interested, here is a little more information.

    The masterfile for the page: https://gist.github.com/micahh2/114189aaea72670aeb78

    The errorfn function that is throwing the alert:

    //AJAX/JSON call to add current item to cart w/ extra fields
    TeaCommerce.overwriteQuantity(Node, Qty,
    {
      async: false,
      properties: OrderProps,
      successfn: function (data)
      {
        var prod = $('#miQty').val() + " " + plabel;
        alert(prod + " have been added to cart");
      },
      errorfn: function (data)
      {
        var prod = $('#miQty').val() + " " + plabel;
        alert(prod + " have not been added to cart");
      }
    });
    

    This is the comment on top of teaCommerce.js:

    /*
    * Tea Commerce JavaScript Library
    * 
    * Version 2.1
    * 7. Juli 2011
    *
    * Copyright:
    * Tea Solutions
    * www.teasolutions.dk
    *
    * Developer
    * Rune Øllgaard Grønkjær
    * [email protected]
    *
    * Created with jQuery v1.4.2
    * Tested with jQuery v1.6
    */
    

    Finding the version on TeaCommerce has been a bit difficult. There doesn't seem to be any packages installed, and nothing in the TeaCommerce tab shows a version. I looked in the database on the table TeaCommerce_Version and found:

    DatabaseSchemaVersion: 8
    SpecialActionsVersion: 0

    That's all I know to look at as of right now. I'll post any other useful things as I find them.

  • Anders Burla 2560 posts 8256 karma points
    Jun 26, 2014 @ 10:03
    Anders Burla
    0

    Try and hook into the errorfn and see what the data object has for information.

    Kind regards
    Anders

  • Micah 4 posts 24 karma points
    Jun 26, 2014 @ 21:04
    Micah
    0

    I posted it above: { "readyState": 4, "responseText": "{Current Pages html (will provide if helpful)}", "status": 200, "statusText": "OK" }

  • Anders Burla 2560 posts 8256 karma points
    Jun 27, 2014 @ 09:29
    Anders Burla
    0

    Can you send us a login or a place to reproduce this error. Its hard to help debug when we cant see anything :)

Please Sign in or register to post replies

Write your reply to:

Draft