Автор Тема: Изменение цены при изменении количества  (Прочитано 756 раз)

16 Декабрь 2016, 06:40:00
  • Новичок
  • *
  • Сообщений: 23
  • Репутация: +0/-0
  • Сообщество PrestaShop
    • Просмотр профиля
Помогите пожалуйста разобраться...
Сделал все как написано здесь 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