javascriptbigcartel

Issue with Product.search API call


I'm using Big Cartel's Dugway development environment, and trying to build a live search with Product.search (available with their JS API). It appears to return a set of 20 products no matter what search term, or limit I place on the call, and I'm wondering if anybody else has experienced this? Is it just an issue with the Dugway environment?

More specifically, this is the call I'm making:

Product.search('mugs', { limit: 5 }, function(data) { console.log(data); });


Solution

  • This is just the way that products.js works with Dugway, I can confirm that the limit works properly in a live Big Cartel shop. For now maybe you just want to create a for loop and stop at 5 results, or only retrieve 5 from the response another way.