Advertisement
Guest User

Untitled

a guest
Apr 26th, 2018
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Smarty 45.04 KB | None | 0 0
  1.  
  2.  
  3. {*
  4. * 2007-2015 PrestaShop
  5. *
  6. * NOTICE OF LICENSE
  7. *
  8. * This source file is subject to the Academic Free License (AFL 3.0)
  9. * that is bundled with this package in the file LICENSE.txt.
  10. * It is also available through the world-wide-web at this URL:
  11. * http://opensource.org/licenses/afl-3.0.php
  12. * If you did not receive a copy of the license and are unable to
  13. * obtain it through the world-wide-web, please send an email
  14. * to license@prestashop.com so we can send you a copy immediately.
  15. *
  16. * DISCLAIMER
  17. *
  18. * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
  19. * versions in the future. If you wish to customize PrestaShop for your
  20. * needs please refer to http://www.prestashop.com for more information.
  21. *
  22. *  @author PrestaShop SA <contact@prestashop.com>
  23. *  @copyright  2007-2015 PrestaShop SA
  24. *  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
  25. *  International Registered Trademark & Property of PrestaShop SA
  26. *}
  27. {include file="$tpl_dir./errors.tpl"}
  28. {if $errors|@count == 0}
  29.     {if !isset($priceDisplayPrecision)}
  30.         {assign var='priceDisplayPrecision' value=2}
  31.     {/if}
  32.     {if !$priceDisplay || $priceDisplay == 2}
  33.         {assign var='productPrice' value=$product->getPrice(true, $smarty.const.NULL, 6)}
  34.         {assign var='productPriceWithoutReduction' value=$product->getPriceWithoutReduct(false, $smarty.const.NULL)}
  35.     {elseif $priceDisplay == 1}
  36.         {assign var='productPrice' value=$product->getPrice(false, $smarty.const.NULL, 6)}
  37.         {assign var='productPriceWithoutReduction' value=$product->getPriceWithoutReduct(true, $smarty.const.NULL)}
  38.     {/if}
  39. <div itemscope itemtype="https://schema.org/Product">
  40.     <meta itemprop="url" content="{$link->getProductLink($product)}">
  41.     <div class="primary_block row">
  42.         {if isset($adminActionDisplay) && $adminActionDisplay}
  43.             <div id="admin-action" class="container">
  44.                 <p class="alert alert-info">{l s='This product is not visible to your customers.'}
  45.                     <input type="hidden" id="admin-action-product-id" value="{$product->id}" />
  46.                     <a id="publish_button" class="btn btn-default button button-small" href="#">
  47.                         <span>{l s='Publish'}</span>
  48.                     </a>
  49.                     <a id="lnk_view" class="btn btn-default button button-small" href="#">
  50.                         <span>{l s='Back'}</span>
  51.                     </a>
  52.                 </p>
  53.                 <p id="admin-action-result"></p>
  54.             </div>
  55.         {/if}
  56.         {if isset($confirmation) && $confirmation}
  57.             <p class="confirmation">
  58.                 {$confirmation}
  59.             </p>
  60.         {/if}
  61.         <!-- left infos-->
  62.         <div class="pb-left-column col-xs-12 col-sm-5 col-md-6">
  63.             <!-- product img-->
  64.             <div id="image-block" class="clearfix">
  65.                 {if $product->new}
  66.                     <span class="new-box">
  67.                         <span class="new-label">{l s='New'}</span>
  68.                     </span>
  69.                 {/if}
  70.                 {if $product->on_sale}
  71.                     <span class="sale-box no-print">
  72.                         <span class="sale-label">{l s='Sale'}</span>
  73.                     </span>
  74.                 {elseif $product->specificPrice && $product->specificPrice.reduction && $productPriceWithoutReduction > $productPrice}
  75.                     <span class="discount">{l s='Reduced price!'}</span>
  76.                 {/if}
  77.                 {if $have_image}
  78.                     <span id="view_full_size">
  79.                         {if $jqZoomEnabled && $have_image && !$content_only}
  80.                             <a class="jqzoom" title="{if !empty($cover.legend)}{$cover.legend|escape:'html':'UTF-8'}{else}{$product->name|escape:'html':'UTF-8'}{/if}" rel="gal1" href="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'thickbox_default')|escape:'html':'UTF-8'}">
  81.                                 <img itemprop="image" src="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'large_default')|escape:'html':'UTF-8'}" title="{if !empty($cover.legend)}{$cover.legend|escape:'html':'UTF-8'}{else}{$product->name|escape:'html':'UTF-8'}{/if}" alt="{if !empty($cover.legend)}{$cover.legend|escape:'html':'UTF-8'}{else}{$product->name|escape:'html':'UTF-8'}{/if}"/>
  82.                             </a>
  83.                         {else}
  84.                             <img id="bigpic" itemprop="image" src="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'large_default')|escape:'html':'UTF-8'}" title="{if !empty($cover.legend)}{$cover.legend|escape:'html':'UTF-8'}{else}{$product->name|escape:'html':'UTF-8'}{/if}" alt="{if !empty($cover.legend)}{$cover.legend|escape:'html':'UTF-8'}{else}{$product->name|escape:'html':'UTF-8'}{/if}" width="{$largeSize.width}" height="{$largeSize.height}"/>
  85.                             {if !$content_only}
  86.                                 <span class="span_link no-print">{l s='View larger'}</span>
  87.                             {/if}
  88.                         {/if}
  89.                     </span>
  90.                 {else}
  91.                     <span id="view_full_size">
  92.                         <img itemprop="image" src="{$img_prod_dir}{$lang_iso}-default-large_default.jpg" id="bigpic" alt="" title="{$product->name|escape:'html':'UTF-8'}" width="{$largeSize.width}" height="{$largeSize.height}"/>
  93.                         {if !$content_only}
  94.                             <span class="span_link">
  95.                                 {l s='View larger'}
  96.                             </span>
  97.                         {/if}
  98.                     </span>
  99.                 {/if}
  100.             </div> <!-- end image-block -->
  101.             {if isset($images) && count($images) > 0}
  102.                 <!-- thumbnails -->
  103.                 <div id="views_block" class="clearfix {if isset($images) && count($images) < 2}hidden{/if}">
  104.                     {if isset($images) && count($images) > 2}
  105.                         <a id="view_scroll_left" class="" title="{l s='Other views'}" href="javascript:{ldelim}{rdelim}">
  106.                             <i class="icon-angle-left"></i>{l s='Previous'}
  107.                         </a>
  108.                     {/if}
  109.                     <div id="thumbs_list">
  110.                         <ul id="thumbs_list_frame">
  111.                         {if isset($images)}
  112.                             {foreach from=$images item=image name=thumbnails}
  113.                                 {assign var=imageIds value="`$product->id`-`$image.id_image`"}
  114.                                 {if !empty($image.legend)}
  115.                                     {assign var=imageTitle value=$image.legend|escape:'html':'UTF-8'}
  116.                                 {else}
  117.                                     {assign var=imageTitle value=$product->name|escape:'html':'UTF-8'}
  118.                                 {/if}
  119.                                 <li id="thumbnail_{$image.id_image}"{if $smarty.foreach.thumbnails.last} class="last"{/if}>
  120.                                     <a{if $jqZoomEnabled && $have_image && !$content_only} href="javascript:void(0);" rel="{literal}{{/literal}gallery: 'gal1', smallimage: '{$link->getImageLink($product->link_rewrite, $imageIds, 'large_default')|escape:'html':'UTF-8'}',largeimage: '{$link->getImageLink($product->link_rewrite, $imageIds, 'thickbox_default')|escape:'html':'UTF-8'}'{literal}}{/literal}"{else} href="{$link->getImageLink($product->link_rewrite, $imageIds, 'thickbox_default')|escape:'html':'UTF-8'}" data-fancybox-group="other-views" class="fancybox{if $image.id_image == $cover.id_image} shown{/if}"{/if} title="{$imageTitle}">
  121.                                         <img class="img-responsive" id="thumb_{$image.id_image}" src="{$link->getImageLink($product->link_rewrite, $imageIds, 'cart_default')|escape:'html':'UTF-8'}" alt="{$imageTitle}" title="{$imageTitle}"{if isset($cartSize)} height="{$cartSize.height}" width="{$cartSize.width}"{/if} itemprop="image" />
  122.                                     </a>
  123.                                 </li>
  124.                             {/foreach}
  125.                         {/if}
  126.                         </ul>
  127.                     </div> <!-- end thumbs_list -->
  128.                     {if isset($images) && count($images) > 2}
  129.                         <a id="view_scroll_right" title="{l s='Other views'}" href="javascript:{ldelim}{rdelim}">
  130.                             <i class="icon-angle-right"></i>{l s='Next'}
  131.                         </a>
  132.                     {/if}
  133.                 </div> <!-- end views-block -->
  134.                 <!-- end thumbnails -->
  135.             {/if}
  136.             {if isset($images) && count($images) > 1}
  137.                 <p class="resetimg clear no-print">
  138.                     <span id="wrapResetImages" style="display: none;">
  139.                         <a href="{$link->getProductLink($product)|escape:'html':'UTF-8'}" data-id="resetImages">
  140.                             <i class="icon-repeat"></i>
  141.                             {l s='Display all pictures'}
  142.                         </a>
  143.                     </span>
  144.                 </p>
  145.             {/if}
  146.            
  147.            
  148.            
  149.             {if !$content_only}
  150.                 <!-- usefull links-->
  151.                 <ul id="usefull_link_block" class="clearfix no-print">
  152.                     {if $HOOK_EXTRA_LEFT}{$HOOK_EXTRA_LEFT}{/if}
  153.                     <li class="print">
  154.                         <a href="javascript:print();">
  155.                             {l s='Print'}
  156.                         </a>
  157.                     </li>
  158.                 </ul>
  159.             {/if}
  160.            
  161.            
  162.            
  163.         </div> <!-- end pb-left-column -->
  164.         <!-- end left infos-->
  165.         <!-- center infos -->
  166.         <div class="pb-center-column col-xs-12 col-sm-7 col-md-6">
  167.             {if $product->online_only}
  168.                 <p class="online_only">{l s='Online only'}</p>
  169.             {/if}
  170.             <h1 itemprop="name">{$product->name|escape:'html':'UTF-8'}</h1>
  171.             <p id="product_reference"{if empty($product->reference) || !$product->reference} style="display: none;"{/if}>
  172.                 <label>{l s='Reference:'} </label>
  173.                 <span class="editable" itemprop="sku"{if !empty($product->reference) && $product->reference} content="{$product->reference}"{/if}>{if !isset($groups)}{$product->reference|escape:'html':'UTF-8'}{/if}</span>
  174.             </p>
  175.             {if !$product->is_virtual && $product->condition}
  176.             <p id="product_condition">
  177.                 <label>{l s='Condition:'} </label>
  178.                 {if $product->condition == 'new'}
  179.                     <link itemprop="itemCondition" href="https://schema.org/NewCondition"/>
  180.                     <span class="editable">{l s='New product'}</span>
  181.                 {elseif $product->condition == 'used'}
  182.                     <link itemprop="itemCondition" href="https://schema.org/UsedCondition"/>
  183.                     <span class="editable">{l s='Used'}</span>
  184.                 {elseif $product->condition == 'refurbished'}
  185.                     <link itemprop="itemCondition" href="https://schema.org/RefurbishedCondition"/>
  186.                     <span class="editable">{l s='Refurbished'}</span>
  187.                 {/if}
  188.             </p>
  189.             {/if}
  190.             {if $product->description_short || $packItems|@count > 0}
  191.                 <div id="short_description_block">
  192.                     {if $product->description_short}
  193.                         <div id="short_description_content" class="rte align_justify" itemprop="description">{$product->description_short}</div>
  194.                     {/if}
  195.  
  196.                     {if $product->description}
  197.                         <p class="buttons_bottom_block">
  198.                             <a href="javascript:{ldelim}{rdelim}" class="button">
  199.                                 {l s='More details'}
  200.                             </a>
  201.                         </p>
  202.                     {/if}
  203.                     <!--{if $packItems|@count > 0}
  204.                         <div class="short_description_pack">
  205.                         <h3>{l s='Pack content'}</h3>
  206.                             {foreach from=$packItems item=packItem}
  207.  
  208.                             <div class="pack_content">
  209.                                 {$packItem.pack_quantity} x <a href="{$link->getProductLink($packItem.id_product, $packItem.link_rewrite, $packItem.category)|escape:'html':'UTF-8'}">{$packItem.name|escape:'html':'UTF-8'}</a>
  210.                                 <p>{$packItem.description_short}</p>
  211.                             </div>
  212.                             {/foreach}
  213.                         </div>
  214.                     {/if}-->
  215.                 </div> <!-- end short_description_block -->
  216.             {/if}
  217.            
  218.             {if ($display_qties == 1 && !$PS_CATALOG_MODE && $PS_STOCK_MANAGEMENT && $product->available_for_order)}
  219.                 <!-- number of item in stock -->
  220.                 <p id="pQuantityAvailable"{if $product->quantity <= 0} style="display: none;"{/if}>
  221.                     <span id="quantityAvailable">{$product->quantity|intval}</span>
  222.                     <span {if $product->quantity > 1} style="display: none;"{/if} id="quantityAvailableTxt">{l s='Item'}</span>
  223.                     <span {if $product->quantity == 1} style="display: none;"{/if} id="quantityAvailableTxtMultiple">{l s='Items'}</span>
  224.                 </p>
  225.             {/if}
  226.             <!-- availability or doesntExist -->
  227.             <p id="availability_statut"{if !$PS_STOCK_MANAGEMENT || ($product->quantity <= 0 && !$product->available_later && $allow_oosp) || ($product->quantity > 0 && !$product->available_now) || !$product->available_for_order || $PS_CATALOG_MODE} style="display: none;"{/if}>
  228.                 {*<span id="availability_label">{l s='Availability:'}</span>*}
  229.                 <span id="availability_value" class="label{if $product->quantity <= 0 && !$allow_oosp} label-danger{elseif $product->quantity <= 0} label-warning{else} label-success{/if}">{if $product->quantity <= 0}{if $PS_STOCK_MANAGEMENT && $allow_oosp}{$product->available_later}{else}{l s='This product is no longer in stock'}{/if}{elseif $PS_STOCK_MANAGEMENT}{$product->available_now}{/if}</span>
  230.             </p>
  231.             {if $PS_STOCK_MANAGEMENT}
  232.                 {if !$product->is_virtual}{hook h="displayProductDeliveryTime" product=$product}{/if}
  233.                 <p class="warning_inline" id="last_quantities"{if ($product->quantity > $last_qties || $product->quantity <= 0) || $allow_oosp || !$product->available_for_order || $PS_CATALOG_MODE} style="display: none"{/if} >{l s='Warning: Last items in stock!'}</p>
  234.             {/if}
  235.             <p id="availability_date"{if ($product->quantity > 0) || !$product->available_for_order || $PS_CATALOG_MODE || !isset($product->available_date) || $product->available_date < $smarty.now|date_format:'%Y-%m-%d'} style="display: none;"{/if}>
  236.                 <span id="availability_date_label">{l s='Availability date:'}</span>
  237.                 <span id="availability_date_value">{if Validate::isDate($product->available_date)}{dateFormat date=$product->available_date full=false}{/if}</span>
  238.             </p>
  239.             <!-- Out of stock hook -->
  240.             <div id="oosHook"{if $product->quantity > 0} style="display: none;"{/if}>
  241.                 {$HOOK_PRODUCT_OOS}
  242.             </div>
  243.             {if isset($HOOK_EXTRA_RIGHT) && $HOOK_EXTRA_RIGHT}{$HOOK_EXTRA_RIGHT}{/if}
  244.            
  245.                 <!-- pb-right-column-->
  246.         <div class="pb-right-column col-xs-12">
  247.             {if ($product->show_price && !isset($restricted_country_mode)) || isset($groups) || $product->reference || (isset($HOOK_PRODUCT_ACTIONS) && $HOOK_PRODUCT_ACTIONS)}
  248.             <!-- add to cart form-->
  249.             <form id="buy_block"{if $PS_CATALOG_MODE && !isset($groups) && $product->quantity > 0} class="hidden"{/if} action="{$link->getPageLink('cart')|escape:'html':'UTF-8'}" method="post">
  250.                 <!-- hidden datas -->
  251.                 <p class="hidden">
  252.                     <input type="hidden" name="token" value="{$static_token}" />
  253.                     <input type="hidden" name="id_product" value="{$product->id|intval}" id="product_page_product_id" />
  254.                     <input type="hidden" name="add" value="1" />
  255.                     <input type="hidden" name="id_product_attribute" id="idCombination" value="" />
  256.                 </p>
  257.                 <div class="box-info-product">
  258.                     <div class="content_prices clearfix">
  259.                         {if $product->show_price && !isset($restricted_country_mode) && !$PS_CATALOG_MODE}
  260.                             <!-- prices -->
  261.                             <div>
  262.                                 <p class="our_price_display" itemprop="offers" itemscope itemtype="https://schema.org/Offer">{strip}
  263.                                     {if $product->quantity > 0}<link itemprop="availability" href="https://schema.org/InStock"/>{/if}
  264.                                     {if $priceDisplay >= 0 && $priceDisplay <= 2}
  265.                                         <span id="our_price_display" class="price" itemprop="price" content="{$productPrice}">{convertPrice price=$productPrice|floatval}</span>
  266.                                         {if $tax_enabled  && ((isset($display_tax_label) && $display_tax_label == 1) || !isset($display_tax_label))}
  267.                                             {if $priceDisplay == 1} {l s='tax excl.'}{else} {l s='tax incl.'}{/if}
  268.                                         {/if}
  269.                                         <meta itemprop="priceCurrency" content="{$currency->iso_code}" />
  270.                                         {hook h="displayProductPriceBlock" product=$product type="price"}
  271.                                     {/if}
  272.                                 {/strip}</p>
  273.                                 <p id="reduction_percent" {if $productPriceWithoutReduction <= 0 || !$product->specificPrice || $product->specificPrice.reduction_type != 'percentage'} style="display:none;"{/if}>{strip}
  274.                                     <span id="reduction_percent_display">
  275.                                         {if $product->specificPrice && $product->specificPrice.reduction_type == 'percentage'}-{$product->specificPrice.reduction*100}%{/if}
  276.                                     </span>
  277.                                 {/strip}</p>
  278.                                 <p id="reduction_amount" {if $productPriceWithoutReduction <= 0 || !$product->specificPrice || $product->specificPrice.reduction_type != 'amount' || $product->specificPrice.reduction|floatval ==0} style="display:none"{/if}>{strip}
  279.                                     <span id="reduction_amount_display">
  280.                                     {if $product->specificPrice && $product->specificPrice.reduction_type == 'amount' && $product->specificPrice.reduction|floatval !=0}
  281.                                         -{convertPrice price=$productPriceWithoutReduction|floatval-$productPrice|floatval}
  282.                                     {/if}
  283.                                     </span>
  284.                                 {/strip}</p>
  285.                                 <p id="old_price"{if (!$product->specificPrice || !$product->specificPrice.reduction)} class="hidden"{/if}>{strip}
  286.                                     {if $priceDisplay >= 0 && $priceDisplay <= 2}
  287.                                         {hook h="displayProductPriceBlock" product=$product type="old_price"}
  288.                                         <span id="old_price_display"><span class="price">{if $productPriceWithoutReduction > $productPrice}{convertPrice price=$productPriceWithoutReduction|floatval}{/if}</span>{if $productPriceWithoutReduction > $productPrice && $tax_enabled && $display_tax_label == 1} {if $priceDisplay == 1}{l s='tax excl.'}{else}{l s='tax incl.'}{/if}{/if}</span>
  289.                                     {/if}
  290.                                 {/strip}</p>
  291.                                 {if $priceDisplay == 2}
  292.                                     <br />
  293.                                     <span id="pretaxe_price">{strip}
  294.                                         <span id="pretaxe_price_display">{convertPrice price=$product->getPrice(false, $smarty.const.NULL)}</span> {l s='tax excl.'}
  295.                                     {/strip}</span>
  296.                                 {/if}
  297.                             </div> <!-- end prices -->
  298.                             {if $packItems|@count && $productPrice < $product->getNoPackPrice()}
  299.                                 <p class="pack_price">{l s='Instead of'} <span style="text-decoration: line-through;">{convertPrice price=$product->getNoPackPrice()}</span></p>
  300.                             {/if}
  301.  
  302.                             {if $product->ecotax != 0}
  303.                                 <p class="price-ecotax">{l s='Including'} <span id="ecotax_price_display">{if $priceDisplay == 2}{$ecotax_tax_exc|convertAndFormatPrice}{else}{$ecotax_tax_inc|convertAndFormatPrice}{/if}</span> {l s='for ecotax'}
  304.                                     {if $product->specificPrice && $product->specificPrice.reduction}
  305.                                     <br />{l s='(not impacted by the discount)'}
  306.                                     {/if}
  307.                                 </p>
  308.                             {/if}
  309.                             {if !empty($product->unity) && $product->unit_price_ratio > 0.000000}
  310.                                 {math equation="pprice / punit_price" pprice=$productPrice  punit_price=$product->unit_price_ratio assign=unit_price}
  311.                                 <p class="unit-price"><span id="unit_price_display">{convertPrice price=$unit_price}</span> {l s='per'} {$product->unity|escape:'html':'UTF-8'}</p>
  312.                                 {hook h="displayProductPriceBlock" product=$product type="unit_price"}
  313.                             {/if}
  314.                         {/if} {*close if for show price*}
  315.                         {hook h="displayProductPriceBlock" product=$product type="weight" hook_origin='product_sheet'}
  316.                         {hook h="displayProductPriceBlock" product=$product type="after_price"}
  317.                         <div class="clear"></div>
  318.                     </div> <!-- end content_prices -->
  319.                     <div class="product_attributes clearfix">
  320.                         {if isset($groups)}
  321.                             <!-- attributes -->
  322.                             <div id="attributes">
  323.                                 <div class="clearfix"></div>
  324.                                 {foreach from=$groups key=id_attribute_group item=group}
  325.                                     {if $group.attributes|@count}
  326.                                         <fieldset class="attribute_fieldset">
  327.                                             <label class="attribute_label" {if $group.group_type != 'color' && $group.group_type != 'radio'}for="group_{$id_attribute_group|intval}"{/if}>{$group.name|escape:'html':'UTF-8'}&nbsp;</label>
  328.                                             {assign var="groupName" value="group_$id_attribute_group"}
  329.                                             <div class="attribute_list">
  330.                                                 {if ($group.group_type == 'select')}
  331.                                                     <select name="{$groupName}" id="group_{$id_attribute_group|intval}" class="form-control attribute_select no-print">
  332.                                                         {foreach from=$group.attributes key=id_attribute item=group_attribute}
  333.                                                             <option value="{$id_attribute|intval}"{if (isset($smarty.get.$groupName) && $smarty.get.$groupName|intval == $id_attribute) || $group.default == $id_attribute} selected="selected"{/if} title="{$group_attribute|escape:'html':'UTF-8'}">{$group_attribute|escape:'html':'UTF-8'}</option>
  334.                                                         {/foreach}
  335.                                                     </select>
  336.                                                 {elseif ($group.group_type == 'color')}
  337.                                                     <ul id="color_to_pick_list" class="clearfix">
  338.                                                         {assign var="default_colorpicker" value=""}
  339.                                                         {foreach from=$group.attributes key=id_attribute item=group_attribute}
  340.                                                             {assign var='img_color_exists' value=file_exists($col_img_dir|cat:$id_attribute|cat:'.jpg')}
  341.                                                             <li{if $group.default == $id_attribute} class="selected"{/if}>
  342.                                                                 <a href="{$link->getProductLink($product)|escape:'html':'UTF-8'}" id="color_{$id_attribute|intval}" name="{$colors.$id_attribute.name|escape:'html':'UTF-8'}" class="color_pick{if ($group.default == $id_attribute)} selected{/if}"{if !$img_color_exists && isset($colors.$id_attribute.value) && $colors.$id_attribute.value} style="background:{$colors.$id_attribute.value|escape:'html':'UTF-8'};"{/if} title="{$colors.$id_attribute.name|escape:'html':'UTF-8'}">
  343.                                                                     {if $img_color_exists}
  344.                                                                         <img src="{$img_col_dir}{$id_attribute|intval}.jpg" alt="{$colors.$id_attribute.name|escape:'html':'UTF-8'}" title="{$colors.$id_attribute.name|escape:'html':'UTF-8'}" width="20" height="20" />
  345.                                                                     {/if}
  346.                                                                 </a>
  347.                                                             </li>
  348.                                                             {if ($group.default == $id_attribute)}
  349.                                                                 {$default_colorpicker = $id_attribute}
  350.                                                             {/if}
  351.                                                         {/foreach}
  352.                                                     </ul>
  353.                                                     <input type="hidden" class="color_pick_hidden" name="{$groupName|escape:'html':'UTF-8'}" value="{$default_colorpicker|intval}" />
  354.                                                 {elseif ($group.group_type == 'radio')}
  355.                                                     <ul>
  356.                                                         {foreach from=$group.attributes key=id_attribute item=group_attribute}
  357.                                                             <li>
  358.                                                                 <input type="radio" class="attribute_radio" name="{$groupName|escape:'html':'UTF-8'}" value="{$id_attribute}" {if ($group.default == $id_attribute)} checked="checked"{/if} />
  359.                                                                 <span>{$group_attribute|escape:'html':'UTF-8'}</span>
  360.                                                             </li>
  361.                                                         {/foreach}
  362.                                                     </ul>
  363.                                                 {/if}
  364.                                             </div> <!-- end attribute_list -->
  365.                                         </fieldset>
  366.                                     {/if}
  367.                                 {/foreach}
  368.                             </div> <!-- end attributes -->
  369.                         {/if}
  370.                     </div> <!-- end product_attributes -->
  371.                     <div class="box-cart-bottom">
  372.                         <!-- quantity wanted -->
  373.                         {if !$PS_CATALOG_MODE}
  374.                         <p id="quantity_wanted_p"{if (!$allow_oosp && $product->quantity <= 0) || !$product->available_for_order || $PS_CATALOG_MODE} style="display: none;"{/if}>
  375.                             <label for="quantity_wanted">{l s='Quantity'}</label>
  376.                             <a href="#" data-field-qty="qty" class="btn btn-default button-minus product_quantity_down">
  377.                                 <span><i class="icon-minus"></i></span>
  378.                             </a>
  379.                             <input type="text" min="1" name="qty" id="quantity_wanted" class="text" value="{if isset($quantityBackup)}{$quantityBackup|intval}{else}{if $product->minimal_quantity > 1}{$product->minimal_quantity}{else}1{/if}{/if}" />
  380.                             <a href="#" data-field-qty="qty" class="btn btn-default button-plus product_quantity_up">
  381.                                 <span><i class="icon-plus"></i></span>
  382.                             </a>
  383.                             <span class="clearfix"></span>
  384.                         </p>
  385.                         {/if}
  386.                         <!-- minimal quantity wanted -->
  387.                         <p id="minimal_quantity_wanted_p"{if $product->minimal_quantity <= 1 || !$product->available_for_order || $PS_CATALOG_MODE} style="display: none;"{/if}>
  388.                             {l s='The minimum purchase order quantity for the product is'} <b id="minimal_quantity_label">{$product->minimal_quantity}</b>
  389.                         </p>
  390.                         <div{if (!$allow_oosp && $product->quantity <= 0) || !$product->available_for_order || (isset($restricted_country_mode) && $restricted_country_mode) || $PS_CATALOG_MODE} class="unvisible"{/if} class="ttaddtocart">
  391.                             <p id="add_to_cart" class="buttons_bottom_block no-print">
  392.                                 <button type="submit" name="Submit" class="exclusive">
  393.                                     <span>{if $content_only && (isset($product->customization_required) && $product->customization_required)}{l s='Customize'}{else}{l s='Add to cart'}{/if}</span>
  394.                                 </button>
  395.                             </p>
  396.                         </div>
  397.                         {if isset($HOOK_PRODUCT_ACTIONS) && $HOOK_PRODUCT_ACTIONS}{$HOOK_PRODUCT_ACTIONS}{/if}
  398.                     </div> <!-- end box-cart-bottom -->
  399.                 </div> <!-- end box-info-product -->
  400.             </form>
  401.             {/if}
  402.         </div> <!-- end pb-right-column-->
  403.            
  404.            
  405.         </div>
  406.         <!-- end center infos-->
  407.        
  408.  
  409.     </div> <!-- end primary_block -->
  410.     {if !$content_only}
  411. {if (isset($quantity_discounts) && count($quantity_discounts) > 0)}
  412.             <!-- quantity discount -->
  413.             <section class="page-product-box">
  414.                 <h3 class="page-product-heading">{l s='Volume discounts'}</h3>
  415.                 <div id="quantityDiscount">
  416.                     <table class="std table-product-discounts">
  417.                         <thead>
  418.                             <tr>
  419.                                 <th>{l s='Quantity'}</th>
  420.                                 <th>{if $display_discount_price}{l s='Price'}{else}{l s='Discount'}{/if}</th>
  421.                                 <th>{l s='You Save'}</th>
  422.                             </tr>
  423.                         </thead>
  424.                         <tbody>
  425.                             {foreach from=$quantity_discounts item='quantity_discount' name='quantity_discounts'}
  426.                             {if $quantity_discount.price >= 0 || $quantity_discount.reduction_type == 'amount'}
  427.                                 {$realDiscountPrice=$productPriceWithoutReduction|floatval-$quantity_discount.real_value|floatval}
  428.                             {else}
  429.                                 {$realDiscountPrice=$productPriceWithoutReduction|floatval-($productPriceWithoutReduction*$quantity_discount.reduction)|floatval}
  430.                             {/if}
  431.                             <tr id="quantityDiscount_{$quantity_discount.id_product_attribute}" class="quantityDiscount_{$quantity_discount.id_product_attribute}" data-real-discount-value="{convertPrice price = $realDiscountPrice}" data-discount-type="{$quantity_discount.reduction_type}" data-discount="{$quantity_discount.real_value|floatval}" data-discount-quantity="{$quantity_discount.quantity|intval}">
  432.                                 <td>
  433.                                     {$quantity_discount.quantity|intval}
  434.                                 </td>
  435.                                 <td>
  436.                                     {if $quantity_discount.price >= 0 || $quantity_discount.reduction_type == 'amount'}
  437.                                         {if $display_discount_price}
  438.                                             {if $quantity_discount.reduction_tax == 0 && !$quantity_discount.price}
  439.                                                 {convertPrice price = $productPriceWithoutReduction|floatval-($productPriceWithoutReduction*$quantity_discount.reduction_with_tax)|floatval}
  440.                                             {else}
  441.                                                 {convertPrice price=$productPriceWithoutReduction|floatval-$quantity_discount.real_value|floatval}
  442.                                             {/if}
  443.                                         {else}
  444.                                             {convertPrice price=$quantity_discount.real_value|floatval}
  445.                                         {/if}
  446.                                     {else}
  447.                                         {if $display_discount_price}
  448.                                             {if $quantity_discount.reduction_tax == 0}
  449.                                                 {convertPrice price = $productPriceWithoutReduction|floatval-($productPriceWithoutReduction*$quantity_discount.reduction_with_tax)|floatval}
  450.                                             {else}
  451.                                                 {convertPrice price = $productPriceWithoutReduction|floatval-($productPriceWithoutReduction*$quantity_discount.reduction)|floatval}
  452.                                             {/if}
  453.                                         {else}
  454.                                             {$quantity_discount.real_value|floatval}%
  455.                                         {/if}
  456.                                     {/if}
  457.                                 </td>
  458.                                 <td>
  459.                                     <span>{l s='Up to'}</span>
  460.                                     {if $quantity_discount.price >= 0 || $quantity_discount.reduction_type == 'amount'}
  461.                                         {$discountPrice=$productPriceWithoutReduction|floatval-$quantity_discount.real_value|floatval}
  462.                                     {else}
  463.                                         {$discountPrice=$productPriceWithoutReduction|floatval-($productPriceWithoutReduction*$quantity_discount.reduction)|floatval}
  464.                                     {/if}
  465.                                     {$discountPrice=$discountPrice * $quantity_discount.quantity}
  466.                                     {$qtyProductPrice=$productPriceWithoutReduction|floatval * $quantity_discount.quantity}
  467.                                     {convertPrice price=$qtyProductPrice - $discountPrice}
  468.                                 </td>
  469.                             </tr>
  470.                             {/foreach}
  471.                         </tbody>
  472.                     </table>
  473.                 </div>
  474.             </section>
  475.         {/if}
  476.        
  477.        
  478.        
  479.        
  480.        
  481.        
  482.         <!-- Start TemplateTrip Tab -->
  483.        
  484.            
  485.         <section class="tt-tabcontent hb-animate-element bottom-to-top">
  486.             <ul id="producttab" class="nav nav-tabs clearfix">
  487.                 {if isset($product) && $product->description}
  488.                     <li class="active">
  489.                     <a href="#ttmoreinfo" data-toggle="tab" class="producttab-heading">{l s='More info'}</a>
  490.                     </li>
  491.                 {/if}
  492.                 {if isset($features) && $features}
  493.                     <li class="">
  494.                     <a href="#ttdatasheet" data-toggle="tab" class="producttab-heading">{l s='Data sheet'}</a>
  495.                     </li>
  496.                 {/if}
  497.                 {if isset($attachments) && $attachments}
  498.                     <li class="">
  499.                     <a href="#ttdownload" data-toggle="tab" class="producttab-heading">{l s='Download'}</a>
  500.                     </li>
  501.                 {/if}
  502.                 {if isset($product) && $product->customizable}
  503.                     <li class="">
  504.                     <a href="#ttpcustomization" data-toggle="tab" class="producttab-heading">{l s='Product customization'}</a>
  505.                     </li>
  506.                 {/if}
  507.                 {if isset($HOOK_PRODUCT_TAB_CONTENT) && $HOOK_PRODUCT_TAB_CONTENT}
  508.                     <li class="">
  509.                     <a href="#tttabcontent" data-toggle="tab" class="producttab-heading">{$HOOK_PRODUCT_TAB}</a>
  510.                     </li>
  511.                 {/if}
  512.             </ul>
  513.             <div class="tab-content">
  514.                 {if isset($product) && $product->description}
  515.                     <ul id="ttmoreinfo" class="tt-productinner tab-pane active">
  516.                         <li>
  517.                             <div  class="rte">{$product->description}</div>
  518.                         </li>
  519.                     </ul>
  520.                 {/if}
  521.                
  522.                 {if isset($features) && $features}
  523.                     <ul id="ttdatasheet" class="tt-productinner tab-pane">
  524.                         <li>
  525.                             <table class="table-data-sheet">
  526.                                 {foreach from=$features item=feature}
  527.                                 <tr class="{cycle values="odd,even"}">
  528.                                     {if isset($feature.value)}
  529.                                     <td>{$feature.name|escape:'html':'UTF-8'}</td>
  530.                                     <td>{$feature.value|escape:'html':'UTF-8'}</td>
  531.                                     {/if}
  532.                                 </tr>
  533.                                 {/foreach}
  534.                             </table>
  535.                         </li>
  536.                     </ul>
  537.                 {/if}
  538.                
  539.                 {if isset($attachments) && $attachments}
  540.                     <ul id="ttdownload" class="tt-productinner tab-pane">
  541.                         <li>
  542.                             {foreach from=$attachments item=attachment name=attachements}
  543.                                 {if $smarty.foreach.attachements.iteration %3 == 1}<div class="row">{/if}
  544.                                     <div class="col-lg-4">
  545.                                         <h4><a href="{$link->getPageLink('attachment', true, NULL, "id_attachment={$attachment.id_attachment}")|escape:'html':'UTF-8'}">{$attachment.name|escape:'html':'UTF-8'}</a></h4>
  546.                                         <p class="text-muted">{$attachment.description|escape:'html':'UTF-8'}</p>
  547.                                         <a class="btn btn-default btn-block" href="{$link->getPageLink('attachment', true, NULL, "id_attachment={$attachment.id_attachment}")|escape:'html':'UTF-8'}">
  548.                                             <i class="icon-download"></i>
  549.                                             {l s="Download"} ({Tools::formatBytes($attachment.file_size, 2)})
  550.                                         </a>
  551.                                         <hr />
  552.                                     </div>
  553.                                 {if $smarty.foreach.attachements.iteration %3 == 0 || $smarty.foreach.attachements.last}</div>{/if}
  554.                             {/foreach}
  555.                         </li>
  556.                     </ul>
  557.                 {/if}
  558.                
  559.                 {if isset($product) && $product->customizable}
  560.                     <ul id="ttpcustomization" class="tt-productinner tab-pane">
  561.                         <li>
  562.                             <form method="post" action="{$customizationFormTarget}" enctype="multipart/form-data" id="customizationForm" class="clearfix">
  563.                                 <p class="infoCustomizable">
  564.                                     {l s='After saving your customized product, remember to add it to your cart.'}
  565.                                     {if $product->uploadable_files}
  566.                                     <br />
  567.                                     {l s='Allowed file formats are: GIF, JPG, PNG'}{/if}
  568.                                 </p>
  569.                                 {if $product->uploadable_files|intval}
  570.                                     <div class="customizableProductsFile">
  571.                                         <h5 class="product-heading-h5">{l s='Pictures'}</h5>
  572.                                         <ul id="uploadable_files" class="clearfix">
  573.                                             {counter start=0 assign='customizationField'}
  574.                                             {foreach from=$customizationFields item='field' name='customizationFields'}
  575.                                                 {if $field.type == 0}
  576.                                                     <li class="customizationUploadLine{if $field.required} required{/if}">{assign var='key' value='pictures_'|cat:$product->id|cat:'_'|cat:$field.id_customization_field}
  577.                                                         {if isset($pictures.$key)}
  578.                                                             <div class="customizationUploadBrowse">
  579.                                                                 <img src="{$pic_dir}{$pictures.$key}_small" alt="" />
  580.                                                                     <a href="{$link->getProductDeletePictureLink($product, $field.id_customization_field)|escape:'html':'UTF-8'}" title="{l s='Delete'}" >
  581.                                                                         <img src="{$img_dir}icon/delete.gif" alt="{l s='Delete'}" class="customization_delete_icon" width="11" height="13" />
  582.                                                                     </a>
  583.                                                             </div>
  584.                                                         {/if}
  585.                                                         <div class="customizationUploadBrowse form-group">
  586.                                                             <label class="customizationUploadBrowseDescription">
  587.                                                                 {if !empty($field.name)}
  588.                                                                     {$field.name}
  589.                                                                 {else}
  590.                                                                     {l s='Please select an image file from your computer'}
  591.                                                                 {/if}
  592.                                                                 {if $field.required}<sup>*</sup>{/if}
  593.                                                             </label>
  594.                                                             <input type="file" name="file{$field.id_customization_field}" id="img{$customizationField}" class="form-control customization_block_input {if isset($pictures.$key)}filled{/if}" />
  595.                                                         </div>
  596.                                                     </li>
  597.                                                     {counter}
  598.                                                 {/if}
  599.                                             {/foreach}
  600.                                         </ul>
  601.                                     </div>
  602.                                 {/if}
  603.                                 {if $product->text_fields|intval}
  604.                                     <div class="customizableProductsText">
  605.                                         <h5 class="product-heading-h5">{l s='Text'}</h5>
  606.                                         <ul id="text_fields">
  607.                                         {counter start=0 assign='customizationField'}
  608.                                         {foreach from=$customizationFields item='field' name='customizationFields'}
  609.                                             {if $field.type == 1}
  610.                                                 <li class="customizationUploadLine{if $field.required} required{/if}">
  611.                                                     <label for ="textField{$customizationField}">
  612.                                                         {assign var='key' value='textFields_'|cat:$product->id|cat:'_'|cat:$field.id_customization_field}
  613.                                                         {if !empty($field.name)}
  614.                                                             {$field.name}
  615.                                                         {/if}
  616.                                                         {if $field.required}<sup>*</sup>{/if}
  617.                                                     </label>
  618.                                                     <textarea name="textField{$field.id_customization_field}" class="form-control customization_block_input" id="textField{$customizationField}" rows="3" cols="20">{strip}
  619.                                                         {if isset($textFields.$key)}
  620.                                                             {$textFields.$key|stripslashes}
  621.                                                         {/if}
  622.                                                     {/strip}</textarea>
  623.                                                 </li>
  624.                                                 {counter}
  625.                                             {/if}
  626.                                         {/foreach}
  627.                                         </ul>
  628.                                     </div>
  629.                                 {/if}
  630.                                 <p id="customizedDatas">
  631.                                     <input type="hidden" name="quantityBackup" id="quantityBackup" value="" />
  632.                                     <input type="hidden" name="submitCustomizedDatas" value="1" />
  633.                                     <button class="button btn btn-default button button-small" name="saveCustomization">
  634.                                         <span>{l s='Save'}</span>
  635.                                     </button>
  636.                                     <span id="ajax-loader" class="unvisible">
  637.                                         <img src="{$img_ps_dir}loader.gif" alt="loader" />
  638.                                     </span>
  639.                                 </p>
  640.                             </form>
  641.                             <p class="clear required"><sup>*</sup> {l s='required fields'}</p>
  642.                         </li>
  643.                     </ul>
  644.                 {/if}
  645.                
  646.                 {if isset($HOOK_PRODUCT_TAB_CONTENT) && $HOOK_PRODUCT_TAB_CONTENT}
  647.                     <ul id="tttabcontent" class="tt-productinner tab-pane ">
  648.                         <li>
  649.                             <div class="rte">{if isset($HOOK_PRODUCT_TAB_CONTENT) && $HOOK_PRODUCT_TAB_CONTENT}{$HOOK_PRODUCT_TAB_CONTENT}{/if}</div>
  650.                         </li>
  651.                     </ul>
  652.                 {/if}
  653.             </div>
  654.         </section>
  655.        
  656.          
  657.         <!-- End TemplateTrip Tab -->      
  658.        
  659.        
  660.        
  661.         {if isset($accessories) && $accessories}
  662.             <!--Accessories -->
  663.             <section class="page-product-box accessories-product hb-animate-element bottom-to-top">
  664.                 <h4 class="title_block"><span class="ttblock-heading">{l s='Accessories'}</span></h4>
  665.                 <div class="block products_block accessories-block clearfix">
  666.                     {assign var="ttcount" value="1"}
  667.                     {assign var="tt_total" value="0"}
  668.                     {foreach from=$accessories item=accessory name=accessories_list}
  669.                         {$tt_total = $ttcount++}
  670.                     {/foreach}
  671.                    
  672.                    
  673.                     <div class="row">
  674.                         <div class="block_content">
  675.                         <ul id="ttaccessories-carousel" class="tt-carousel product_list grid clearfix">
  676.                             {foreach from=$accessories item=accessory name=accessories_list}
  677.                                 {if ($accessory.allow_oosp || $accessory.quantity_all_versions > 0 || $accessory.quantity > 0) && $accessory.available_for_order && !isset($restricted_country_mode)}
  678.                                     {assign var='accessoryLink' value=$link->getProductLink($accessory.id_product, $accessory.link_rewrite, $accessory.category)}
  679.                                     <li class="item ajax_block_product{if $smarty.foreach.accessories_list.first} first_item{elseif $smarty.foreach.accessories_list.last} last_item{else} item{/if}">
  680.                                         <div class="product-container">
  681.                                             <div class="left-block">
  682.                                                 <div class="product-image-container">
  683.                                                     <a href="{$accessoryLink|escape:'html':'UTF-8'}" title="{$accessory.legend|escape:'html':'UTF-8'}" class="product-image product_image">
  684.                                                         <img class="lazyOwl" src="{$link->getImageLink($accessory.link_rewrite, $accessory.id_image, 'home_default')|escape:'html':'UTF-8'}" alt="{$accessory.legend|escape:'html':'UTF-8'}" width="{$homeSize.width}" height="{$homeSize.height}"/>
  685.                                                     </a>
  686.                                                     <div class="content_price">
  687.                                                         {if $accessory.show_price && !isset($restricted_country_mode) && !$PS_CATALOG_MODE}
  688.                                                         <span class="price">
  689.                                                             {if $priceDisplay != 1}
  690.                                                                 {displayWtPrice p=$accessory.price}
  691.                                                             {else}
  692.                                                                 {displayWtPrice p=$accessory.price_tax_exc}
  693.                                                             {/if}
  694.                                                             {hook h="displayProductPriceBlock" product=$accessory type="price"}
  695.                                                         </span>
  696.                                                         {/if}
  697.                                                         {hook h="displayProductPriceBlock" product=$accessory type="after_price"}
  698.                                                     </div>
  699.                                                 </div>     
  700.                                                 <div class="ttquickview">
  701.                                                     {if isset($quick_view) && $quick_view}
  702.                                                         <a class="quick-view" href="{$accessory.link|escape:'html':'UTF-8'}" title="{l s='Quick view'}" rel="{$accessory.link|escape:'html':'UTF-8'}">
  703.                                                             <span>{l s='Quick view'}</span>
  704.                                                             <span class="tooltip">{l s='Quick view'}</span>
  705.                                                         </a>
  706.                                                     {/if}
  707.                                                 </div>
  708.                                             </div>
  709.                                             <div class="right-block">
  710.                                                 <h5 itemprop="name" class="product-name">
  711.                                                     <a href="{$accessoryLink|escape:'html':'UTF-8'}">
  712.                                                         {$accessory.name|truncate:20:'...':true|escape:'html':'UTF-8'}
  713.                                                     </a>
  714.                                                 </h5>
  715.                                                 <div class="content_price">
  716.                                                     {if $accessory.show_price && !isset($restricted_country_mode) && !$PS_CATALOG_MODE}
  717.                                                     <span class="price">
  718.                                                         {if $priceDisplay != 1}
  719.                                                             {displayWtPrice p=$accessory.price}
  720.                                                         {else}
  721.                                                             {displayWtPrice p=$accessory.price_tax_exc}
  722.                                                         {/if}
  723.                                                         {hook h="displayProductPriceBlock" product=$accessory type="price"}
  724.                                                     </span>
  725.                                                     {/if}
  726.                                                     {hook h="displayProductPriceBlock" product=$accessory type="after_price"}
  727.                                                 </div>
  728.                                                
  729.                                                 <div class="product-desc" itemprop="description">
  730.                                                     <a href="{$accessoryLink|escape:'html':'UTF-8'}" title="{l s='More'}" class="product_description">
  731.                                                         {$accessory.description_short|strip_tags|truncate:25:'...'}
  732.                                                     </a>
  733.                                                 </div>
  734.                                                 <div class="ttproducthover">
  735.                                                     <div class="functional-buttons clearfix">
  736.                                                         <div class="button-container">
  737.                                                             {if !$PS_CATALOG_MODE && ($accessory.allow_oosp || $accessory.quantity > 0) && isset($add_prod_display) && $add_prod_display == 1}
  738.                                                                 <div class="no-print">
  739.                                                                     <a class="exclusive button ajax_add_to_cart_button" href="{$link->getPageLink('cart', true, NULL, "qty=1&amp;id_product={$accessory.id_product|intval}&amp;token={$static_token}&amp;add")|escape:'html':'UTF-8'}" data-id-product="{$accessory.id_product|intval}" title="{l s='Add to cart'}">
  740.                                                                         <span>{l s='Add to cart'}</span>
  741.                                                                         <span class="tooltip">{l s='Add to cart'}</span>
  742.                                                                     </a>
  743.                                                                 </div>
  744.                                                             {/if}
  745.                                                         </div>
  746.                                                         {hook h='displayProductListFunctionalButtons' product=$accessory}
  747.                                                        
  748.                                                     </div>
  749.                                                 </div>
  750.                                             </div>
  751.                                         </div>
  752.                                     </li>
  753.                                 {/if}
  754.                             {/foreach}
  755.                         </ul>
  756.                     </div>
  757.                     </div>
  758.                     {if $tt_total > 4}
  759.                         <div class="customNavigation">
  760.                             <a class="btn prev ttaccessories_prev">{l s='Prev'}</a>
  761.                             <a class="btn next ttaccessories_next">{l s='Next'}</a>
  762.                         </div>
  763.                     {/if}
  764.                 </div>
  765.             </section>
  766.             <!--end Accessories -->
  767.         {/if}
  768.        
  769.         {if isset($packItems) && $packItems|@count > 0}
  770.         <section id="blockpack">
  771.             <h3 class="page-product-heading">{l s='Pack content'}</h3>
  772.             {include file="$tpl_dir./product-list.tpl" products=$packItems}
  773.         </section>
  774.         {/if}
  775.        
  776.        
  777.         {if isset($HOOK_PRODUCT_FOOTER) && $HOOK_PRODUCT_FOOTER}{$HOOK_PRODUCT_FOOTER}{/if}
  778.    
  779.     {/if}
  780. </div> <!-- itemscope product wrapper -->
  781. {strip}
  782. {if isset($smarty.get.ad) && $smarty.get.ad}
  783.     {addJsDefL name=ad}{$base_dir|cat:$smarty.get.ad|escape:'html':'UTF-8'}{/addJsDefL}
  784. {/if}
  785. {if isset($smarty.get.adtoken) && $smarty.get.adtoken}
  786.     {addJsDefL name=adtoken}{$smarty.get.adtoken|escape:'html':'UTF-8'}{/addJsDefL}
  787. {/if}
  788. {addJsDef allowBuyWhenOutOfStock=$allow_oosp|boolval}
  789. {addJsDef availableNowValue=$product->available_now|escape:'quotes':'UTF-8'}
  790. {addJsDef availableLaterValue=$product->available_later|escape:'quotes':'UTF-8'}
  791. {addJsDef attribute_anchor_separator=$attribute_anchor_separator|escape:'quotes':'UTF-8'}
  792. {addJsDef attributesCombinations=$attributesCombinations}
  793. {addJsDef currentDate=$smarty.now|date_format:'%Y-%m-%d %H:%M:%S'}
  794. {if isset($combinations) && $combinations}
  795.     {addJsDef combinations=$combinations}
  796.     {addJsDef combinationsFromController=$combinations}
  797.     {addJsDef displayDiscountPrice=$display_discount_price}
  798.     {addJsDefL name='upToTxt'}{l s='Up to' js=1}{/addJsDefL}
  799. {/if}
  800. {if isset($combinationImages) && $combinationImages}
  801.     {addJsDef combinationImages=$combinationImages}
  802. {/if}
  803. {addJsDef customizationId=$id_customization}
  804. {addJsDef customizationFields=$customizationFields}
  805. {addJsDef default_eco_tax=$product->ecotax|floatval}
  806. {addJsDef displayPrice=$priceDisplay|intval}
  807. {addJsDef ecotaxTax_rate=$ecotaxTax_rate|floatval}
  808. {if isset($cover.id_image_only)}
  809.     {addJsDef idDefaultImage=$cover.id_image_only|intval}
  810. {else}
  811.     {addJsDef idDefaultImage=0}
  812. {/if}
  813. {addJsDef img_ps_dir=$img_ps_dir}
  814. {addJsDef img_prod_dir=$img_prod_dir}
  815. {addJsDef id_product=$product->id|intval}
  816. {addJsDef jqZoomEnabled=$jqZoomEnabled|boolval}
  817. {addJsDef maxQuantityToAllowDisplayOfLastQuantityMessage=$last_qties|intval}
  818. {addJsDef minimalQuantity=$product->minimal_quantity|intval}
  819. {addJsDef noTaxForThisProduct=$no_tax|boolval}
  820. {if isset($customer_group_without_tax)}
  821.     {addJsDef customerGroupWithoutTax=$customer_group_without_tax|boolval}
  822. {else}
  823.     {addJsDef customerGroupWithoutTax=false}
  824. {/if}
  825. {if isset($group_reduction)}
  826.     {addJsDef groupReduction=$group_reduction|floatval}
  827. {else}
  828.     {addJsDef groupReduction=false}
  829. {/if}
  830. {addJsDef oosHookJsCodeFunctions=Array()}
  831. {addJsDef productHasAttributes=isset($groups)|boolval}
  832. {addJsDef productPriceTaxExcluded=($product->getPriceWithoutReduct(true)|default:'null' - $product->ecotax)|floatval}
  833. {addJsDef productPriceTaxIncluded=($product->getPriceWithoutReduct(false)|default:'null' - $product->ecotax * (1 + $ecotaxTax_rate / 100))|floatval}
  834. {addJsDef productBasePriceTaxExcluded=($product->getPrice(false, null, 6, null, false, false) - $product->ecotax)|floatval}
  835. {addJsDef productBasePriceTaxExcl=($product->getPrice(false, null, 6, null, false, false)|floatval)}
  836. {addJsDef productBasePriceTaxIncl=($product->getPrice(true, null, 6, null, false, false)|floatval)}
  837. {addJsDef productReference=$product->reference|escape:'html':'UTF-8'}
  838. {addJsDef productAvailableForOrder=$product->available_for_order|boolval}
  839. {addJsDef productPriceWithoutReduction=$productPriceWithoutReduction|floatval}
  840. {addJsDef productPrice=$productPrice|floatval}
  841. {addJsDef productUnitPriceRatio=$product->unit_price_ratio|floatval}
  842. {addJsDef productShowPrice=(!$PS_CATALOG_MODE && $product->show_price)|boolval}
  843. {addJsDef PS_CATALOG_MODE=$PS_CATALOG_MODE}
  844. {if $product->specificPrice && $product->specificPrice|@count}
  845.     {addJsDef product_specific_price=$product->specificPrice}
  846. {else}
  847.     {addJsDef product_specific_price=array()}
  848. {/if}
  849. {if $display_qties == 1 && $product->quantity}
  850.     {addJsDef quantityAvailable=$product->quantity}
  851. {else}
  852.     {addJsDef quantityAvailable=0}
  853. {/if}
  854. {addJsDef quantitiesDisplayAllowed=$display_qties|boolval}
  855. {if $product->specificPrice && $product->specificPrice.reduction && $product->specificPrice.reduction_type == 'percentage'}
  856.     {addJsDef reduction_percent=$product->specificPrice.reduction*100|floatval}
  857. {else}
  858.     {addJsDef reduction_percent=0}
  859. {/if}
  860. {if $product->specificPrice && $product->specificPrice.reduction && $product->specificPrice.reduction_type == 'amount'}
  861.     {addJsDef reduction_price=$product->specificPrice.reduction|floatval}
  862. {else}
  863.     {addJsDef reduction_price=0}
  864. {/if}
  865. {if $product->specificPrice && $product->specificPrice.price}
  866.     {addJsDef specific_price=$product->specificPrice.price|floatval}
  867. {else}
  868.     {addJsDef specific_price=0}
  869. {/if}
  870. {addJsDef specific_currency=($product->specificPrice && $product->specificPrice.id_currency)|boolval} {* TODO: remove if always false *}
  871. {addJsDef stock_management=$PS_STOCK_MANAGEMENT|intval}
  872. {addJsDef taxRate=$tax_rate|floatval}
  873. {addJsDefL name=doesntExist}{l s='This combination does not exist for this product. Please select another combination.' js=1}{/addJsDefL}
  874. {addJsDefL name=doesntExistNoMore}{l s='This product is no longer in stock' js=1}{/addJsDefL}
  875. {addJsDefL name=doesntExistNoMoreBut}{l s='with those attributes but is available with others.' js=1}{/addJsDefL}
  876. {addJsDefL name=fieldRequired}{l s='Please fill in all the required fields before saving your customization.' js=1}{/addJsDefL}
  877. {addJsDefL name=uploading_in_progress}{l s='Uploading in progress, please be patient.' js=1}{/addJsDefL}
  878. {addJsDefL name='product_fileDefaultHtml'}{l s='No file selected' js=1}{/addJsDefL}
  879. {addJsDefL name='product_fileButtonHtml'}{l s='Choose File' js=1}{/addJsDefL}
  880. {/strip}
  881. {/if}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement