Has anyone used Snipcart successfully?

I’ve been trying to set up my site to accept product orders, and I’m having problems with Snipcart. Has anyone used it who can provide some help?

All of my test orders are failing except for two of the products. When I look at the error log and the security flowchart at Snipcart, the problem seems to be that:

  1. Snipcart gets a Content-Type from the product’s URL, and the Content-type is either JSON or HTTP.
  2. I’m assuming that the Content-Type is JSON because I’m getting a JSON error in my error log. Snipcart is trying to match the product code and price in the cart to the product code and price in the products.json file on my site. And they don’t match.
  3. When I look at the products.json file on my site, it only contains two products in it (and those are the two products that I can successfully test-order with Snipcart. All other product orders fail (because they aren’t in the products.json file).
  4. Which brings me to the question: how is the products.json file created? I’m guessing that Sparkle creates it? But have I broken the model by having products on 30 different pages? It looks to me like the file was created from a single product file (but I don’t even know how Sparkle chose which product page to use to populate the file). Or maybe Snipcart creates the file when I import pages into Snipcart so it can build the inventory list of products, but I wouldn’t have expected Snipcart to be able to create files on my site.


Looking at some more details.
I’m looking at the products.json file that was generated. Snipcart confirms that the file was created by Sparkle.

I told you that it only has two of my 60 products in the file. This might be a clue … I have products on 30 pages, and the 2 products listed are on the first product page in my list of pages. Does Sparkle expect to see a single product page that has all of the buttons on it that it will use to create a products.json file? It just seems that perhaps the first page was processed successfully and all of the products on subsequent pages were rejected.


Here are results of another test. It’s still not working.

  1. I deleted the products.json file from the website.
  2. At 3:17, I re-published the site.
  3. The new products.json file has a timestamp of 3:17. It only contains a product listing of the two products on the first Products page.

The only thing I can think to test is to create a page that has a copy of all of the Buy buttons on it and put it first in my Sparkle list of pages. I won’t have any links to the page — it will just be a fake page that Sparkle can use. Then I’ll republish and see if Sparkle creates a file that lists all of my products on it.


Okay, I think I found the bug and found a sloppy workaround.

I made a new page and dragged it to the precede all of the other product pages, and I put a whole bunch of product buttons on it. Then I deleted the products.json file and republished the site.

But the products.json page still only showed the two products that are on the page that is now the second page in the list. But that’s also the first product page that I created, and it suggested to me that maybe the product pages are being processed in the order of creation rather than the order listed in Sparkle.

I duplicated the original product page (the one whose products are in the json file). I copied the product buttons from the other page that I had made at the start and pasted them on what was the original product page. Then I deleted the new product page that I had made. I made the page with all the buttons on it a “fake” page with no links to it. Then I published the site, and all of the buttons that are on the original product page are now in the json file.

The bug is that if you have more than one product page, only the earliest product page that has buttons on it will populate the products.json file.

Now, I’m going to copy the rest of my product buttons over to this fake page and republish and see if I can get a complete products.json file generated.


I haven’t used Snipcart yet @chuckbo, but what you describe is very unusual?

I’ve used Ecwid a number of times and have never had an issues. So a few important things to note because you are using a third-party platform…

  • make sure your domain name has a SSL Certificate slapped against it
  • if you have an Embed container or a button generated by Snipcart code make sure you have “Activate After Consent” in the right hand panel unticked while testing
  • and the obvious one make sure your button code (you copy to Sparkle) per added product to Snipcart is unique

Yes, by putting a copy of all of my “Add to cart” buttons on the first [original] products page, Sparkle generates a json file that has a complete list of products on it.

Looks to me like Sparkle should be building a list of products as it processes product pages and then create the products.json file after it processes the last page. Instead, after it encounters the first product page, it appears to create the json file and then doesn’t append additional products to that file.

I think it is best @chuckbo to contact @duncan with the issue…

That’s what’s expected yes. Please send the project file and we’ll take a look.