![](/img/trans.png)
[英]Shopify Infinite scroll has stopped product Quick View and Quick Add to Cart buttons from working
[英]Request shopify cart.json stopped working with error 330
我使用jQuery从Shopify获取购物车数据内容,并将其显示在另一个站点上。 它只是停止工作。 Google Chrome浏览器显示请求“失败”,当我在另一个标签中打开此请求时,Google显示:
Error 330 (net::ERR_CONTENT_DECODING_FAILED): Unknown error.
当我用Google搜索此消息时,我只收到报告说它与压缩有关。 由于Shopify是托管的网上商店,因此调试起来有些困难。
我使用这种方法来获取购物车内容:
Shopify.getCart = function(callback) {
console.log("getCart")
jQuery.ajax({url: 'http://shop-here/cart.json', dataType: 'jsonp', cache: false, success:
function(cart){
console.log("response: " + callback)
console.log(cart)
if (callback !== undefined && (typeof callback) === 'function') {
callback(cart);
}
else {
Shopify.onCartUpdate(cart);
}
}
});
};
发生了什么问题,我该如何解决?
Shopify解决了该问题。 如错误消息所示,这是Shopify服务器上的错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.