$(document).on('click', '.toggleProductionAndSetupCartView', function () {
$button = $(this);
let uuidCustomerAdvertisingArea = $button.data('uuid');
$.ajax({
url: "{{ path('app_frontend_cart_toogle-production-and-setup') }}",
method: "POST",
data: {
'uuidCustomerAdvertisingArea': uuidCustomerAdvertisingArea
},
success: function (response) {
if (response.area.withinSetup) {
$button.children('i').removeClass().addClass('fal fa-minus-square');
$button.prev('span.product-setup-price').text('zzgl. '+response.area.setupPrice+' {{ "app.currency_sign"|trans }}')
} else {
$button.children('i').removeClass().addClass('fal fa-plus-square');
$button.prev('span.product-setup-price').text('Für '+response.area.setupPrice+' {{ "app.currency_sign"|trans }} hinzufügen');
}
$('.'+uuidCustomerAdvertisingArea+'-product-price').text(response.area.pricePerPeriod+ ' {{ "app.currency_sign"|trans }}');
$('.checkout-box').find('span.total-price').text(response.cartTotal+' {{ "app.currency_sign"|trans }}');
}
});
});