Uploaded image for project: 'Ibexa IBX'
  1. Ibexa IBX
  2. IBX-4912

[product list / product page] Sometimes adding product to cart cause a JS exception and product is not added to cart

    XMLWordPrintable

Details

    Description

      Steps to reproduce:

      1. Log in to storefront.
      2. Go to /product-catalog or product page.
      3. Click 'Add to cart' button while page is still loading.
      4. Verify web browser console output.

      Actual result:

      See attached screenshots

      Sometimes adding product to cart cause a JS exception and product is not added to cart.

      Uncaught TypeError: Cannot read properties of null (reading 'entries')
          at StorefrontCart.getProductEntry (ibexa-storefront-cart-js.js:230:40)
          at StorefrontCart.addProduct (ibexa-storefront-cart-js.js:244:31)
          at StorefrontAddToCart.handleAddToCart (ibexa-storefront-cart-js.js:63:26)
          at StorefrontAddToCart.handleAddToCart (ibexa-storefront-cart-js.js:997:85)

      Expected result:

      Even when page is loaded an request is sent and product is added to the cart.

      Note:
      Problem exists for standard and variant products

      Designs

        Attachments

          Activity

            People

              Unassigned Unassigned
              bogdan.mazur@ibexa.co Bogdan Mazur
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: