Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

608
Vistas
Snipcart - error: 'product-crawling-failed'

I'm trying to set up Snipcart for the first time. It seems pretty straightforward for the most part, but I'm running into some issues when I try to check out with the test payment card.

I'm working with just a vanilla front end, and Express on the back. I'm getting the same error every time:

A 'cart-confirmation' error occurred in Snipcart.

Reason: 'product-crawling-failed' 

But the URL it's returning me in my console looks like it should be able to crawl for the product properly: https://myHerokuApp.herokuapp.com/shop/starry-night

    <button class="snipcart-add-item"
        data-item-id="starry-night"
        data-item-price="79.99"
        data-item-url="/shop/starry-night"
        data-item-description="This is a sweet piece of art."
        data-item-image="img/1.jpg"
        data-item-name="The Starry Night">
        Add to cart
    </button>

I'm really confused at to what I'm doing wrong. Is there something I have to do with my express router? I've tried routing something like this just to see what would happen

router.get("/shop/:product", function (req, res, next) {
  res.json({
    "data-item-id": "starry-night",
    "data-item-price": "79.99",
    "data-item-url": "/shop/starry-night"
  })
 });

But that didn't make a difference.

I'm really hoping someone can spot what I'm doing wrong or point me in the right direction in the docs..

Thank you!

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Attributes data-item-id and data-item-price are used with HTML crawler and are defined inside buy-button.

If you want to use JSON crawler, then you should return valid JSON with properties id and price. Also, price should be of type number. Change your backed like this:

router.get("/shop/:product", function (req, res, next) {
  res.json({
    "id": "starry-night",
    "price": 79.99
  })
});

Note: your server must be publicly available (not running in your localhost).

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda