223 lines
9.2 KiB
Smarty
223 lines
9.2 KiB
Smarty
{extends "index.tpl"}
|
|
|
|
{block "css" append}
|
|
{if in_array($body.category.id, [1, 2, 4]) and !$body.category.campaign}
|
|
{encore_entry_link_tags entry='home'}
|
|
{else}
|
|
{encore_entry_link_tags entry='category'}
|
|
{/if}
|
|
{/block}
|
|
|
|
|
|
{block "meta-description"}
|
|
{block "seo-gender"}
|
|
{if $body.returnNav[0][1].text == "Ženy"}
|
|
{$seo_gender = "pro ženy"}
|
|
{elseif $body.returnNav[0][1].text == "Muži"}
|
|
{$seo_gender = "pro muže"}
|
|
{elseif $body.returnNav[0][1].text == "Děti"}
|
|
{$seo_gender = "pro děti"}
|
|
{/if}
|
|
{/block}
|
|
|
|
{if $body.returnNav[0]|count == 4 and $body.category.id}
|
|
{get_seo type='first' section=$body.category.id sekce_kratka=$body.category.name|lcfirst
|
|
sekce_dlouha=$body.category.plural|lcfirst pohlavi=$seo_gender assign="category_seo"}
|
|
{elseif $body.returnNav[0]|count > 4 and $body.category.id}
|
|
{get_seo type='second' section=$body.category.id sekce_kratka=$body.category.name|lcfirst
|
|
sekce_dlouha=$body.category.plural|lcfirst pohlavi=$seo_gender assign="category_seo"}
|
|
{/if}
|
|
|
|
{if $body.category.meta_description or $body.producer.meta_description or $body.categoryProducer.meta_description}
|
|
<meta name="description" content="{$header.meta_description}">
|
|
{* descr z adminu *}
|
|
{elseif $category_seo.descr != ""}
|
|
{$category_seo.descr[0] = $category_seo.descr[0]|upper} {* tab Elnino SEO *}
|
|
<meta name="description" content="{$category_seo.descr}">
|
|
{elseif $body.producer}
|
|
<meta name="description"
|
|
content="{t vyrobce=$body.producer.name}Všechny produkty vaší oblíbené značky {vyrobce} máme skladem v e-shopu Kosmetika-zdravi.cz. Bezkonkurenční ceny a expresní dodání.{/t}">
|
|
{else}
|
|
<meta name="description" content="{$header.meta_description|default:$dbcfg.shop_description}"/>
|
|
{/if}
|
|
{/block}
|
|
|
|
{block "header-title"}
|
|
<title>
|
|
{if $body.category.meta_title}
|
|
{$header.pageTitle} {* predefinovane v adminu *}
|
|
{elseif $body.category.plural and $body.returnNav[0][1].ID == 1 and ($body.category.id == 1411 or $body.returnNav[0][2].ID == 1411)}
|
|
{$body.category.plural|replace:$seo_gender:''} - {$dbcfg.shop_title} {* zeny - liceni + podkat odebrat "pro ženy" *}
|
|
{elseif $body.category.plural}
|
|
{$body.category.plural} - {$dbcfg.shop_title}
|
|
{else}
|
|
{$header.pageTitle}
|
|
{/if}
|
|
</title>
|
|
{/block}
|
|
|
|
{block "google_tag_manager"}
|
|
{if $body.category.id}
|
|
{insert_products type="bestsellingProductsInSection" id_section=$body.category.id id_producer=$body.producer.id count=5 offset=NULL image=11 instore=true
|
|
template=null assign='bestsellingproducts'}
|
|
{/if}
|
|
|
|
{include 'block.analytics.gtm.tpl' pageType='category' bestsellingproducts=$bestsellingproducts}
|
|
{/block}
|
|
|
|
{block "breadcrumbs"}
|
|
{/block}
|
|
|
|
{block "main"}
|
|
{if in_array($body.category.id, [1, 2, 4]) and !$body.category.campaign}
|
|
{include "category.root.tpl"}
|
|
{else}
|
|
<main class="main container">
|
|
{if $body.category.flags['TT']}
|
|
{include "category.top_ten.tpl"}
|
|
{else}
|
|
{if $body.category.flags.C or $body.producer or $body.category.is_watchdog or $body.category.campaign == 'F' or ($body.category.campaign and $body.category.id <= 2)}
|
|
{$fullWidth = true}
|
|
{/if}
|
|
<div class="row" data-filter="wrapper">
|
|
{if !$fullWidth}
|
|
<div class="col-xl-2 col-lg-3 col-xxs-12 sidesection-wrapper">
|
|
{insert_sections level=2}
|
|
</div>
|
|
{/if}
|
|
|
|
<div class="{if !$fullWidth}col-xl-10 col-lg-9{/if} col-xxs-12" data-filter_form>
|
|
{include "components/breadcrumbs.tpl"}
|
|
|
|
<h1 class="h3">{$view->getTitle()}</h1>
|
|
|
|
{* {if $body.category.flags.S}
|
|
<p class="text-center pick-perfume-title"><span class="fc icons_tip"> </span> <a
|
|
href="#category-how-to" data-scroll>Jak vybrat nejvhodnější vůni?</a></p>
|
|
{/if}*}
|
|
|
|
{block 'category-slider'}
|
|
{* nezobrazovat v muzi_k2/novniky/ *}
|
|
{if $body.category.id_slider and !in_array($body.category.id, [1, 2, 4])}
|
|
{insert_slider id=$body.category.id_slider sliderClass="category-slider" template="block.slider.category.tpl"}
|
|
{/if}
|
|
{/block}
|
|
|
|
{if $body.category.virtual == "Y"}
|
|
<div class="category-top-description">
|
|
{foreach $body.category.blocks as $block}
|
|
{$block|inline_edit nofilter}
|
|
{/foreach}
|
|
</div>
|
|
{elseif $body.producer.blocks|count > 1}
|
|
<div class="category-top-description category-top-description-producer">
|
|
{foreach $body.producer.blocks->slice(1) as $block}
|
|
{$block|inline_edit nofilter}
|
|
{/foreach}
|
|
</div>
|
|
{/if}
|
|
|
|
{* {if !$body.category.flags.P}
|
|
{include "filter.tpl"}
|
|
<button type="button" class="btn btn-primary btn-block btn-filter-opener" data-filter-btn>
|
|
<span class="fc icons_filter"></span>
|
|
{t}Značky a parametry{/t}
|
|
</button>
|
|
{/if}
|
|
|
|
{if !$body.producer and !$body.category.campaign}
|
|
<button type="button" class="btn btn-outlined btn-block btn-sections-opener" data-toggle="burger">
|
|
<span class="fc icons_burger-dots"></span>
|
|
{t}Zobrazit kategorie{/t}
|
|
</button>
|
|
{/if} *}
|
|
|
|
{if $body.productsList|count}
|
|
{if $body.category.id and $body.returnNav[0][1].ID <= 4 and $body.productsList|count > 5 and
|
|
!$body.category.campaign and $body.category.virtual != "Y"}
|
|
{include "catalog/block.products.top.tpl" products=$bestsellingproducts.products listType="catalog_bestsellers"}
|
|
{/if}
|
|
<div class="products-wrapper">
|
|
|
|
{include 'filter/filter.top.tpl'}
|
|
|
|
{if !$body.category.flags.P}
|
|
{include "filter/filter.tpl"}
|
|
{/if}
|
|
{include "filter/block.filter.script.tpl"}
|
|
|
|
|
|
<div data-filter="products">
|
|
<div data-reload="products">
|
|
{if $fullWidth}
|
|
{include "block.products.tpl" products=$body.productsList}
|
|
{else}
|
|
{include "block.products.tpl" products=$body.productsList catalog_class="col-xl-3 col-md-4 col-xxs-6"}
|
|
{/if}
|
|
</div>
|
|
</div>
|
|
{if $body.pager.count > 1}
|
|
<div class="pager-bottom" data-reload="pager-bottom">
|
|
{include "components/pager.tpl" pager=$body.pager load_button=true}
|
|
</div>
|
|
{/if}
|
|
</div>
|
|
{else}
|
|
<div data-reload="products">
|
|
<div class="alert alert-info" role="alert">
|
|
{t}Žádný produkt{/t}
|
|
</div>
|
|
</div>
|
|
{/if}
|
|
|
|
{if $body.category.virtual != "Y"}
|
|
{if $body.category.descr and !$body.producer}
|
|
<div class="category-description">
|
|
{$body.category.blocks[0].content|markdown2html nofilter}
|
|
|
|
{foreach $body.category.blocks->slice(1) as $block}
|
|
{$block|inline_edit nofilter}
|
|
{/foreach}
|
|
</div>
|
|
{/if}
|
|
{if $body.producer.descr and !$body.category.id}
|
|
<div class="category-description">
|
|
{foreach $body.producer.blocks->slice(0,1) as $block}
|
|
{$block.content|markdown2html nofilter}
|
|
{/foreach}
|
|
</div>
|
|
{/if}
|
|
{/if}
|
|
|
|
{block "how-to-choose"}
|
|
{/block}
|
|
</div>
|
|
</div>
|
|
{/if}
|
|
</main>
|
|
{/if}
|
|
{/block}
|
|
|
|
{block "js-entry" append}
|
|
{if in_array($body.category.id, [1, 2, 4]) and !$body.category.campaign}
|
|
{encore_entry_script_tags entry='home'}
|
|
{else}
|
|
{encore_entry_script_tags entry='category'}
|
|
{/if}
|
|
{/block}
|
|
|
|
<script>
|
|
{block onready append}
|
|
// Openers
|
|
wpj.domUtils.initOpeners();
|
|
|
|
// jak vybrat nej vuni
|
|
$('[data-scroll]').on('click', function() {
|
|
var href = $(this).attr('href');
|
|
wpj.domUtils.scrollTo($(href));
|
|
return false;
|
|
});
|
|
|
|
{/block}
|
|
</script>
|