333 lines
16 KiB
HTML
333 lines
16 KiB
HTML
{extends file="layout.tpl"}
|
|
|
|
{* Body Class *}
|
|
{block name="body-class"}page-product{/block}
|
|
|
|
{* Page Title *}
|
|
{block name='no-return-functions' append}
|
|
{loop name="product.seo.title" type="product" id="{product attr="id"}" limit="1" with_prev_next_info="1"}
|
|
{$page_title = {$META_TITLE}}
|
|
{/loop}
|
|
{/block}
|
|
|
|
{* Meta *}
|
|
{block name="meta"}
|
|
{loop name="product.seo.meta" type="product" id="{product attr="id"}" limit="1" with_prev_next_info="1"}
|
|
{include file="includes/meta-seo.html"}
|
|
{/loop}
|
|
{/block}
|
|
|
|
{* Breadcrumb *}
|
|
{block name='no-return-functions' append}
|
|
{$breadcrumbs = []}
|
|
{loop type="product" name="product_breadcrumb" id="{product attr="id"}" limit="1" with_prev_next_info="1"}
|
|
{loop name="category_path" type="category-path" category="{$DEFAULT_CATEGORY}"}
|
|
{$breadcrumbs[] = ['title' => {$TITLE}, 'url'=> {$URL}]}
|
|
{/loop}
|
|
{$breadcrumbs[] = ['title' => {$TITLE}, 'url'=> {$URL}]}
|
|
{/loop}
|
|
{/block}
|
|
|
|
{* Content *}
|
|
{block name="main-content"}
|
|
|
|
{$product_id={product attr="id"}}
|
|
{$pse_count={count type="product_sale_elements" product="$product_id"}}
|
|
{$check_availability={config key="check-available-stock" default="1"}}
|
|
|
|
<div class="main">
|
|
{loop name="product.details" type="product" id="{product attr="id"}" limit="1" with_prev_next_info="1"}
|
|
<article id="product" class="col-main" role="main" itemscope itemtype="http://schema.org/Product">
|
|
|
|
<!-- Use the meta tag to specify content that is not visible on the page in any way -->
|
|
{loop name="brand.feature" type="brand" product="{$ID}"}
|
|
<meta itemprop="brand" content="{$TITLE}">
|
|
{/loop}
|
|
|
|
{loop name="isbn.feature" type="feature" product="{$ID}" title="isbn"}
|
|
{loop name="isbn.value" type="feature_value" feature="{$ID}" product="{product attr="id"}"}
|
|
<meta itemprop="productID" content="isbn:{$TITLE}">
|
|
{/loop}
|
|
{/loop}
|
|
|
|
<section id="product-gallery">
|
|
{ifloop rel="image.main"}
|
|
<figure class="product-image">
|
|
{loop type="image" name="image.main" product="{$ID}" width="560" height="445" resize_mode="borders" limit="1"}
|
|
<img src="{$IMAGE_URL}" alt="{$TITLE}" class="img-responsive" itemprop="image" data-toggle="magnify">
|
|
{/loop}
|
|
</figure>
|
|
{/ifloop}
|
|
|
|
{ifloop rel="image.carousel"}
|
|
<div id="product-thumbnails" class="slide" style="position:relative;">
|
|
<div class="carousel-inner">
|
|
<div class="item active">
|
|
<ul>
|
|
{loop name="image.carousel" type="image" product="{$ID}" width="560" height="445" resize_mode="borders" limit="5"}
|
|
<li>
|
|
<a href="{$IMAGE_URL}" class="thumbnail {if $LOOP_COUNT == 1}active{/if}">
|
|
{loop type="image" name="image.thumbs" id="{$ID}" product="$OBJECT_ID" width="118" height="85" resize_mode="borders"}
|
|
<img src="{$IMAGE_URL}" alt="{$TITLE}">
|
|
{/loop}
|
|
</a>
|
|
</li>
|
|
{/loop}
|
|
</ul>
|
|
</div>
|
|
{ifloop rel="image.carouselsup"}
|
|
<div class="item">
|
|
<ul>
|
|
{loop name="image.carouselsup" type="image" product="{$ID}" width="560" height="445" resize_mode="borders" offset="5"}
|
|
<li>
|
|
<a href="{$IMAGE_URL}" class="thumbnail">
|
|
{loop type="image" name="image.thumbssup" id="{$ID}" product="$OBJECT_ID" width="118" height="85" resize_mode="borders"}
|
|
<img src="{$IMAGE_URL}" alt="{$TITLE}">
|
|
{/loop}
|
|
</a>
|
|
</li>
|
|
{/loop}
|
|
</ul>
|
|
</div>
|
|
{/ifloop}
|
|
</div>
|
|
{ifloop rel="image.carouselsup"}
|
|
<a class="left carousel-control" href="#product-thumbnails" data-slide="prev"><i class="icon-prev"></i></a>
|
|
<a class="right carousel-control" href="#product-thumbnails" data-slide="next"><i class="icon-next"></i></a>
|
|
{/ifloop}
|
|
</div>
|
|
{/ifloop}
|
|
</section>
|
|
|
|
<section id="product-details">
|
|
<div class="product-info">
|
|
<h1 class="name"><span itemprop="name">{$TITLE}</span><span id="pse-name" class="pse-name"></span></h1>
|
|
{if $REF}<span itemprop="sku" class="sku">{intl l='Ref.'}: <span id="pse-ref">{$REF}</span></span>{/if}
|
|
|
|
{loop name="brand_info" type="brand" product="{$ID}"}
|
|
<p><a href="{$URL}" title="{intl l="More information about this brand"}"><span itemprop="brand">{$TITLE}</span></a></p>
|
|
{/loop}
|
|
|
|
{if $POSTSCRIPTUM}<div class="short-description">
|
|
<p>{$POSTSCRIPTUM}</p>
|
|
</div>{/if}
|
|
</div>
|
|
|
|
<div class="product-price" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
|
|
<div class="availability">
|
|
<span class="availibity-label">{intl l="Availability"}: </span>
|
|
<span itemprop="availability" href="{$current_stock_href}" class="" id="pse-availability">
|
|
<span class="in">{intl l='In Stock'}</span>
|
|
<span class="out">{intl l='Out of Stock'}</span>
|
|
</span>
|
|
</div>
|
|
|
|
<div class="price-container">
|
|
{loop type="category" name="category_tag" id=$DEFAULT_CATEGORY}
|
|
<meta itemprop="category" content="{$TITLE}">
|
|
{/loop}
|
|
{* List of condition : NewCondition, DamagedCondition, UsedCondition, RefurbishedCondition *}
|
|
<meta itemprop="itemCondition" itemscope itemtype="http://schema.org/NewCondition">
|
|
{* List of currency : The currency used to describe the product price, in three-letter ISO format. *}
|
|
<meta itemprop="priceCurrency" content="{currency attr="symbol"}">
|
|
|
|
<span id="pse-promo">
|
|
<span class="special-price"><span itemprop="price" class="price-label">{intl l="Special Price:"} </span><span id="pse-price" class="price">{format_number number="{$TAXED_PROMO_PRICE}"} {currency attr="symbol"}</span></span>
|
|
<span class="old-price"><span class="price-label">{intl l="Regular Price:"} </span><span id="pse-price-old" class="price">{format_number number="{$TAXED_PRICE}"} {currency attr="symbol"}</span></span>
|
|
</span>
|
|
</div>
|
|
|
|
<div id="pse-validity" class="validity alert alert-warning" style="display: none;" >
|
|
{intl l="Sorry but this combination does not exist."}
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{form name="thelia.cart.add" }
|
|
<form id="form-product-details" action="{url path="/cart/add" }" method="post" class="form-product">
|
|
{form_hidden_fields form=$form}
|
|
<input type="hidden" name="view" value="product">
|
|
<input type="hidden" name="product_id" value="{$ID}">
|
|
{form_field form=$form field="append"}
|
|
<input type="hidden" name="{$name}" value="1">
|
|
{/form_field}
|
|
|
|
{if $form_error}<div class="alert alert-error">{$form_error_message}</div>{/if}
|
|
|
|
{form_field form=$form field="product"}
|
|
<input id="{$label_attr.for}" type="hidden" name="{$name}" value="{$ID}" {$attr} >
|
|
{/form_field}
|
|
|
|
{* pse *}
|
|
{form_field form=$form field='product_sale_elements_id'}
|
|
<input id="pse-id" type="hidden" name="{$name}" value="{$PRODUCT_SALE_ELEMENT}" {$attr} >
|
|
{/form_field}
|
|
|
|
{if $pse_count > 1}
|
|
{* We have more than 1 combination: custom form *}
|
|
<fieldset id="pse-options" class="product-options">
|
|
{loop name="attributes" type="attribute" product="$product_id" order="manual"}
|
|
<div class="option">
|
|
<label for="option-{$ID}" class="option-heading">{$TITLE}</label>
|
|
<div class="option-content">
|
|
<select id="option-{$ID}" name="option-{$ID}" class="form-control pse-option" data-attribute="{$ID}"></select>
|
|
</div>
|
|
</div>
|
|
{/loop}
|
|
</fieldset>
|
|
{/if}
|
|
|
|
<fieldset class="product-cart form-inline">
|
|
{form_field form=$form field='quantity'}
|
|
<div class="form-group group-qty {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
|
|
<label for="{$label_attr.for}">{$label}</label>
|
|
<input type="number" name="{$name}" id="{$label_attr.for}" class="form-control" value="{$value|default:1}" min="1" required>
|
|
{if $error }
|
|
<span class="help-block">{$message}</span>
|
|
{elseif $value != "" && !$error}
|
|
<span class="help-block"><i class="icon-ok"></i></span>
|
|
{/if}
|
|
</div>
|
|
{/form_field}
|
|
|
|
<div class="form-group group-btn">
|
|
<button id="pse-submit" type="submit" class="btn btn_add_to_cart">{intl l="Add to cart"}</button>
|
|
</div>
|
|
</fieldset>
|
|
|
|
</form>
|
|
{/form}
|
|
</section>
|
|
|
|
{strip}
|
|
{capture "additional"}
|
|
{ifloop rel="feature_info"}
|
|
|
|
<ul>
|
|
{loop name="feature_info" type="feature" product="{$ID}"}
|
|
{ifloop rel="feature_value_info"}
|
|
<li>
|
|
<strong>{$TITLE}</strong> :
|
|
{loop name="feature_value_info" type="feature_value" feature="{$ID}" product="{product attr="id"}"}
|
|
{if $LOOP_COUNT > 1}, {else} {/if}
|
|
<span>{if $IS_FREE_TEXT == 1}{$FREE_TEXT_VALUE}{else}{$TITLE}{/if}</span>
|
|
{/loop}
|
|
</li>
|
|
{/ifloop}
|
|
{/loop}
|
|
</ul>
|
|
|
|
{/ifloop}
|
|
{/capture}
|
|
{/strip}
|
|
|
|
{strip}
|
|
{capture "brand_info"}
|
|
{loop name="brand_info" type="brand" product="{$ID}"}
|
|
<p><strong><a href="{$URL}">{$TITLE}</a></strong></p>
|
|
|
|
{loop name="brand.image" type="image" source="brand" id={$LOGO_IMAGE_ID} width=218 height=146 resize_mode="borders"}
|
|
<p><a href="{$URL}"><img itemprop="image" src="{$IMAGE_URL}" alt="{$TITLE}"></a></p>
|
|
{/loop}
|
|
|
|
{if $CHAPO}
|
|
<div class="chapo">
|
|
{$CHAPO}
|
|
</div>
|
|
{/if}
|
|
{if $DESCRIPTION}
|
|
<div class="description">
|
|
{$DESCRIPTION nofilter}
|
|
</div>
|
|
{/if}
|
|
{if $POSTSCRIPTUM}
|
|
<small class="postscriptum">
|
|
{$POSTSCRIPTUM}
|
|
</small>
|
|
{/if}
|
|
{/loop}
|
|
{/capture}
|
|
{/strip}
|
|
|
|
<section id="product-tabs">
|
|
<ul class="nav nav-tabs" role="tablist">
|
|
<li class="active" role="presentation"><a id="tab1" href="#description" data-toggle="tab" role="tab">{intl l="Description"}</a></li>
|
|
{if $smarty.capture.additional ne ""}<li role="presentation"><a id="tab2" href="#additional" data-toggle="tab" role="tab">{intl l="Additional Info"}</a></li>{/if}
|
|
{if $smarty.capture.brand_info ne ""}<li role="presentation"><a id="tab3" href="#brand_info" data-toggle="tab" role="tab">{intl l="Brand information"}</a></li>{/if}
|
|
|
|
</ul>
|
|
<div class="tab-content">
|
|
<div class="tab-pane active in" id="description" itemprop="description" role="tabpanel" aria-labelledby="tab1">
|
|
<p>{$DESCRIPTION|default:'N/A' nofilter}</p>
|
|
</div>
|
|
{if $smarty.capture.additional ne ""}
|
|
<div class="tab-pane" id="additional" role="tabpanel" aria-labelledby="tab2">
|
|
{$smarty.capture.additional nofilter}
|
|
</div>
|
|
{/if}
|
|
{if $smarty.capture.brand_info ne ""}
|
|
<div class="tab-pane" id="brand_info" role="tabpanel" aria-labelledby="tab3">
|
|
{$smarty.capture.brand_info nofilter}
|
|
</div>
|
|
{/if}
|
|
</div>
|
|
</section>
|
|
{* javascript confiuguration to display pse *}
|
|
{$pse=[]}
|
|
{$combination_label=[]}
|
|
{$combination_values=[]}
|
|
{loop name="pse" type="product_sale_elements" product="{product attr="id"}"}
|
|
{$pse[$ID]=["id" => $ID, "isDefault" => $IS_DEFAULT, "isPromo" => $IS_PROMO, "isNew" => $IS_NEW, "ref" => "{$REF}", "ean" => "{$EAN}", "quantity" => {$QUANTITY}, "price" => "{format_number number="{$TAXED_PRICE}"} {currency attr="symbol"}", "promo" => "{format_number number="{$TAXED_PROMO_PRICE}"} {currency attr="symbol"}" ]}
|
|
{$pse_combination=[]}
|
|
{loop name="combi" type="attribute_combination" product_sale_elements="$ID"}
|
|
{if ! $combination_label[$ATTRIBUTE_ID]}
|
|
{$combination_label[$ATTRIBUTE_ID]=["name" => "{$ATTRIBUTE_TITLE}", "values" => []]}
|
|
{/if}
|
|
{if ! $combination_values[$ATTRIBUTE_AVAILABILITY_ID]}
|
|
{$combination_label[$ATTRIBUTE_ID]["values"][]=$ATTRIBUTE_AVAILABILITY_ID}
|
|
{$combination_values[$ATTRIBUTE_AVAILABILITY_ID]=["{$ATTRIBUTE_AVAILABILITY_TITLE}", $ATTRIBUTE_ID]}
|
|
{/if}
|
|
{$pse_combination[]=$ATTRIBUTE_AVAILABILITY_ID}
|
|
{/loop}
|
|
{$pse[$ID]["combinations"]=$pse_combination}
|
|
{/loop}
|
|
<script type="text/javascript">
|
|
// Product sale elements
|
|
var PSE_FORM = true;
|
|
var PSE_COUNT = {$pse_count};
|
|
{if $check_availability}
|
|
var PSE_CHECK_AVAILABILITY = true;
|
|
{else}
|
|
var PSE_CHECK_AVAILABILITY = false;
|
|
{/if};
|
|
var PSE_DEFAULT_AVAILABLE_STOCK = {config key="default-available-stock" default="100"};
|
|
var PSE = {$pse|json_encode nofilter};
|
|
var PSE_COMBINATIONS = {$combination_label|json_encode nofilter};
|
|
var PSE_COMBINATIONS_VALUE = {$combination_values|json_encode nofilter};
|
|
</script>
|
|
{if $pse_count > 1}
|
|
{/if}
|
|
|
|
</article><!-- /#product -->
|
|
|
|
<ul class="pager">
|
|
{if $HAS_PREVIOUS == 1}
|
|
{loop type="product" name="prev_product" id="{$PREVIOUS}"}
|
|
<li class="previous"><a href="{$URL}">{intl l="Previous product"}</a></li>
|
|
{/loop}
|
|
{/if}
|
|
{if $HAS_NEXT == 1}
|
|
{loop type="product" name="next_product" id="{$NEXT}"}
|
|
<li class="next"><a href="{$URL}">{intl l="Next product"}</a></li>
|
|
{/loop}
|
|
{/if}
|
|
</ul>
|
|
{/loop}
|
|
|
|
</div><!-- /.main -->
|
|
{/block}
|
|
|
|
{block name="javascript-initialization"}
|
|
|
|
|
|
{/block} |