This commit is contained in:
Kerim 2023-06-21 02:02:41 +05:00
commit c4d846a357
2 changed files with 12 additions and 17 deletions

View File

@ -1,6 +1,3 @@
[localePicker]
forceUrl = 1
[staticMenu]
code = "top-menu"
@ -84,11 +81,16 @@ function onStart(){
<!-- Main JS -->
<script src="{{'assets/js/main.js'|theme}}"></script>
{% partial 'scripts/addToCart' token=nurgulToken %}
{% framework extras %}
<<<<<<< HEAD
=======
>>>>>>> bb1deb8be8e81c0183888653d87cdcb79e6f3984
{% scripts %}
</body>
</html>
</html>

View File

@ -11,27 +11,20 @@
product.product_id = prodId;
product.quantity = qty;
console.log('Bearer {{token}}');
console.log(String('Bearer {{token}}'));
console.log(prodId);
console.log(qty);
console.log(JSON.stringify(product));
$.ajax({
async: true,
crossDomain: true,
url: 'https://nurgul.com.tm/app/api/customer/cart/add/' + String(prodId),
type: 'POST',
headers: {
"authorization": "Bearer {{token}}",
"content-type": "application/json",
"cache-control": "no-cache",
// "postman-token": "c4c3ed17-bdc6-1e98-4575-f1172f789d93"
},
headers: { Authorization: 'Bearer {{token}}' },
processData: false,
contentType: false,
data: JSON.stringify(product),
beforeSend: function () {
$('#loader_add').show();
},
dataType: 'json',
success: function (data) {
console.log(data);
@ -49,4 +42,4 @@
</script>
{% endput %}
{% endput %}