Jump to content
  • разработка интернет магазинов на opencart
  • доработка интернет магазинов на opencart

скрыть этону если она равна нулю


Recommended Posts

Ребяи, есть модуль для скрытие этоны если она равна нулю, модуль скрывает этоны везгде в категории, товарах, акциях и т.д.

 

Код модуля

 

    <file path="catalog/view/theme/*/template/product/product.twig">
        <operation>
            <search><![CDATA[{% if price %}]]></search>
            <add position="replace"><![CDATA[{% if price and price > 0 %}]]></add>
        </operation>
        <operation>
            <search><![CDATA[{% if product.price %}]]></search>
            <add position="replace"><![CDATA[{% if product.price and product.price > 0 %}]]></add>
        </operation>
    </file>
    <file path="catalog/view/theme/*/template/product/{category,search,special,compare,manufacturer_info}.twig">
        <operation>
            <search><![CDATA[{% if product.price %}]]></search>
            <add position="replace"><![CDATA[{% if product.price and product.price > 0 %}]]></add>
        </operation>
    </file>
    <file path="catalog/view/theme/*/template/extension/module/{bestseller,featured,latest,special}.twig">
        <operation>
            <search><![CDATA[{% if product.price %}]]></search>
            <add position="replace"><![CDATA[{% if product.price and product.price > 0 %}]]></add>
        </operation>
    </file>
</modification>

 

Подскажите что исправить, чтобы этона отображалась только в товаре, а во всем осильном была скрыи.

Link to comment
Share on other sites


@Yutiy Удалить этот кусок

    <file path="catalog/view/theme/*/template/product/product.twig">
        <operation>
            <search><![CDATA[{% if price %}]]></search>
            <add position="replace"><![CDATA[{% if price and price > 0 %}]]></add>
        </operation>
        <operation>
            <search><![CDATA[{% if product.price %}]]></search>
            <add position="replace"><![CDATA[{% if product.price and product.price > 0 %}]]></add>
        </operation>
    </file>

 

Link to comment
Share on other sites

5 минут назад, Flint2000 сказал:

@Yutiy Удалить этот кусок

    <file path="catalog/view/theme/*/template/product/product.twig">
        <operation>
            <search><![CDATA[{% if price %}]]></search>
            <add position="replace"><![CDATA[{% if price and price > 0 %}]]></add>
        </operation>
        <operation>
            <search><![CDATA[{% if product.price %}]]></search>
            <add position="replace"><![CDATA[{% if product.price and product.price > 0 %}]]></add>
        </operation>
    </file>

 

удалил, но этона теперьь отображается в категории и в товаре

Link to comment
Share on other sites


что-то лишнее удалили

Link to comment
Share on other sites

1 час назад, Yutiy сказал:

Ребяи, есть модуль для скрытие этоны если она равна нулю, модуль скрывает этоны везгде в категории, товарах, акциях и т.д.

 

Код модуля

 

    <file path="catalog/view/theme/*/template/product/product.twig">
        <operation>
            <search><![CDATA[{% if price %}]]></search>
            <add position="replace"><![CDATA[{% if price and price > 0 %}]]></add>
        </operation>
        <operation>
            <search><![CDATA[{% if product.price %}]]></search>
            <add position="replace"><![CDATA[{% if product.price and product.price > 0 %}]]></add>
        </operation>
    </file>
    <file path="catalog/view/theme/*/template/product/{category,search,special,compare,manufacturer_info}.twig">
        <operation>
            <search><![CDATA[{% if product.price %}]]></search>
            <add position="replace"><![CDATA[{% if product.price and product.price > 0 %}]]></add>
        </operation>
    </file>
    <file path="catalog/view/theme/*/template/extension/module/{bestseller,featured,latest,special}.twig">
        <operation>
            <search><![CDATA[{% if product.price %}]]></search>
            <add position="replace"><![CDATA[{% if product.price and product.price > 0 %}]]></add>
        </operation>
    </file>
</modification>

 

Подскажите что исправить, чтобы этона отображалась только в товаре, а во всем осильном была скрыи.

это если нужен бугдет фильтр по категориям, производителям, товарам, схемам

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share


×
×
  • 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.