Uploaded image for project: 'Prestashop 1.6'
  1. Prestashop 1.6
  2. PSCSX-9145

adding items to an empty cart throws an error the first two times an item is added but still adds the item

    Details

      Description

      Hi there,

      On http://www.scarboroughs.co.uk/acupuncture-needles/513-scarborough-gold-plated-acupuncture-needle (or any product on the site) when you add a product to an empty cart, the below error is thrown when AJAX is turned on.

      Impossible to add the product to the cart.
      textStatus: 'parsererror'
      errorThrown: 'SyntaxError: Unexpected token F in JSON at position 0'
      responseText:
      Fatal error

      When erroring is turned on and AJAX is turned off, the stack of functions that have/are being called is printed to the screen (I can copy and paste this if it is needed but it is huge)

      The abridged stack of this is:

      • ToolsCore::displayError - 950
      • CartCore->updateQty - 872
      • CartCore->addCartRule - 1355
      • CartRuleCore::autoAddToCart - 1076
      • CartCore::updateQty - 293
      • CartControllerCore::processChangeProductInCart - 73
      • CartControllerCore::postProcess - 178
      • ControllerCore::run - 367
      • DispatcherCore::dispatch - 28

      When the error does happen, it happens when adding to on an empty cart and also when adding the second item (zero index falsie/truthie issue?)

      To summarise:

      • Adding items to an empty cart throws an error the first two times an item is added
      • we have disabled all overrides and modules, the problem still occurs.
      • the problem occurs whether or not AJAX cart is turned on

      Hoe this helps. Let me know if any more information is needed.

      Kind regards
      Liam

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              teapotcreative Teapot Creative
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: