function add_to_cart(id) {
let token = '{{csrf_token}}';
$.ajax({
headers: { "X-CSRFToken": token },
url: '/add-to-cart/',
type: 'POST',
data: {'id':id},
success: function(data) {
get_cart()
},
failure: function(data) {
console.log('Не успешно');
}
});
}