[英]Unable to get order id on bigcommerce store confirmation page
根据以下代码下订单后,我正在尝试在大商店的确认页面上获取订单ID:
fetch('/api/storefront/order/{{checkout.order.id}}', {credentials: 'include'})
.then(function(response) {
return response.json();
})
.then(function(myJson) {
console.log(myJson);
});
但我收到以下错误:
{title: 'Not Found', type: 'about:blank', status: 404, detail: "提供的订单 ID 不代表有效订单"}
该代码对我来说看起来是正确的。 您将代码放在哪个文件中? 应该是订单确认。html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.