{% put scripts %}

<script>
    $(window).on("load", getCart());
    // console.log("qqq");
    function getCart() {
        // console.log(String({{token}}));

        $.ajax({
            url: `https://nurgul.com.tm/app/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 %}
