1{include file="$tpl_dir./errors.tpl"} 2 3{if empty($errors)} 4 {if !$priceDisplay || $priceDisplay == 2} 5 {assign var='productPrice' value=$product->getPrice(true)} 6 {assign var='productPriceWithoutReduction' value=$product->getPriceWithoutReduct(false)} 7 {elseif $priceDisplay == 1} 8 {assign var='productPrice' value=$product->getPrice(false)} 9 {assign var='productPriceWithoutReduction' value=$product->getPriceWithoutReduct(true)} 10 {/if} 11 {assign var='cartDefaultWidth' value={getWidthSize|intval type='cart'}} 12 {assign var='cartDefaultHeight' value={getHeightSize|intval type='cart'}} 13 {assign var='largeDefaultWidth' value={getWidthSize|intval type='large'}} 14 {assign var='largeDefaultHeight' value={getHeightSize|intval type='large'}} 15 16 <div itemscope itemtype="https://schema.org/Product"> 17 <meta itemprop="url" content="{$link->getProductLink($product)|escape:'htmlall':'UTF-8'}"> 18 <div class="primary_block row"> 19 20 {if isset($adminActionDisplay) && $adminActionDisplay} 21 <div id="admin-action" class="container"> 22 <div class="alert alert-info">{l s='This product is not visible to your customers.'} 23 <input type="hidden" id="admin-action-product-id" value="{$product->id|intval}"> 24 <a id="publish_button" class="btn btn-success" href="#">{l s='Publish'}</a> 25 <a id="lnk_view" class="btn btn-warning" href="#">{l s='Back'}</a> 26 </div> 27 <p id="admin-action-result"></p> 28 </div> 29 {/if} 30 31 {if !empty($confirmation)} 32 <div class="alert alert-warning">{$confirmation}</div> 33 {/if} 34 35 <div class="pb-left-column col-xs-12 col-sm-4 col-md-5"> 36 37 <div id="image-block" class="thumbnail clearfix"> 38 39 <div class="product-label-container"> 40 {if $product->online_only} 41 <span class="product-label product-label-online">{l s='Online only'}</span> 42 {/if} 43 {if $product->new} 44 <span class="product-label product-label-new">{l s='New'}</span> 45 {/if} 46 {if $product->on_sale} 47 <span class="product-label product-label-sale">{l s='Sale!'}</span> 48 {elseif $product->specificPrice && $product->specificPrice.reduction && $productPriceWithoutReduction > $productPrice} 49 <span class="product-label product-label-discount">{l s='Reduced price!'}</span> 50 {/if} 51 </div> 52 53 {if $have_image} 54 <a class="fancybox" 55 data-fancybox-group="product" 56 id="view_full_size" 57 href="{$link->getProductLink($product)|escape:'html':'UTF-8'}" 58 onclick="return false;" 59 > 60 <noscript> 61 <img class="img-responsive center-block" 62 itemprop="image" 63 src="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'large', null, ImageManager::retinaSupport())|escape:'html':'UTF-8'}" 64 title="{if !empty($cover.legend)}{$cover.legend|escape:'html':'UTF-8'}{else}{$product->name|escape:'html':'UTF-8'}{/if}" 65 alt="{if !empty($cover.legend)}{$cover.legend|escape:'html':'UTF-8'}{else}{$product->name|escape:'html':'UTF-8'}{/if}" 66 width="{$largeDefaultWidth|intval}" 67 height="{$largeDefaultHeight|intval}" 68 > 69 </noscript> 70 <picture id="bigpic"> 71 <!--[if IE 9]><video style="display: none;"><![endif]--> 72 {if !empty($webp)} 73 <source class="img-responsive center-block" 74 itemprop="image" 75 srcset="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'large', 'webp', ImageManager::retinaSupport())|escape:'html':'UTF-8'}" 76 title="{if !empty($cover.legend)}{$cover.legend|escape:'html':'UTF-8'}{else}{$product->name|escape:'html':'UTF-8'}{/if}" 77 type="image/webp" 78 > 79 {/if} 80 <!--[if IE 9]></video><![endif]--> 81 <img class="img-responsive center-block" 82 itemprop="image" 83 src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=" 84 srcset="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'large', null, ImageManager::retinaSupport())|escape:'html':'UTF-8'}" 85 title="{if !empty($cover.legend)}{$cover.legend|escape:'html':'UTF-8'}{else}{$product->name|escape:'html':'UTF-8'}{/if}" 86 alt="{if !empty($cover.legend)}{$cover.legend|escape:'html':'UTF-8'}{else}{$product->name|escape:'html':'UTF-8'}{/if}" 87 width="{$largeDefaultWidth|intval}" 88 height="{$largeDefaultHeight|intval}" 89 > 90 </picture> 91 {if !$jqZoomEnabled && !$content_only} 92 <span class="span_link" title="{l s='Zoom in'}"> 93 <i class="icon icon-search-plus"></i> 94 </span> 95 {/if} 96 </a> 97 {else} 98 <span id="view_full_size"> 99 <noscript> 100 <img class="img-responsive center-block" 101 itemprop="image" 102 src="{$img_prod_dir|escape:'html':'UTF-8'}{$lang_iso|escape:'html':'UTF-8'}-default-large.jpg" 103 title="{$product->name|escape:'html':'UTF-8'}" 104 width="{$largeDefaultWidth|intval}" 105 height="{$largeDefaultHeight|intval}" 106 > 107 </noscript> 108 <picture id="bigpic"> 109 <!--[if IE 9]><video style="display: none;"><![endif]--> 110 {if (!empty($webp))} 111 <source class="img-responsive center-block" 112 itemprop="image" 113 srcset="{$img_prod_dir|escape:'html':'UTF-8'}{$lang_iso|escape:'html':'UTF-8'}-default-large.webp" 114 title="{$product->name|escape:'html':'UTF-8'}" 115 type="image/webp" 116 > 117 {/if} 118 <!--[if IE 9]></video><![endif]--> 119 <img class="img-responsive center-block" 120 itemprop="image" 121 src="{$img_prod_dir|escape:'html':'UTF-8'}{$lang_iso|escape:'html':'UTF-8'}-default-large.jpg" 122 srcset="{$img_prod_dir|escape:'html':'UTF-8'}{$lang_iso|escape:'html':'UTF-8'}-default-large.jpg" 123 title="{$product->name|escape:'html':'UTF-8'}" 124 width="{$largeDefaultWidth|intval}" 125 height="{$largeDefaultHeight|intval}" 126 > 127 </picture> 128 </span> 129 {/if} 130 </div> 131 132 {if !empty($images)} 133 <div id="views_block" class="clearfix {if isset($images) && count($images) < 2}hidden{/if}"> 134 <div id="thumbs_list"> 135 <ul id="thumbs_list_frame" class="list-unstyled"> 136 {if isset($images)} 137 {foreach from=$images item=image name=thumbnails} 138 139 {assign var=imageIds value="`$product->id`-`$image.id_image`"} 140 {if !empty($image.legend)} 141 {assign var=imageTitle value=$image.legend|escape:'html':'UTF-8'} 142 {else} 143 {assign var=imageTitle value=$product->name|escape:'html':'UTF-8'} 144 {/if} 145 146 <li data-slide-num="{$smarty.foreach.thumbnails.iteration|intval}" 147 id="thumbnail_{$image.id_image|intval}" 148 style="display: inline-block" 149 > 150 {if $jqZoomEnabled && $have_image && !$content_only} 151 <a href="{$link->getImageLink($product->link_rewrite, $imageIds, 'thickbox', null, ImageManager::retinaSupport())|escape:'html':'UTF-8'}" 152 class="thumbnail fancybox" 153 title="{$imageTitle}" 154 data-fancybox-group="product" 155 style="height: {$cartDefaultHeight + 8}px; width: {$cartDefaultWidth + 8}px" 156 > 157 <noscript> 158 <img class="img-responsive" 159 src="{$link->getImageLink($product->link_rewrite, $imageIds, 'cart', null, ImageManager::retinaSupport())|escape:'html':'UTF-8'}" 160 alt="{$imageTitle|escape:'htmlall':'UTF-8'}" 161 title="{$imageTitle|escape:'htmlall':'UTF-8'}" 162 itemprop="image" 163 width="{$cartDefaultWidth|intval}" 164 height="{$cartDefaultHeight|intval}" 165 > 166 </noscript> 167 <picture class="img-responsive" id="thumb_{$image.id_image|intval}"> 168 <!--[if IE 9]><video style="display: none;"><![endif]--> 169 {if !empty($webp)} 170 <source srcset="{$link->getImageLink($product->link_rewrite, $imageIds, 'cart', 'webp', ImageManager::retinaSupport())|escape:'html':'UTF-8'}" 171 title="{$imageTitle|escape:'htmlall':'UTF-8'}" 172 itemprop="image" 173 type="image/webp" 174 > 175 {/if} 176 <!--[if IE 9]></video><![endif]--> 177 <img src="{$link->getImageLink($product->link_rewrite, $imageIds, 'cart', null, ImageManager::retinaSupport())|escape:'html':'UTF-8'}" 178 alt="{$imageTitle|escape:'htmlall':'UTF-8'}" 179 title="{$imageTitle|escape:'htmlall':'UTF-8'}" 180 itemprop="image" 181 width="{$cartDefaultWidth|intval}" 182 height="{$cartDefaultHeight|intval}" 183 > 184 </picture> 185 </a> 186 {else} 187 <a href="{$link->getImageLink($product->link_rewrite, $imageIds, 'thickbox', null, ImageManager::retinaSupport())|escape:'html':'UTF-8'}" 188 class="thumbnail fancybox{if $image.id_image == $cover.id_image} shown{/if}" 189 title="{$imageTitle|escape:'htmlall':'UTF-8'}" 190 data-fancybox-group="product" 191 style="height: {$cartDefaultHeight + 8}px; width: {$cartDefaultWidth + 8}px" 192 > 193 {if !empty($lazy_load)} 194 <noscript> 195 <img class="img-responsive" 196 src="{$link->getImageLink($product->link_rewrite, $imageIds, 'cart', null, ImageManager::retinaSupport())|escape:'html':'UTF-8'}" 197 srcset="{$link->getImageLink($product->link_rewrite, $imageIds, 'cart', null, ImageManager::retinaSupport())|escape:'html':'UTF-8'}" 198 alt="{$imageTitle|escape:'htmlall':'UTF-8'}" 199 title="{$imageTitle|escape:'htmlall':'UTF-8'}" 200 itemprop="image" 201 width="{$cartDefaultWidth|intval}" 202 height="{$cartDefaultHeight|intval}" 203 > 204 </noscript> 205 {/if} 206 <picture class="img-responsive" id="thumb_{$image.id_image|intval}"> 207 <!--[if IE 9]><video style="display: none;"><![endif]--> 208 {if !empty($webp)} 209 <source srcset="{$link->getImageLink($product->link_rewrite, $imageIds, 'cart', 'webp', ImageManager::retinaSupport())|escape:'html':'UTF-8'}" 210 title="{$imageTitle}" 211 itemprop="image" 212 type="image/webp" 213 > 214 {/if} 215 <!--[if IE 9]></video><![endif]--> 216 <img src="{$link->getImageLink($product->link_rewrite, $imageIds, 'cart', null, ImageManager::retinaSupport())|escape:'html':'UTF-8'}" 217 srcset="{$link->getImageLink($product->link_rewrite, $imageIds, 'cart', null, ImageManager::retinaSupport())|escape:'html':'UTF-8'}" 218 alt="{$imageTitle}" 219 title="{$imageTitle}" 220 itemprop="image" 221 width="{$cartDefaultWidth|intval}" 222 height="{$cartDefaultHeight|intval}" 223 > 224 </picture> 225 </a> 226 {/if} 227 </li> 228 {/foreach} 229 {/if} 230 </ul> 231 </div> 232 </div> 233 {/if} 234 235 </div> 236 237 <div class="pb-center-column col-xs-12 col-sm-8 col-md-7"> 238 239 <h1 itemprop="name">{$product->name|escape:'html':'UTF-8'}</h1> 240 <p id="product_reference"{if empty($product->reference) || !$product->reference} style="display: none;"{/if}> 241 <b>{l s='Reference:'}</b> 242 <meta itemprop="sku"{if !empty($product->reference) && $product->reference} content="{$product->reference}"{/if}> 243 <span class="editable">{if !isset($groups)}{$product->reference|escape:'html':'UTF-8'}{/if}</span> 244 </p> 245 246 {if !$product->is_virtual && $product->condition && $show_condition} 247 <p id="product_condition"> 248 <b>{l s='Condition:'}</b> 249 {if $product->condition == 'new'} 250 <link itemprop="itemCondition" href="https://schema.org/NewCondition"> 251 <span class="editable">{l s='New product'}</span> 252 {elseif $product->condition == 'used'} 253 <link itemprop="itemCondition" href="https://schema.org/UsedCondition"> 254 <span class="editable">{l s='Used'}</span> 255 {elseif $product->condition == 'refurbished'} 256 <link itemprop="itemCondition" href="https://schema.org/RefurbishedCondition"> 257 <span class="editable">{l s='Refurbished'}</span> 258 {/if} 259 </p> 260 {/if} 261 262 {if $product->id_manufacturer > 0} 263 <p itemprop="brand" itemscope itemtype="https://schema.org/Brand"> 264 <b>{l s='Manufacturer:'}</b> 265 <a itemprop="url" href="{$link->getManufacturerLink($product->id_manufacturer)}" title="{$product->manufacturer_name}"> 266 <span itemprop="name">{$product->manufacturer_name}</span> 267 </a> 268 </p> 269 {/if} 270 271 {if $product->description_short} 272 <div id="short_description_block"> 273 <div id="short_description_content" class="rte" itemprop="description">{$product->description_short}</div> 274 </div> 275 {/if} 276 277 <p id="product-availability"> 278 {if ($display_qties == 1 && !$PS_CATALOG_MODE && $PS_STOCK_MANAGEMENT && $product->available_for_order)} 279 <span id="pQuantityAvailable"{if $product->quantity <= 0} style="display: none;"{/if}> 280 <span id="quantityAvailable">{$product->quantity|intval}</span> 281 <span {if $product->quantity > 1} style="display: none;"{/if} id="quantityAvailableTxt">{l s='Item'}</span> 282 <span {if $product->quantity == 1} style="display: none;"{/if} id="quantityAvailableTxtMultiple">{l s='Items'}</span> 283 </span> 284 {/if} 285 286 <span 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}> 287 {*<span id="availability_label"><b>{l s='Availability:'}<b></span>*} 288 <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> 289 </span> 290 291 {if $PS_STOCK_MANAGEMENT} 292 <span class="label label-warning" 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!'}</span> 293 {/if} 294 </p> 295 296 {if $PS_STOCK_MANAGEMENT} 297 {if !$product->is_virtual}{hook h="displayProductDeliveryTime" product=$product}{/if} 298 {/if} 299 300 <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}> 301 <span id="availability_date_label"><b>{l s='Availability date:'}</b></span> 302 <span id="availability_date_value">{if Validate::isDate($product->available_date)}{dateFormat date=$product->available_date full=false}{/if}</span> 303 </p> 304 305 <div id="oosHook"{if $product->quantity > 0} style="display: none;"{/if}> 306 {$HOOK_PRODUCT_OOS} 307 </div> 308 309 <div class="pb-right-column"> 310 {if ($product->show_price && !isset($restricted_country_mode)) || isset($groups) || $product->reference || (isset($HOOK_PRODUCT_ACTIONS) && $HOOK_PRODUCT_ACTIONS)} 311 312 <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"> 313 314 <input type="hidden" name="token" value="{$static_token}"> 315 <input type="hidden" name="id_product" value="{$product->id|intval}" id="product_page_product_id"> 316 <input type="hidden" name="add" value="1"> 317 <input type="hidden" name="id_product_attribute" id="idCombination" value=""> 318 319 <div class="box-info-product"> 320 <div class="content_prices clearfix"> 321 {if $product->show_price && !isset($restricted_country_mode) && !$PS_CATALOG_MODE} 322 <div> 323 <p class="our_price_display" itemprop="offers" itemscope itemtype="https://schema.org/Offer">{strip} 324 {if $product->quantity > 0}<link itemprop="availability" href="https://schema.org/InStock">{/if} 325 {if $priceDisplay >= 0 && $priceDisplay <= 2} 326 <meta itemprop="price" content="{$productPrice}"> 327 <span id="our_price_display" class="price">{convertPrice price=$productPrice|floatval}</span> 328 {if $tax_enabled && ((isset($display_tax_label) && $display_tax_label == 1) || !isset($display_tax_label))} 329 {if $priceDisplay == 1} {l s='tax excl.'}{else} {l s='tax incl.'}{/if} 330 {/if} 331 <meta itemprop="priceCurrency" content="{$currency->iso_code}"> 332 {hook h="displayProductPriceBlock" product=$product type="price"} 333 {/if} 334 {/strip}</p> 335 <p id="reduction_percent" {if $productPriceWithoutReduction <= 0 || !$product->specificPrice || $product->specificPrice.reduction_type != 'percentage'} style="display:none;"{/if}>{strip} 336 <span id="reduction_percent_display"> 337 {if $product->specificPrice && $product->specificPrice.reduction_type == 'percentage'}-{$product->specificPrice.reduction*100}%{/if} 338 </span> 339 {/strip}</p> 340 <p id="reduction_amount" {if $productPriceWithoutReduction <= 0 || !$product->specificPrice || $product->specificPrice.reduction_type != 'amount' || $product->specificPrice.reduction|floatval ==0} style="display:none"{/if}>{strip} 341 <span id="reduction_amount_display"> 342 {if $product->specificPrice && $product->specificPrice.reduction_type == 'amount' && $product->specificPrice.reduction|floatval !=0} 343 -{convertPrice price=$productPriceWithoutReduction|floatval-$productPrice|floatval} 344 {/if} 345 </span> 346 {/strip}</p> 347 <p id="old_price"{if (!$product->specificPrice || !$product->specificPrice.reduction)} class="hidden"{/if}>{strip} 348 {if $priceDisplay >= 0 && $priceDisplay <= 2} 349 {hook h="displayProductPriceBlock" product=$product type="old_price"} 350 <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> 351 {/if} 352 {/strip}</p> 353 {if $priceDisplay == 2} 354 <br> 355 <span id="pretaxe_price">{strip} 356 <span id="pretaxe_price_display">{convertPrice price=$product->getPrice(false)}</span> {l s='tax excl.'} 357 {/strip}</span> 358 {/if} 359 </div> 360 {if $packItems|@count && $productPrice < $product->getNoPackPrice()} 361 <p class="pack_price">{l s='Instead of'} <span style="text-decoration: line-through;">{convertPrice price=$product->getNoPackPrice()}</span></p> 362 {/if} 363 {if $product->ecotax != 0} 364 <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'} 365 {if $product->specificPrice && $product->specificPrice.reduction} 366 <br>{l s='(not impacted by the discount)'} 367 {/if} 368 </p> 369 {/if} 370 {if !empty($product->unity) && $product->unit_price_ratio > 0.000000} 371 {math equation="pprice / punit_price" pprice=$productPrice punit_price=$product->unit_price_ratio assign=unit_price} 372 <p class="unit-price"><span id="unit_price_display">{convertPrice price=$unit_price}</span> {l s='per'} {$product->unity|escape:'html':'UTF-8'}</p> 373 {hook h="displayProductPriceBlock" product=$product type="unit_price"} 374 {/if} 375 {/if} {*close if for show price*} 376 {hook h="displayProductPriceBlock" product=$product type="weight" hook_origin='product_sheet'} 377 {hook h="displayProductPriceBlock" product=$product type="after_price"} 378 </div> 379 380 <div class="product_attributes clearfix"> 381 <p id="minimal_quantity_wanted_p"{if $product->minimal_quantity <= 1 || !$product->available_for_order || $PS_CATALOG_MODE} style="display: none;"{/if}> 382 {l s='The minimum purchase order quantity for the product is'} <b id="minimal_quantity_label">{$product->minimal_quantity}</b> 383 </p> 384 385 {if isset($groups)} 386 <div id="attributes"> 387 {foreach from=$groups key=id_attribute_group item=group} 388 {if !empty($group.attributes)} 389 <fieldset class="attribute_fieldset form-group"> 390 <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'} </label> 391 {assign var="groupName" value="group_$id_attribute_group"} 392 <div class="attribute_list"> 393 {if ($group.group_type == 'select')} 394 <select name="{$groupName}" id="group_{$id_attribute_group|intval}" class="form-control attribute_select no-print"> 395 {foreach from=$group.attributes key=id_attribute item=group_attribute} 396 <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> 397 {/foreach} 398 </select> 399 {elseif ($group.group_type == 'color')} 400 <ul id="color_to_pick_list"> 401 {assign var="default_colorpicker" value=""} 402 {foreach from=$group.attributes key=id_attribute item=group_attribute} 403 {assign var='img_color_exists' value=file_exists($col_img_dir|cat:$id_attribute|cat:'.jpg')} 404 <li{if $group.default == $id_attribute} class="selected"{/if}> 405 <a href="{$link->getProductLink($product)|escape:'html':'UTF-8'}" id="color_{$id_attribute|intval}" 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'}"> 406 {if $img_color_exists} 407 <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"> 408 {/if} 409 </a> 410 </li> 411 {if ($group.default == $id_attribute)} 412 {$default_colorpicker = $id_attribute} 413 {/if} 414 {/foreach} 415 </ul> 416 <input type="hidden" class="color_pick_hidden" name="{$groupName|escape:'html':'UTF-8'}" value="{$default_colorpicker|intval}"> 417 {elseif ($group.group_type == 'radio')} 418 <ul> 419 {foreach from=$group.attributes key=id_attribute item=group_attribute} 420 <li> 421 <input type="radio" class="attribute_radio" name="{$groupName|escape:'html':'UTF-8'}" value="{$id_attribute}" {if ($group.default == $id_attribute)} checked="checked"{/if}> 422 <span class="label-text">{$group_attribute|escape:'html':'UTF-8'}</span> 423 </li> 424 {/foreach} 425 </ul> 426 {/if} 427 </div> 428 </fieldset> 429 {/if} 430 {/foreach} 431 </div> 432 {/if} 433 </div> 434 435 <div class="box-cart-bottom"> 436 {if !$PS_CATALOG_MODE} 437 <div id="quantity_wanted_p"{if (!$allow_oosp && $product->quantity <= 0) || !$product->available_for_order || $PS_CATALOG_MODE} style="display: none;"{/if}> 438 <div><label for="quantity_wanted">{l s='Quantity'}</label></div> 439 <div class="input-group"> 440 441 <input type="tel" min="1" name="qty" id="quantity_wanted" class="text text-center form-control" value="{if isset($quantityBackup)}{$quantityBackup|intval}{else}{if $product->minimal_quantity > 1}{$product->minimal_quantity}{else}1{/if}{/if}"> 442 <div class="input-group-btn"> 443 <a href="#" data-field-qty="qty" class="btn btn-default button-minus product_quantity_down" title="Decrease" aria-label="Decrease"> 444 <i class="icon icon-fw icon-angle-down"></i> 445 </a> 446 </div> 447 <div class="input-group-btn"> 448 <a href="#" data-field-qty="qty" class="btn btn-default button-plus product_quantity_up" title="Increase" aria-label="Increase"> 449 <i class="icon icon-fw icon-angle-up"></i> 450 </a> 451 </div> 452 </div> 453 </div> 454 {/if} 455 <div{if (!$allow_oosp && $product->quantity <= 0) || !$product->available_for_order || (isset($restricted_country_mode) && $restricted_country_mode) || $PS_CATALOG_MODE} class="unvisible"{/if}> 456 <p id="add_to_cart" class="buttons_bottom_block no-print"> 457 <button type="submit" name="Submit" class="btn btn-block btn-lg btn-success btn-add-to-cart"> 458 <i class="icon icon-shopping-basket"></i> 459 <span>{if $content_only && (isset($product->customization_required) && $product->customization_required)}{l s='Customize'}{else}{l s='Add to cart'}{/if}</span> 460 </button> 461 </p> 462 </div> 463 </div> 464 465 </div> 466 </form> 467 {/if} 468 {if isset($HOOK_EXTRA_RIGHT) && $HOOK_EXTRA_RIGHT}{$HOOK_EXTRA_RIGHT}{/if} 469 470 {if !$content_only} 471 <ul id="usefull_link_block" class="list-unstyled hidden-print"> 472 {if !empty($HOOK_EXTRA_LEFT)}{$HOOK_EXTRA_LEFT}{/if} 473 <li> 474 <a href="javascript:print();" title="{l s='Print this page'}"> 475 <i class="icon icon-fw icon-print"></i> {l s='Print'} 476 </a> 477 </li> 478 </ul> 479 {/if} 480 {if isset($HOOK_PRODUCT_ACTIONS) && $HOOK_PRODUCT_ACTIONS}{$HOOK_PRODUCT_ACTIONS}{/if} 481 </div> 482 </div> 483 </div> 484 485 {if !$content_only} 486 {if !empty($quantity_discounts)} 487 <section id="product-volume-discounts" class="page-product-box"> 488 <h3 class="page-product-heading">{l s='Volume discounts'}</h3> 489 <div id="quantityDiscount" class="table-responsive"> 490 <table class="table-product-discounts table table-condensed table-bordered table-hover"> 491 <thead> 492 <tr> 493 <th>{l s='Quantity'}</th> 494 <th>{if $display_discount_price}{l s='Price'}{else}{l s='Discount'}{/if}</th> 495 <th>{l s='You Save'}</th> 496 </tr> 497 </thead> 498 <tbody> 499 {foreach from=$quantity_discounts item='quantity_discount' name='quantity_discounts'} 500 {if $quantity_discount.price >= 0 || $quantity_discount.reduction_type == 'amount'} 501 {$realDiscountPrice=$productPriceWithoutReduction|floatval-$quantity_discount.real_value|floatval} 502 {else} 503 {$realDiscountPrice=$productPriceWithoutReduction|floatval-($productPriceWithoutReduction*$quantity_discount.reduction)|floatval} 504 {/if} 505 <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}"> 506 <td> 507 {$quantity_discount.quantity|intval} 508 </td> 509 <td> 510 {if $quantity_discount.price >= 0 || $quantity_discount.reduction_type == 'amount'} 511 {if $display_discount_price} 512 {if $quantity_discount.reduction_tax == 0 && !$quantity_discount.price} 513 {convertPrice price = $productPriceWithoutReduction|floatval-($productPriceWithoutReduction*$quantity_discount.reduction_with_tax)|floatval} 514 {else} 515 {convertPrice price=$productPriceWithoutReduction|floatval-$quantity_discount.real_value|floatval} 516 {/if} 517 {else} 518 {convertPrice price=$quantity_discount.real_value|floatval} 519 {/if} 520 {else} 521 {if $display_discount_price} 522 {if $quantity_discount.reduction_tax == 0} 523 {convertPrice price = $productPriceWithoutReduction|floatval-($productPriceWithoutReduction*$quantity_discount.reduction_with_tax)|floatval} 524 {else} 525 {convertPrice price = $productPriceWithoutReduction|floatval-($productPriceWithoutReduction*$quantity_discount.reduction)|floatval} 526 {/if} 527 {else} 528 {$quantity_discount.real_value|floatval}% 529 {/if} 530 {/if} 531 </td> 532 <td> 533 <span>{l s='Up to'}</span> 534 {if $quantity_discount.price >= 0 || $quantity_discount.reduction_type == 'amount'} 535 {$discountPrice=$productPriceWithoutReduction|floatval-$quantity_discount.real_value|floatval} 536 {else} 537 {$discountPrice=$productPriceWithoutReduction|floatval-($productPriceWithoutReduction*$quantity_discount.reduction)|floatval} 538 {/if} 539 {$discountPrice=$discountPrice * $quantity_discount.quantity} 540 {$qtyProductPrice=$productPriceWithoutReduction|floatval * $quantity_discount.quantity} 541 {convertPrice price=$qtyProductPrice - $discountPrice} 542 </td> 543 </tr> 544 {/foreach} 545 </tbody> 546 </table> 547 </div> 548 </section> 549 {/if} 550 551 {if !empty($features)} 552 <section id="product-features" class="page-product-box"> 553 <h3 class="page-product-heading">{l s='Data sheet'}</h3> 554 <div class="table-responsive"> 555 <table class="table table-bordered table-condensed table-hover table-data-sheet"> 556 {foreach from=$features item=feature} 557 <tr class="{cycle values="odd,even"}"> 558 {if isset($feature.value)} 559 <td>{$feature.name|escape:'html':'UTF-8'}</td> 560 <td>{$feature.value|escape:'html':'UTF-8'}</td> 561 {/if} 562 </tr> 563 {/foreach} 564 </table> 565 </div> 566 </section> 567 {/if} 568 569 {if isset($product) && $product->description} 570 <section id="product-description" class="page-product-box"> 571 <h3 class="page-product-heading">{l s='More info'}</h3> 572 <div class="rte">{$product->description}</div> 573 </section> 574 {/if} 575 576 {if isset($packItems) && $packItems|@count > 0} 577 <section id="blockpack" class="page-product-box"> 578 <h3 class="page-product-heading">{l s='Pack content'}</h3> 579 {include file="$tpl_dir./product-list.tpl" products=$packItems} 580 </section> 581 {/if} 582 583 {if !empty($HOOK_PRODUCT_TAB_CONTENT) || !empty({$HOOK_PRODUCT_TAB})} 584 <section id="product-hook-tab" class="page-product-box"> 585 {if !empty($HOOK_PRODUCT_TAB)}{$HOOK_PRODUCT_TAB}{/if} 586 {if !empty($HOOK_PRODUCT_TAB_CONTENT)}{$HOOK_PRODUCT_TAB_CONTENT}{/if} 587 </section> 588 {/if} 589 590 {if !empty($accessories)} 591 <section id="product-accessories" class="page-product-box"> 592 <h3 class="page-product-heading">{l s='Accessories'}</h3> 593 <div class="accessories-block"> 594 {include file="$tpl_dir./product-list.tpl" products=$accessories} 595 </div> 596 </section> 597 {/if} 598 599 {if isset($HOOK_PRODUCT_FOOTER) && $HOOK_PRODUCT_FOOTER}{$HOOK_PRODUCT_FOOTER}{/if} 600 601 {if (isset($product) && $product->description) || (isset($features) && $features) || (isset($accessories) && $accessories) || (isset($HOOK_PRODUCT_TAB) && $HOOK_PRODUCT_TAB) || (isset($attachments) && $attachments) || isset($product) && $product->customizable} 602 {if isset($attachments) && $attachments} 603 <section id="product-attachments" class="page-product-box"> 604 <h3 class="page-product-heading">{l s='Download'}</h3> 605 <div class="row"> 606 {foreach from=$attachments item=attachment} 607 <div class="col-xs-12 col-sm-4 col-lg-3"> 608 <div class="panel panel-default"> 609 <div class="panel-heading"> 610 <a href="{$link->getPageLink('attachment', true, NULL, "id_attachment={$attachment.id_attachment}")|escape:'html':'UTF-8'}"> 611 {$attachment.name|escape:'html':'UTF-8'} 612 </a> 613 </div> 614 <div class="panel-body"> 615 {if !empty($attachment.description)} 616 <p class="text-muted">{$attachment.description|escape:'html':'UTF-8'}</p> 617 {/if} 618 <a class="btn btn-default btn-block" href="{$link->getPageLink('attachment', true, NULL, "id_attachment={$attachment.id_attachment}")|escape:'html':'UTF-8'}"> 619 <i class="icon icon-download"></i> {l s="Download"} ({Tools::formatBytes($attachment.file_size, 2)}) 620 </a> 621 </div> 622 </div> 623 </div> 624 {/foreach} 625 </div> 626 </section> 627 {/if} 628 629 {if isset($product) && $product->customizable} 630 <section id="product-customization" class="page-product-box"> 631 <h3 class="page-product-heading">{l s='Product customization'}</h3> 632 <form method="post" action="{$customizationFormTarget}" enctype="multipart/form-data" id="customizationForm" class="clearfix"> 633 <p class="infoCustomizable"> 634 {l s='After saving your customized product, remember to add it to your cart.'} 635 {if $product->uploadable_files} 636 <br> {l s='Allowed file formats are: GIF, JPG, PNG'} 637 {/if} 638 </p> 639 640 {if $product->uploadable_files|intval} 641 <div class="customizableProductsFile"> 642 <h3>{l s='Pictures'}</h3> 643 <ul id="uploadable_files" class="list-unstyled clearfix"> 644 {counter start=0 assign='customizationField'} 645 {foreach from=$customizationFields item='field' name='customizationFields'} 646 {if $field.type == 0} 647 <li class="customizationUploadLine form-group{if $field.required} required{/if}">{assign var='key' value='pictures_'|cat:$product->id|cat:'_'|cat:$field.id_customization_field} 648 {if isset($pictures.$key)} 649 <div class="customizationUploadBrowse"> 650 <img src="{$pic_dir}{$pictures.$key}_small" alt=""> 651 <a href="{$link->getProductDeletePictureLink($product, $field.id_customization_field)|escape:'html':'UTF-8'}" title="{l s='Delete'}" > 652 <img src="{$img_dir}icon/delete.gif" alt="{l s='Delete'}" class="customization_delete_icon" width="11" height="13"> 653 </a> 654 </div> 655 {/if} 656 <div class="customizationUploadBrowse form-group"> 657 <label class="customizationUploadBrowseDescription"> 658 {if !empty($field.name)} 659 {$field.name} 660 {else} 661 {l s='Please select an image file from your computer'} 662 {/if} 663 {if $field.required}<sup>*</sup>{/if} 664 </label> 665 <input type="file" name="file{$field.id_customization_field}" id="img{$customizationField}" class="form-control customization_block_input {if isset($pictures.$key)}filled{/if}"> 666 </div> 667 </li> 668 {counter} 669 {/if} 670 {/foreach} 671 </ul> 672 </div> 673 {/if} 674 675 {if $product->text_fields|intval} 676 <div class="customizableProductsText"> 677 <h3>{l s='Text'}</h3> 678 <ul id="text_fields" class="list-unstyled"> 679 {counter start=0 assign='customizationField'} 680 {foreach from=$customizationFields item='field' name='customizationFields'} 681 {if $field.type == 1} 682 <li class="customizationUploadLine form-group{if $field.required} required{/if}"> 683 <label for ="textField{$customizationField}"> 684 {assign var='key' value='textFields_'|cat:$product->id|cat:'_'|cat:$field.id_customization_field} 685 {if !empty($field.name)} 686 {$field.name} 687 {/if} 688 {if $field.required}<sup>*</sup>{/if} 689 </label> 690 <textarea name="textField{$field.id_customization_field}" class="form-control customization_block_input" id="textField{$customizationField}" rows="3" cols="20">{strip} 691 {if isset($textFields.$key)} 692 {$textFields.$key|stripslashes} 693 {/if} 694 {/strip}</textarea> 695 </li> 696 {counter} 697 {/if} 698 {/foreach} 699 </ul> 700 </div> 701 {/if} 702 <div id="customizedDatas" class="form-group"> 703 <input type="hidden" name="quantityBackup" id="quantityBackup" value=""> 704 <input type="hidden" name="submitCustomizedDatas" value="1"> 705 <button class="btn btn-lg btn-success" name="saveCustomization"> 706 <span>{l s='Save'}</span> 707 </button> 708 <span id="ajax-loader" class="unvisible"> 709 <img src="{$img_ps_dir}loader.gif" alt="loader"> 710 </span> 711 </div> 712 </form> 713 <div class="form-group"> 714 <div class="help-block"> 715 <sup>*</sup> {l s='required fields'} 716 </div> 717 </div> 718 </section> 719 {/if} 720 721 {/if} 722 {/if} 723 </div> 724 725 {strip} 726 {if isset($smarty.get.ad) && $smarty.get.ad} 727 {addJsDefL name=ad}{$base_dir|cat:$smarty.get.ad|escape:'html':'UTF-8'}{/addJsDefL} 728 {/if} 729 {if isset($smarty.get.adtoken) && $smarty.get.adtoken} 730 {addJsDefL name=adtoken}{$smarty.get.adtoken|escape:'html':'UTF-8'}{/addJsDefL} 731 {/if} 732 {addJsDef allowBuyWhenOutOfStock=$allow_oosp|boolval} 733 {addJsDef availableNowValue=$product->available_now|escape:'quotes':'UTF-8'} 734 {addJsDef availableLaterValue=$product->available_later|escape:'quotes':'UTF-8'} 735 {addJsDef attribute_anchor_separator=$attribute_anchor_separator|escape:'quotes':'UTF-8'} 736 {addJsDef attributesCombinations=$attributesCombinations} 737 {addJsDef currentDate=$smarty.now|date_format:'%Y-%m-%d %H:%M:%S'} 738 {if isset($combinations) && $combinations} 739 {addJsDef combinations=$combinations} 740 {addJsDef combinationsFromController=$combinations} 741 {addJsDef displayDiscountPrice=$display_discount_price} 742 {addJsDefL name='upToTxt'}{l s='Up to' js=1}{/addJsDefL} 743 {/if} 744 {if isset($combinationImages) && $combinationImages} 745 {addJsDef combinationImages=$combinationImages} 746 {/if} 747 {addJsDef customizationId=$id_customization} 748 {addJsDef customizationFields=$customizationFields} 749 {addJsDef default_eco_tax=$product->ecotax|floatval} 750 {addJsDef displayPrice=$priceDisplay|intval} 751 {addJsDef ecotaxTax_rate=$ecotaxTax_rate|floatval} 752 {if isset($cover.id_image_only)} 753 {addJsDef idDefaultImage=$cover.id_image_only|intval} 754 {else} 755 {addJsDef idDefaultImage=0} 756 {/if} 757 {addJsDef img_ps_dir=$img_ps_dir} 758 {addJsDef img_prod_dir=$img_prod_dir} 759 {addJsDef id_product=$product->id|intval} 760 {addJsDef jqZoomEnabled=$jqZoomEnabled|boolval} 761 {addJsDef maxQuantityToAllowDisplayOfLastQuantityMessage=$last_qties|intval} 762 {addJsDef minimalQuantity=$product->minimal_quantity|intval} 763 {addJsDef noTaxForThisProduct=$no_tax|boolval} 764 {if isset($customer_group_without_tax)} 765 {addJsDef customerGroupWithoutTax=$customer_group_without_tax|boolval} 766 {else} 767 {addJsDef customerGroupWithoutTax=false} 768 {/if} 769 {if isset($group_reduction)} 770 {addJsDef groupReduction=$group_reduction|floatval} 771 {else} 772 {addJsDef groupReduction=false} 773 {/if} 774 {addJsDef oosHookJsCodeFunctions=Array()} 775 {addJsDef productHasAttributes=isset($groups)|boolval} 776 {addJsDef productPriceTaxExcluded=($product->getPriceWithoutReduct(true)|default:'null' - $product->ecotax)|floatval} 777 {addJsDef productPriceTaxIncluded=($product->getPriceWithoutReduct(false)|default:'null' - $product->ecotax * (1 + $ecotaxTax_rate / 100))|floatval} 778 {addJsDef productBasePriceTaxExcluded=($product->getPrice(false, null, $smarty.const._TB_PRICE_DATABASE_PRECISION_, null, false, false) - $product->ecotax)|floatval} 779 {addJsDef productBasePriceTaxExcl=($product->getPrice(false, null, $smarty.const._TB_PRICE_DATABASE_PRECISION_, null, false, false)|floatval)} 780 {addJsDef productBasePriceTaxIncl=($product->getPrice(true, null, $smarty.const._TB_PRICE_DATABASE_PRECISION_, null, false, false)|floatval)} 781 {addJsDef productReference=$product->reference|escape:'html':'UTF-8'} 782 {addJsDef productAvailableForOrder=$product->available_for_order|boolval} 783 {addJsDef productPriceWithoutReduction=$productPriceWithoutReduction|floatval} 784 {addJsDef productPrice=$productPrice|floatval} 785 {addJsDef productUnitPriceRatio=$product->unit_price_ratio|floatval} 786 {addJsDef productShowPrice=(!$PS_CATALOG_MODE && $product->show_price)|boolval} 787 {addJsDef PS_CATALOG_MODE=$PS_CATALOG_MODE} 788 {if $product->specificPrice && $product->specificPrice|@count} 789 {addJsDef product_specific_price=$product->specificPrice} 790 {else} 791 {addJsDef product_specific_price=array()} 792 {/if} 793 {if $display_qties == 1 && $product->quantity} 794 {addJsDef quantityAvailable=$product->quantity} 795 {else} 796 {addJsDef quantityAvailable=0} 797 {/if} 798 {addJsDef quantitiesDisplayAllowed=$display_qties|boolval} 799 {if $product->specificPrice && $product->specificPrice.reduction && $product->specificPrice.reduction_type == 'percentage'} 800 {addJsDef reduction_percent=$product->specificPrice.reduction*100|floatval} 801 {else} 802 {addJsDef reduction_percent=0} 803 {/if} 804 {if $product->specificPrice && $product->specificPrice.reduction && $product->specificPrice.reduction_type == 'amount'} 805 {addJsDef reduction_price=$product->specificPrice.reduction|floatval} 806 {else} 807 {addJsDef reduction_price=0} 808 {/if} 809 {if $product->specificPrice && $product->specificPrice.price} 810 {addJsDef specific_price=$product->specificPrice.price|floatval} 811 {else} 812 {addJsDef specific_price=0} 813 {/if} 814 {addJsDef specific_currency=($product->specificPrice && $product->specificPrice.id_currency)|boolval} {* TODO: remove if always false *} 815 {addJsDef stock_management=$PS_STOCK_MANAGEMENT|intval} 816 {addJsDef taxRate=$tax_rate|floatval} 817 {addJsDefL name=doesntExist}{l s='This combination does not exist for this product. Please select another combination.' js=1}{/addJsDefL} 818 {addJsDefL name=doesntExistNoMore}{l s='This product is no longer in stock' js=1}{/addJsDefL} 819 {addJsDefL name=doesntExistNoMoreBut}{l s='with those attributes but is available with others.' js=1}{/addJsDefL} 820 {addJsDefL name=fieldRequired}{l s='Please fill in all the required fields before saving your customization.' js=1}{/addJsDefL} 821 {addJsDefL name=uploading_in_progress}{l s='Uploading in progress, please be patient.' js=1}{/addJsDefL} 822 {addJsDefL name='product_fileDefaultHtml'}{l s='No file selected' js=1}{/addJsDefL} 823 {addJsDefL name='product_fileButtonHtml'}{l s='Choose File' js=1}{/addJsDefL} 824 {/strip} 825{/if} 826