200 lines
7.4 KiB
Smarty
200 lines
7.4 KiB
Smarty
{extends "index.tpl"}
|
|
|
|
{block "canonical"}
|
|
{if $header.canonical_url !== false}
|
|
<link rel="canonical" href="{get_canonical_url urlGenerator=$urlGenerator}">
|
|
{/if}
|
|
{/block}
|
|
|
|
{block 'utils-end'}
|
|
{ifmodule PRODUCTS__SETS}
|
|
{$isSet = isset($body.product.campaign_codes.PS)}
|
|
{if $isSet}
|
|
{insert_products_sets id_product=$body.product.id assign="set"}
|
|
{/if}
|
|
{/ifmodule}
|
|
|
|
{block "utils-reviews"}
|
|
{ifmodule REVIEWS}
|
|
{$reviews_limit = 99999}
|
|
{if $cfg.tpl.product_reviews_ajax}
|
|
{$reviews_limit = 3}
|
|
{/if}
|
|
|
|
{$body.productCollection->fetchRating()}
|
|
{get_product_reviews id_product=$body.product.id languages=['cs'=>['sk'],'sk'=>['cs']] limit=$reviews_limit assign='product_reviews'}
|
|
|
|
{* dočasný fallback *}
|
|
{$product_reviews.rating_count = $body.product.rating.rating_count}
|
|
{$product_reviews.rating = $body.product.rating.rating}
|
|
{*{get_ratings id_product=$body.product.id languages=['cs'=>['sk'],'sk'=>['cs']] assign='product_reviews'}*}
|
|
{/ifmodule}
|
|
{/block}
|
|
|
|
{ifmodule TEMPLATES}
|
|
{get_templates product=$body.product assign='product_templates'}
|
|
{/ifmodule}
|
|
{/block}
|
|
|
|
{block "og-image"}
|
|
{if $body.product.image}
|
|
<meta property="og:image" content="{if !$module.CDN}{$cfg.Addr.full|rtrim:"/"}{/if}{get_photo photo=$body.product.image size=108}">
|
|
{else}
|
|
<meta property="og:image" content="{static_url url="/templates/images/fb-share-image.jpg" absolute=1}">
|
|
{/if}
|
|
{/block}
|
|
|
|
{block "css-entry" append}
|
|
{encore_entry_link_tags entry='product'}
|
|
{/block}
|
|
|
|
{block "main"}
|
|
{block "tpl_vars"}
|
|
{$tpl_vars.left_colummn_class = "col-xxs-12 col-sm-6 column-left"}
|
|
{$tpl_vars.right_colummn_class = "col-xxs-12 col-sm-6 col-xxl-5 column-right pull-right"}
|
|
{$tpl_vars.attachments_type = ''}
|
|
{/block}
|
|
<main class="main product-main">
|
|
<div class="container product-top">
|
|
{block "product-breadcrumbs"}
|
|
{include "components/breadcrumbs.tpl"}
|
|
{/block}
|
|
|
|
<div class="row">
|
|
<div class="{$tpl_vars.left_colummn_class|default:"col-xxs-12 col-sm-6 column-left"}">
|
|
{if $isSet}
|
|
{include "product/sets/product.sets.tpl"}
|
|
{else}
|
|
{include "product/product.gallery.tpl"}
|
|
{/if}
|
|
{include "product/product.links.tpl"}
|
|
</div>
|
|
|
|
<div class="{$tpl_vars.right_colummn_class|default:"col-xxs-12 col-sm-6 col-xxl-5 column-right pull-right"}">
|
|
{include "product/product.tags.tpl"}
|
|
|
|
{ifmodule LABELS}
|
|
{include "product/product.labels.tpl"}
|
|
{/ifmodule}
|
|
|
|
<h1>{$body.product.title}</h1>
|
|
|
|
{ifmodule PRODUCT_SETS}
|
|
{* modul product_sets - jednodušší sety k produktu *}
|
|
{include "product/product.sets.tpl"}
|
|
{/ifmodule}
|
|
|
|
{ifmodule PRODUCT_GIFTS}
|
|
{* modul product_gifts - dárky k produktu *}
|
|
{include "product/product.gifts.tpl"}
|
|
{/ifmodule}
|
|
|
|
<p class="annotation">{$body.product.descr}</p>
|
|
|
|
{if !$body.product->isold()}
|
|
{include 'product/product.template.tpl' position='price'}
|
|
{block 'product-ajax'}
|
|
{if $isB2BUser and $body.product.variations.variations|count}
|
|
{include "product/product.variations.b2b.tpl"}
|
|
{else}
|
|
{if $body.product.variations.variations|count}
|
|
{include "product/product.variations.tpl"}
|
|
{/if}
|
|
|
|
{get_unified_product product=$body.product assign="unifiedProduct"}
|
|
{include "product/product.ajax.tpl" product=$unifiedProduct}
|
|
|
|
{ifmodule PRODUCTS__SETS}
|
|
{include "product/sets/product.usedInSets.tpl"}
|
|
{/ifmodule}
|
|
{/if}
|
|
{/block}
|
|
{else}
|
|
{include "product/product.soldout.tpl"}
|
|
{/if}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<hr>
|
|
<div class="container product-bottom">
|
|
<div class="row">
|
|
<div class="{$tpl_vars.left_colummn_class|default:"col-xxs-12 col-sm-6 column-left"}">
|
|
{include "product/product.description.tpl"}
|
|
|
|
{include "product/product.template.tpl" position='description'}
|
|
</div>
|
|
|
|
<div class="{$tpl_vars.right_colummn_class|default:"col-xxs-12 col-sm-6 col-xxl-5 column-right pull-right"}">
|
|
{ifmodule PRODUCTS_COLLECTIONS}
|
|
{insert_products type="collection_product" template="product/block.products.collections.tpl" image=4 product=$body.product.id param_id=14 listType='detail_collections' listId=$body.product.id}
|
|
{/ifmodule}
|
|
|
|
{include "product/product.params.tpl"}
|
|
|
|
{include "product/product.attachments{$tpl_vars.attachments_type}.tpl"}
|
|
|
|
{if $body.product.links}
|
|
<div class="product-outlinks">
|
|
<strong>Související odkazy</strong>
|
|
<ul>
|
|
{foreach $body.product.links as $link}
|
|
<li>
|
|
<a href="{$link.link}" title="{$link.title}" target="_blank">{$link.title}</a>
|
|
</li>
|
|
{/foreach}
|
|
</ul>
|
|
</div>
|
|
{/if}
|
|
|
|
{ifmodule ARTICLES}
|
|
{get_articles product_id=$body.product.id assign="product_articles" count=3}
|
|
{if $product_articles.articles}
|
|
<p><strong>Související články</strong></p>
|
|
<div class="product-articles">
|
|
{include "articles/block.articles.small.tpl" articles=$product_articles.articles}
|
|
</div>
|
|
{/if}
|
|
{/ifmodule}
|
|
</div>
|
|
|
|
{ifmodule REVIEWS}
|
|
<div class="col-xxs-12">
|
|
{include "reviews/product.reviews.tpl"}
|
|
</div>
|
|
{/ifmodule}
|
|
|
|
{ifmodule COMMENTS}
|
|
{insert_comments id=$body.product.id assign='comments'}
|
|
<div class="col-xxs-12">
|
|
{include 'comments/comments.tpl' data=$comments}
|
|
</div>
|
|
{/ifmodule}
|
|
</div>
|
|
</div>
|
|
|
|
{insert_products type="related_product" product=$body.product count=4 in_store=1 image=2 assign=related_products template=null}
|
|
{if $related_products.products|count}
|
|
<hr>
|
|
<div class="container">
|
|
<h2>Související zboží</h2>
|
|
{include "block.products.tpl" products=$related_products.products listType='detail_related' listId=$body.product.id}
|
|
</div>
|
|
{/if}
|
|
</main>
|
|
{/block}
|
|
|
|
{block "body" append}
|
|
{include "focus/focus.product-question.tpl" class="product-question"}
|
|
<div data-reload="favorite">
|
|
{get_session_value type='added_to_favorites' assign='addedToFavorites'}
|
|
{if $addedToFavorites}
|
|
{include "focus/focus.add-to-favorite.tpl" class="added-to-favorites"}
|
|
{/if}
|
|
</div>
|
|
{/block}
|
|
|
|
{block "js-entry" append}
|
|
{encore_entry_script_tags entry='product'}
|
|
{/block}
|
|
|