From afbfc363c4768d0641b4d9f46b8a653358671ccf Mon Sep 17 00:00:00 2001 From: Kerim Date: Wed, 21 Jun 2023 00:53:32 +0500 Subject: [PATCH] add cart test --- themes/nurgul/partials/scripts/addToCart.htm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/themes/nurgul/partials/scripts/addToCart.htm b/themes/nurgul/partials/scripts/addToCart.htm index 7c355b4..95227ce 100755 --- a/themes/nurgul/partials/scripts/addToCart.htm +++ b/themes/nurgul/partials/scripts/addToCart.htm @@ -17,12 +17,18 @@ console.log(JSON.stringify(product)); $.ajax({ + async: true, + crossDomain: true, url: 'https://nurgul.com.tm/app/api/customer/cart/add/' + String(prodId), - data: JSON.stringify(product), type: 'POST', headers: { - 'Authorization': 'Bearer {{token}}' + "authorization": "Bearer {{token}}", + "content-type": "application/json", + "cache-control": "no-cache", + // "postman-token": "c4c3ed17-bdc6-1e98-4575-f1172f789d93" }, + processData: false, + data: JSON.stringify(product), beforeSend: function () { $('#loader_add').show(); },