Follow along with the video below to see how to install our site as a web app on your home screen.
Примечание: This feature may not be available in some browsers.
Как в версии 1.7.5 сделать описание категорий под списком товаров. Желательно на пальцах
Вроде как из category-header.tpl нужно перенести $category.description в product-list.tpl
но какой именно кусок кода и в какое место?
{extends file=$layout}
{block name='head_seo_canonical'}
{if isset($listing.pagination)}
{if $listing.pagination.should_be_displayed}
{foreach from=$listing.pagination.pages item="p_page"}
{if $p_page.current}
{if $p_page.page == 1}
{if $page.canonical}
<link rel="canonical" href="{$page.canonical}">
{/if}
{else}
<link rel="canonical" href="{$p_page.url}">{/if}
{/if}
{if $p_page.type === 'previous'}
{if $p_page.clickable}
{if $p_page.page == 1}
{if $page.canonical}
<link rel="prev" href="{$page.canonical}">
{/if}
{else}
<link rel="prev" href="{$p_page.url}">
{/if}
{/if}
{/if}
{if $p_page.type === 'next'}
{if $p_page.clickable}
<link rel="next" href="{$p_page.url}">
{/if}
{/if}
{/foreach}
{else}
{if $page.canonical}
<link rel="canonical" href="{$page.canonical}">
{/if}
{/if}
{/if}
{/block}
{block name='content'}
<section id="main">
{block name='product_list_header'}
<h1 id="js-product-list-header" class="h1 page-title"><span>{$listing.label}</span></h1>
{/block}
{assign var='arrcats' value=','|explode:"126,127,128"} {* номера категорий, у которых описание категории будет над товарами *}
{if in_array($category.id,$arrcats)}
<div class="catdescr"><img id="catdescrimg" src="{$category.image.bySize.category_default.url}" alt="{$category.meta_title}" class="img-fluid" width="{$category.image.bySize.category_default.width}" height="{$category.image.bySize.category_default.height}" >
{$category.description nofilter}
</div>
{/if}
<section id="products">
{if $listing.products|count}
{if ($category.level_depth==1)}
{else}
{if !in_array($category.id,$arrcats)}
{block name='product_list_active_filters'}
<div id="">
{$listing.rendered_active_filters nofilter}
</div>
{/block}
<div id="">
{block name='product_list_top'}
{include file='catalog/_partials/products-top.tpl' listing=$listing}
{/block}
</div>
{if $iqitTheme.pl_faceted_position}
{block name='product_list_facets_center'}
<div id="facets_search_center">
{widget name="ps_facetedsearch"}
</div>
{/block}
{/if}
{/if}
<div id="">
{block name='product_list'}
<div id="facets-loader-icon"><i class="fa fa-circle-o-notch fa-spin"></i></div>
{include file='catalog/_partials/products.tpl' listing=$listing}
{/block}
</div>
<div id="infinity-loader-icon"><i class="fa fa-circle-o-notch fa-spin"></i></div>
<div id="js-product-list-bottom">
{block name='product_list_bottom'}
{include file='catalog/_partials/products-bottom.tpl' listing=$listing}
{/block}
</div>
{block name='product_list_bottom_static'}{/block}
{/if}
{/if}
{if !in_array($category.id,$arrcats)}
<div class="catdescr"><hr /><img id="catdescrimg" src="{$category.image.bySize.category_default.url}" alt="{$category.meta_title}" class="img-fluid" width="{$category.image.bySize.category_default.width}" height="{$category.image.bySize.category_default.height}" >
{$category.description nofilter}
</div>
{/if}
</section>
</section>
{/block}
{extends file='catalog/listing/product-list.tpl'}
{capture name="justElementor"}{hook h='isJustElementor' categoryId=$category.id}{/capture}
{block name='head' append}
{if $iqitTheme.bread_bg_category}
{if $category.image.bySize.category_default.url != ''}
<style> #wrapper .breadcrumb{ background-image: url('{$category.image.bySize.category_default.url}'); }</style>
{/if}
{/if}
{/block}
{if $smarty.capture.justElementor}
{block name='left_column'}{/block}
{block name='right_column'}{/block}
{block name='content_wrapper_start'} <div id="content-wrapper" class="col-12"> {/block}
{block name='content'}
{hook h='displayCategoryElementor'}
{/block}
{else}
{block name='product_list_header'}
{include file='catalog/_partials/category-header.tpl' listing=$listing category=$category}
{if $iqitTheme.cat_sub_thumbs == 1}
{include file='catalog/_partials/category-subcategories.tpl'}
{/if}
{/block}
{block name='product_list_bottom'}
{include file='catalog/_partials/products-bottom.tpl' listing=$listing}
{/block}
{/if}
{extends file='catalog/listing/product-list.tpl'}
{block name='product_list_header'}
{include file='catalog/_partials/category-header.tpl' listing=$listing category=$category}
{/block}
<div id="js-product-list-header">
{if $listing.pagination.items_shown_from == 1}
<div class="block-category card card-block">
<h1 class="h1">{$category.name}</h1>
{if $category.description}
<div id="category-description" class="text-muted">{$category.description nofilter}</div>
{/if}
{if $category.image.large.url}
<div class="category-cover">
<img src="{$category.image.large.url}" alt="{if !empty($category.image.legend)}{$category.image.legend}{else}{$category.name}{/if}">
</div>
{/if}
</div>
{/if}
</div>
{extends file=$layout}
{block name='content'}
<section id="main">
{block name='product_list_header'}
<h2 id="js-product-list-header" class="h2">{$listing.label}</h2>
{/block}
<section id="products">
{if $listing.products|count}
<div id="">
{block name='product_list_top'}
{include file='catalog/_partials/products-top.tpl' listing=$listing}
{/block}
</div>
{block name='product_list_active_filters'}
<div id="" class="hidden-sm-down">
{$listing.rendered_active_filters nofilter}
</div>
{/block}
<div id="">
{block name='product_list'}
{include file='catalog/_partials/products.tpl' listing=$listing}
{/block}
</div>
<div id="js-product-list-bottom">
{block name='product_list_bottom'}
{include file='catalog/_partials/products-bottom.tpl' listing=$listing}
{/block}
</div>
{else}
{include file='errors/not-found.tpl'}
{/if}
</section>
</section>
{/block}
{block name='product_list_header'}
{include file='catalog/_partials/category-header.tpl' listing=$listing category=$category}
{/block}
{if $category.description}
<div id="category-description" class="text-muted">{$category.description nofilter}</div>
{/if}
{if $category.image.large.url}
<div class="category-cover">
<img src="{$category.image.large.url}" alt="{if !empty($category.image.legend)}{$category.image.legend}{else}{$category.name}{/if}">
</div>
{/if}
Ребят, еще подскажите как изменить порядок отображения товара?
И убрать надпись "НОВОЕ" на каждом товаре?
Вот Для просмотра ссылки ВойдиПодскажите в каком файле править количество выводимых символов в названии товара? версия 1.7.5.0
Спасибо.