Опубликовано: 2 мая 2016

Товары которых нет в наличии, отображать без цены

Здравствуйте.

Возможно ли для товаров которых нет в наличии, отображать без цены?

Комментарии (1)

  • 1) В файлах product-list.html и product-slider.html после строки:

    {foreach $products as $p}

    вставьте строку:

    {$available = $wa->shop->settings('ignore_stock_count') || $p.count === null || $p.count > 0}

    далее строки:

    {if $p.compare_price > 0}<span class="compare-at-price nowrap"> {if empty($theme_settings.sumbolRUB)}{if $wa->shop->currency() == 'RUB'}{shop_currency($p.compare_price, null, null, false)}{else}{shop_currency($p.compare_price)}{/if}{else}{shop_currency_html($p.compare_price)}{/if}</span>{/if}
                      	<span class="price nowrap">{if empty($theme_settings.sumbolRUB)}{shop_currency($p.price)}{else}{shop_currency_html($p.price)}{/if}</span>

    заменить строками:

    {if $available}
    {if $p.compare_price > 0}<span class="compare-at-price nowrap"> {if empty($theme_settings.sumbolRUB)}{if $wa->shop->currency() == 'RUB'}{shop_currency($p.compare_price, null, null, false)}{else}{shop_currency($p.compare_price)}{/if}{else}{shop_currency_html($p.compare_price)}{/if}</span>{/if}
                      	<span class="price nowrap">{if empty($theme_settings.sumbolRUB)}{shop_currency($p.price)}{else}{shop_currency_html($p.price)}{/if}</span>
    {/if}

    2) В файле product.cart.html строки:

    <div class="product-price">
                {if $product.compare_price > 0}<span class="compare-at-price nowrap"> {if empty($theme_settings.sumbolRUB)}{shop_currency($product.compare_price)}{else}{shop_currency_html($product.compare_price)}{/if} </span>{/if}
                <span data-price="{shop_currency($product.price, null, null, 0)}" class="price nowrap">{if empty($theme_settings.sumbolRUB)}{shop_currency($product.price)}{else}{shop_currency_html($product.price)}{/if}</span>
            </div>

    заменить строками:

    {if $product_available}
    <div class="product-price">
                {if $product.compare_price > 0}<span class="compare-at-price nowrap"> {if empty($theme_settings.sumbolRUB)}{shop_currency($product.compare_price)}{else}{shop_currency_html($product.compare_price)}{/if} </span>{/if}
                <span data-price="{shop_currency($product.price, null, null, 0)}" class="price nowrap">{if empty($theme_settings.sumbolRUB)}{shop_currency($product.price)}{else}{shop_currency_html($product.price)}{/if}</span>
            </div>
    {/if}
    1
    • Мой регион не Россия, я так понял в строках RUB поменять на мою валюту?

      1
      • Причем тут валюта к вашему предыдущему вопросу? Настройка валют осуществляется в разделе настоек приложения Магазин -> Валюты.

        1
        • Или я что-то не так сделал, или что-то не так. Но вышло следующее.

          Цены на товар в наличии, задвоились. Того что нет в наличии, цена видна, но если зайти в карточку товара, цены нет.


          1

Добавить ответ

Чтобы добавить комментарий, зарегистрируйтесь или войдите

Услуги

Контакты

Дорогие друзья!

К сожалению, Ваш браузер не поддерживает современные технологии используемые на нашем сайте.

Пожалуйста, обновите браузер, скачав его по ссылкам ниже, или обратитесь к системному администратору, обслуживающему Ваш компьютер.

Internet Explorer

от Microsoft

Chrome

от Google

Safari

от Apple

Opera

от Opera Software

Firefox

от Mozilla

Вверх