Изменение цены при изменении количества

Автор antoxa7, 16 декабря 2016, 06:40:00

« назад - далее »

antoxa7

Помогите пожалуйста разобраться...
Сделал все как написано здесь http://web.riva.od.ua/prestashop?start=10
Все работает, но перестала меняться цена при выборе аттрибутов. 
Куда пропала зависимость от аттрибута?

И при изменении валюты цена становится 0

if (!isNaN(currentVal) && currentVal < quantityAvailableT) {
$('input[name='+fieldName+']').val(currentVal + 1).trigger('keyup');
var total = (productPrice * (currentVal + 1));
var total = total.toFixed(2);
$('p.our_price_display').fadeOut();
$('span#our_price_display').text(total + ' ' + currencySign)
$('p.our_price_display').fadeIn();
} else {
$('input[name='+fieldName+']').val(quantityAvailableT);
}
});


if (!isNaN(currentVal) && currentVal > 1) {
$('input[name='+fieldName+']').val(currentVal - 1).trigger('keyup');
var total = (productPrice * (currentVal - 1));
var total = total.toFixed(2);
$('p.our_price_display').fadeOut();
$('span#our_price_display').text(total - ' ' + currencySign)
$('p.our_price_display').fadeIn();
} else {
$('input[name='+fieldName+']').val(1);
}


Что здесь не так?
Prestashop 1.6.1.6