Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

604
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!