Merge branch 'main' of http://gitlab.com/shokki.a96/nurgul_get_api_oct3 into main
This commit is contained in:
commit
c4d846a357
|
|
@ -1,6 +1,3 @@
|
||||||
[localePicker]
|
|
||||||
forceUrl = 1
|
|
||||||
|
|
||||||
[staticMenu]
|
[staticMenu]
|
||||||
code = "top-menu"
|
code = "top-menu"
|
||||||
|
|
||||||
|
|
@ -84,11 +81,16 @@ function onStart(){
|
||||||
<!-- Main JS -->
|
<!-- Main JS -->
|
||||||
<script src="{{'assets/js/main.js'|theme}}"></script>
|
<script src="{{'assets/js/main.js'|theme}}"></script>
|
||||||
|
|
||||||
|
{% partial 'scripts/addToCart' token=nurgulToken %}
|
||||||
{% framework extras %}
|
{% framework extras %}
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
|
||||||
|
|
||||||
|
>>>>>>> bb1deb8be8e81c0183888653d87cdcb79e6f3984
|
||||||
{% scripts %}
|
{% scripts %}
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -11,27 +11,20 @@
|
||||||
product.product_id = prodId;
|
product.product_id = prodId;
|
||||||
product.quantity = qty;
|
product.quantity = qty;
|
||||||
|
|
||||||
console.log('Bearer {{token}}');
|
console.log(String('Bearer {{token}}'));
|
||||||
console.log(prodId);
|
console.log(prodId);
|
||||||
console.log(qty);
|
console.log(qty);
|
||||||
console.log(JSON.stringify(product));
|
console.log(JSON.stringify(product));
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
async: true,
|
async: true,
|
||||||
crossDomain: true,
|
|
||||||
url: 'https://nurgul.com.tm/app/api/customer/cart/add/' + String(prodId),
|
url: 'https://nurgul.com.tm/app/api/customer/cart/add/' + String(prodId),
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
headers: {
|
headers: { Authorization: 'Bearer {{token}}' },
|
||||||
"authorization": "Bearer {{token}}",
|
|
||||||
"content-type": "application/json",
|
|
||||||
"cache-control": "no-cache",
|
|
||||||
// "postman-token": "c4c3ed17-bdc6-1e98-4575-f1172f789d93"
|
|
||||||
},
|
|
||||||
processData: false,
|
processData: false,
|
||||||
|
contentType: false,
|
||||||
data: JSON.stringify(product),
|
data: JSON.stringify(product),
|
||||||
beforeSend: function () {
|
dataType: 'json',
|
||||||
$('#loader_add').show();
|
|
||||||
},
|
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
console.log(data);
|
console.log(data);
|
||||||
|
|
||||||
|
|
@ -49,4 +42,4 @@
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{% endput %}
|
{% endput %}
|
||||||
Loading…
Reference in New Issue