30 lines
833 B
HTML
30 lines
833 B
HTML
|
|
{% put scripts %}
|
||
|
|
|
||
|
|
<script>
|
||
|
|
$(window).on("load", getCart());
|
||
|
|
// console.log("qqq");
|
||
|
|
function getCart() {
|
||
|
|
// console.log(String({{token}}));
|
||
|
|
|
||
|
|
$.ajax({
|
||
|
|
url: `https://derman.com.tm/dermanhana/webq/api/customer/cart`,
|
||
|
|
type: 'GET',
|
||
|
|
dataType: 'json',
|
||
|
|
headers: {Authorization: 'Bearer {{token}}'},
|
||
|
|
success: function (data, textStatus, xhr) {
|
||
|
|
console.log(data);
|
||
|
|
console.log(textStatus);
|
||
|
|
console.log(xhr);
|
||
|
|
},
|
||
|
|
error: function (xhr, textStatus, errorThrown) {
|
||
|
|
console.log('Error in Operation');
|
||
|
|
console.log(xhr);
|
||
|
|
console.log(textStatus);
|
||
|
|
console.log(errorThrown);
|
||
|
|
}
|
||
|
|
});
|
||
|
|
|
||
|
|
}
|
||
|
|
</script>
|
||
|
|
{% endput %}
|