Наличие товара в Joomshopping работает не правильно скрипт

Тема в разделе "JoomShopping", создана пользователем amoRNizam, 14.12.2015.

  1. Offline

    amoRNizam Недавно здесь

    Регистрация:
    30.10.2015
    Сообщения:
    11
    Симпатии:
    1
    Пол:
    Мужской
    Здравствуйте. Помогите пожалуйста! В joomshopping включил отображение наличия товара. Выставляю количество товара в атрибутах и скрипт отрабатывает не правильно. Поясню на картинках. Выставил положительное количество профиля в каждом атрибуте. В итоге, когда загружается страница надпись "В наличии" не отображается, затем, если щелкнуть по первому атрибуту(который итак выбран) надпись появляется и при этом пропадает "Старая цена", потом на втором атрибуте она пропадает, на третьем появляется. А должна отображаться постоянно, так как по всем атрибутам выставлено положительное значение (тоесть товар в наличии).
    Вот сам скрипт
    Код (PHP):
    1. <script type="text/javascript">
    2.     <?php if ($this->product->product_quantity >0){?>
    3.     var translate_not_available = "<?php print addslashes(_JSHOP_PRODUCT_NOT_AVAILABLE_THIS_OPTION)?>";
    4.     <?php }else{?>
    5.     var translate_not_available = "<?php print addslashes(_JSHOP_PRODUCT_NOT_AVAILABLE)?>";
    6.     <?php }?>
    7.     var translate_zoom_image = "<?php print addslashes(_JSHOP_ZOOM_IMAGE)?>";
    8.     var product_basic_price_volume = <?php print $this->product->weight_volume_units;?>;
    9.     var product_basic_price_unit_qty = <?php print $this->product->product_basic_price_unit_qty;?>;
    10.     var currency_code = "<?php print $this->config->currency_code;?>";
    11.     var format_currency = "<?php print $this->config->format_currency[$this->config->currency_format];?>";
    12.     var decimal_count = <?php print $this->config->decimal_count;?>;
    13.     var decimal_symbol = "<?php print $this->config->decimal_symbol;?>";
    14.     var thousand_separator = "<?php print $this->config->thousand_separator;?>";
    15.     var attr_value = new Object();
    16.     var attr_list = new Array();
    17.     var attr_img = new Object();
    18.     <?php if (count($this->attributes)){?>
    19.         <?php $i=0;foreach($this->attributes as $attribut){?>
    20.         attr_value["<?php print $attribut->attr_id?>"] = "<?php print $attribut->firstval?>";
    21.         attr_list[<?php print $i++;?>] = "<?php print $attribut->attr_id?>";
    22.         <?php } ?>
    23.     <?php } ?>
    24.     <?php foreach($this->all_attr_values as $attrval){ if ($attrval->image){?>attr_img[<?php print $attrval->value_id?>] = "<?php print $attrval->image?>";<?php } }?>
    25.     var liveurl = '<?php print JURI::root()?>';
    26.     var liveattrpath = '<?php print $this->config->image_attributes_live_path;?>';
    27.     var liveproductimgpath = '<?php print $this->config->image_product_live_path;?>';
    28.     var liveimgpath = '<?php print $this->config->live_path."images";?>';
    29.     var urlupdateprice = '<?php print $this->urlupdateprice;?>';
    30.     <?php print $this->_tmp_product_ext_js;?>
    31. </script>


    образец.png
     
    Последнее редактирование модератором: 25.12.2015
  2.  

Поделиться этой страницей

Загрузка...