bigcartel / dugway

Easily build and test Big Cartel themes.
https://developers.bigcartel.com/api/themes
MIT License
150 stars 22 forks source link

JavaScript API problems #75

Closed niaiserie closed 11 years ago

niaiserie commented 11 years ago

Product.findAll() and Product.search() return all products regardless of the params or the search string. I had something slightly more elaborate in my code but to reduce the possibility that it was something I was doing wrong I am now testing with this simple call: Product.findAll({category: 'accessories'}, function(products){ alert("returned " + products.length() + " products.); });

There are 80 total products and only 9 of them are accessories but 80 products are returned with this call. I've tried with numerous category permalinks and get the same result (80) every time. I've tested this within a shop running at bigcartel.com, and have no problems with findAll() there.

mattwigham commented 11 years ago

Thanks for reporting this. There's no search engine in Dugway like there is on Big Cartel itself, but we should be able to do some rough filtering based on product names and descriptions.

niaiserie commented 11 years ago

Product.find('') is working fine when I pass in a product's permalink. But being able to use findAll with a parameter filter (category, page, limit) inside of dugway would be great.

kreynolds commented 11 years ago

Closing, issue opened in JavaScript API project

Firehawk1006 commented 7 years ago

@mattwigham This seems to be an issue again within dugway. Product.findAll seems to ignore any given params.

Product.findAll({limit: 5}, function(products) {
    $(products).each(function(_, p) {
        console.log(p.name);
    });
});