I am trying to get order id on confirmation page of big-commerce store after placing an order according to the following code:
fetch('/api/storefront/order/{{checkout.order.id}}', {credentials: 'include'})
.then(function(response) {
return response.json();
})
.then(function(myJson) {
console.log(myJson);
});
But I am getting the following error:
{title: 'Not Found', type: 'about:blank', status: 404, detail: "Provided order Id doesn't represent a valid order"}
That code looks correct to me. In what file have you placed the code? It should be in order-confirmation.html
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.