I am trying to find products from my Shopify store with this code, next to the copy / paste page of examples for the Javascript Buy SDK:
$(function() { var shopClient = ShopifyBuy.buildClient({ accessToken: '4b4e3d4bba63039f2d51db94c2e79a46', domain: 'squatch-air-clutches-test.myshopify.com', appId: '6' }); shopClient.fetchQueryProducts({ collection_id: 1397227547 }).then(function(products) { $('.test').append(JSON.stringify(products)); }); shopClient.fetchProduct('46656520219').then(function(product) { $('.test').append(JSON.stringify(product)); }); });
Here is the violin.
The buildClient command seems to have completed successfully, however I get a console error with the following two commands: Error: Not Found . I assume that this refers to a product that cannot be found, but I am sure that both the product and the collection identifiers are correct. And I'm also sure that I have read access for the “products, options and collections” for my personal application. Will there be another reason why I get this error, and if so, what is the solution?
source share