Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

2222M22

Newbie
  
  • Posts

    5
  • Joined

  • Last visited

2222M22's Achievements

Rookie

Rookie (2/14)

  • First Post
  • Week One Done
  • One Month Later
  • One Year In
  • Conversation Starter

Recent Badges

0

Reputation

  1. Подскажите Формула калькулятора = умножение цены на количество. Но при нажатии на увеличение начинает считать только со второго значения например выбрано 2 штуки по 70 он выдает = 70, выбрано 3 по 70 он выдает 140 хотя в самом скрипте все отображается корректно при дебаггере. В чем может быть причина? код калькулятора $(document).ready(function(){ $(".price-new span.number99").clone() .css({'font-size':'16px','font-weight':'400','color':'#787a88'}) .appendTo("#price2"); }); $(document).ready(function() { $('.counter-plus').click(function () { var tariff = $(".price-new span.number99").text(); var quantity = $('#kolvo').val(); var sum = tariff * quantity; $('#price2').html(sum); }) }); $(document).ready(function() { $('.counter-minus').click(function () { var tariff = $(".price-new span.number99").text(); var quantity = $('#kolvo').val(); var sum = tariff * quantity; $('#price2').html(sum); }) });
  2. Либо, если кто знает как сделать чтобы само число в цене выводилось как атрибут в коде числом вот так примерно: <span class="price-new" price="195">195<span class="symbol">руб. /шт.</span></span> Буду благодарен за помощь
  3. public function format($number, $currency, $value = '', $format = true) { $symbol_left = $this->currencies[$currency]['symbol_left']; $symbol_right = $this->currencies[$currency]['symbol_right']; $decimal_place = $this->currencies[$currency]['decimal_place']; if (!$value) { $value = $this->currencies[$currency]['value']; } $amount = $value ? (float)$number * $value : (float)$number; $amount = round($amount, (int)$decimal_place); if (!$format) { return $amount; } $string = ''; if ($symbol_left) { $string .= "<span class=\"symbol\">" . $symbol_left . "</span>"; } $string .= number_format($amount, (int)$decimal_place, $this->language->get('decimal_point'), $this->language->get('thousand_point')); if ($symbol_right) { $string .= "<span class=\"symbol\">" . $symbol_right . "</span>"; } return $string; } тут, как я понимаю
  4. Добрый день ребят, подскажите как обернуть в span цену (само число без единица измерения) товара, которая находится в "price-new" <span class="price-new">195 <span class="symbol">руб. /шт.</span></span> Единицы уже обернуты, как я понимаю это сделать в currency.php
Guest
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.