首页 > 解决方案 > ShopifyBuy js API 为单个产品返回 404

问题描述

我正在尝试使用 ShopifyBuy 客户端 api 调试产品的 404 问题。该产品总是返回 404,我无法理解为什么。

下面的代码是问题发生的地方。变量 productId 在 Shopify 商店中具有有效产品的有效 ID,但 client.fetchProduct 返回 404。我怀疑这是 Shopify 中的一个问题,但从支持人员那里获得帮助需要很长时间。

var productId = productDiv.data("shopify-id");
client.fetchProduct(productId).then(function (fetchedProduct) {
   productDiv.data("product", fetchedProduct);
});

请求网址:https://shop.mysite.co/api/apps/6/product_listings/[productId]

有没有人见过这个问题,让我在这里指出正确的方向?

谢谢

标签: shopify

解决方案


推荐阅读