Перейти к содержанию

Hidden categories


replayer

Рекомендуемые сообщения

  • 7 месяцев спустя...
Post #14543 Опубликовано

Hello, 

 

I've changed the template product_categories_list.tpl a bit and I like it now. I can't hide the hidden categories. I've tried that, but it doesn't work. Can someone help me?

 

<ul class="ab-mb-prod-categories-list">
    {foreach $product.category_ids as $cat_id}
        {assign var="cat_data" value=fn_get_category_data($cat_id, $smarty.const.CART_LANGUAGE)}
        {if $cat_data.status == "A"}   {* Show only active categories *}
            <li>
                {assign var="cat_pair" value=fn_get_image_pairs($cat_id, 'category', 'M', true, true)}
                {if $cat_pair}
                    <a href="{"categories.view?category_id=`$cat_id`"|fn_url}" 
                       title="Alle {$cat_data.category} anzeigen">
                        {include file="common/image.tpl"
                            show_detailed_link=false
                            images=$cat_pair
                            no_ids=true
                            image_id="category_image"
                            image_width=40
                            image_height=40
                        }
                    </a>
                {/if}
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <a href="{"categories.view?category_id=`$cat_id`"|fn_url}" title="Mehr {$cat_data.category} anzeigen">
                    {$cat_data.category}
                </a>
            </li>
        {/if}
    {/foreach}
</ul>

 

 

 

 

 

 

product_categories_list.tpl 

---------------------------------------------------------------------------------------------------------------------------------

{strip}
{if $ab__mb_item.template_settings && $ab__mb_item.template_settings.brand_feature_id}
    {$mb__header_feature = fn_ab__mb_get_brand_feature(['product' => $product, 'feature_id' => $ab__mb_item.template_settings.brand_feature_id])}
{/if}

{hook name="ab__mb:tmpl_product_categories_list"}
<ul class="ab-mb-prod-categories-list">
    {foreach fn_get_category_name($product.category_ids, $smarty.const.CART_LANGUAGE, true) as $cat_id => $mb_cat}
        <li>
            {assign var="cat_pair" value=fn_get_image_pairs($cat_id, 'category', 'M', true, true)}
            {if $cat_pair}
                <a href="{"categories.view?category_id=`$cat_id`"|fn_url}" 
                   title="Alle {$mb_cat} anzeigen">
                    {include file="common/image.tpl"
                        show_detailed_link=false
                        images=$cat_pair
                        no_ids=true
                        image_id="category_image"
                        image_width=40
                        image_height=40
                    }
                </a>
            {/if}
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <a href="{"categories.view?category_id=`$cat_id`"|fn_url}" title="Mehr {$mb_cat} anzeigen">{$mb_cat}</a>
        </li>
    {/foreach}
</ul>

<ul class="ab-mb-prod-categories-list">
    {foreach fn_get_category_name($product.category_ids, $smarty.const.CART_LANGUAGE, true) as $cat_id => $mb_cat}
        <li>
            {if $mb__header_feature.features_hash}
                <a href="{"categories.view&category_id=`$cat_id`&features_hash=`$mb__header_feature.features_hash`"|fn_url}" 
                   title="Mehr {$mb__header_feature.variant} {$mb_cat} anzeigen">
                    {if $product.brand_icon}
                        {include file="common/image.tpl" object_type="feature_variant" images=$product.brand_icon image_width=59px}
                    {/if}
                    {$mb__header_feature.variant} {$mb_cat}
                </a>
            {/if}
        </li>
    {/foreach}
</ul>
{/hook}
{/strip}
 

Для публикации сообщений создайте учётную запись или авторизуйтесь

Вы должны быть пользователем, чтобы оставить комментарий

Создать аккаунт

Зарегистрируйте новый аккаунт в нашем сообществе. Это очень просто!

Регистрация нового пользователя

Войти

Уже есть аккаунт? Войти в систему.

Войти
  • Последние посетители   0 пользователей онлайн

    • Ни одного зарегистрированного пользователя не просматривает данную страницу
×
×
  • Создать...