From 0fb5bf2d162ea0f835fc452fb1f771d4f119c3f1 Mon Sep 17 00:00:00 2001 From: Kerim Date: Wed, 21 Jun 2023 00:36:55 +0500 Subject: [PATCH] add cart test --- themes/nurgul/partials/scripts/addToCart.htm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/themes/nurgul/partials/scripts/addToCart.htm b/themes/nurgul/partials/scripts/addToCart.htm index b63be71..02f705e 100755 --- a/themes/nurgul/partials/scripts/addToCart.htm +++ b/themes/nurgul/partials/scripts/addToCart.htm @@ -22,9 +22,11 @@ processData: false, contentType: false, type: 'POST', - beforeSend: function (xhr) { - xhr.setRequestHeader('Authorization', 'Bearer {{token}}'); - xhr.setRequestHeader('Content-Type', 'application/json'); + headers: { + 'Authorization': 'Bearer {{token}}', + 'Content-Type': 'application/json' + }, + beforeSend: function () { $('#loader_add').show(); }, success: function (data) {