639 lines
26 KiB
Smarty
639 lines
26 KiB
Smarty
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<title></title>
|
|
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
|
|
<meta name="robots" content="noindex,nofollow" />
|
|
<script type="text/javascript">
|
|
var baseDir = "{$base_dir_ssl}";
|
|
var static_token = "{$static_token}";
|
|
var token = '{$token}';
|
|
var priceDisplayPrecision = {$priceDisplayPrecision};
|
|
var priceDisplayMethod = {$priceDisplay};
|
|
var roundMode = {$roundMode};
|
|
var isoLang = "{$lang_iso}";
|
|
var product_frame = true;
|
|
|
|
</script>
|
|
<script type="text/javascript" src="{$base_dir_ssl}js/scripts.js"></script>
|
|
<script type="text/javascript" src="{$js_dir}tools.js"></script>
|
|
<script type="text/javascript" src="{$js_dir}product.js?v=2"></script>
|
|
{if $cartex}
|
|
<script type="text/javascript" src="{$base_dir_ssl}modules/blockcartex/ajax-cart.js?v=4"></script>
|
|
{else}
|
|
<script type="text/javascript" src="{$base_dir_ssl}modules/blockcartex/ajax-cart.js?v=4"></script>
|
|
{/if}
|
|
<style type="text/css">{literal}
|
|
html {
|
|
margin: 0px;
|
|
padding: 0px;
|
|
height: 100%;
|
|
width: 100%;
|
|
}
|
|
body {
|
|
background: rgb(238,238,238); /* Old browsers */
|
|
background: -moz-linear-gradient(left, rgba(238,238,238,1) 0%, rgba(238,238,238,1) 100%); /* FF3.6+ */
|
|
background: -webkit-gradient(linear, left top, right top, color-stop(0%,rgba(238,238,238,1)), color-stop(100%,rgba(238,238,238,1))); /* Chrome,Safari4+ */
|
|
background: -webkit-linear-gradient(left, rgba(238,238,238,1) 0%,rgba(238,238,238,1) 100%); /* Chrome10+,Safari5.1+ */
|
|
background: -o-linear-gradient(left, rgba(238,238,238,1) 0%,rgba(238,238,238,1) 100%); /* Opera 11.10+ */
|
|
background: -ms-linear-gradient(left, rgba(238,238,238,1) 0%,rgba(238,238,238,1) 100%); /* IE10+ */
|
|
background: linear-gradient(to right, rgba(238,238,238,1) 0%,rgba(238,238,238,1) 100%); /* W3C */
|
|
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#eeeeee',GradientType=1 ); /* IE6-9 */
|
|
margin: 0px;
|
|
padding: 0px;
|
|
color: #666666;
|
|
font-size: 12px;
|
|
font-family: tahoma,arial,sans-serif;
|
|
height: 100%;
|
|
width: 100%;
|
|
overflow: hidden;
|
|
position: absolute;
|
|
top: 0px;
|
|
left: 0px;
|
|
}
|
|
h1 {
|
|
text-align: center;
|
|
line-height: 1em;
|
|
width: 500px;
|
|
color: #1E1633;
|
|
font-style: italic;
|
|
font-family: Georgia, Times, "Times New Roman", serif;
|
|
font-weight: normal;
|
|
/* min-height: 2em; */
|
|
font-size: 16px;
|
|
margin: 5px 0px;
|
|
}
|
|
p {
|
|
margin: 0px;
|
|
padding: 0 15px 10px;
|
|
}
|
|
.center_element {
|
|
margin : 10px 0;
|
|
padding : 10px ;
|
|
width : 320px;
|
|
background : #DEA4BE;
|
|
/* background : #fb66a9; */
|
|
float : left;
|
|
box-sizing: border-box;
|
|
height: 133px;
|
|
}
|
|
.center_element img {
|
|
border : 5px solid #FFFFFF;
|
|
float : left;
|
|
}
|
|
.right_element {
|
|
float : left;
|
|
width: 220px;
|
|
}
|
|
#attributes{
|
|
width: 150px;
|
|
float: left;
|
|
}
|
|
#quantity_wanted_p {
|
|
padding:0;
|
|
}
|
|
#quantity_wanted {
|
|
text-align: right;
|
|
}
|
|
.quantity_wanted{
|
|
float: right;
|
|
width: 65px;
|
|
}
|
|
#availability_value{
|
|
font-size: 10px;
|
|
font-weight: 700;
|
|
width: 100%;
|
|
}
|
|
input[type="text"] {
|
|
font-size: 12px;
|
|
color: #8B8B8B;
|
|
padding: 4px;
|
|
border : none;
|
|
border-radius : 2px;
|
|
-webkit-border-radius : 2px;
|
|
-moz-border-radius : 2px;
|
|
-o-border-radius : 2px;
|
|
-ms-border-radius : 2px;
|
|
}
|
|
select {
|
|
font-size: 12px;
|
|
color: #8B8B8B;
|
|
padding: 4px;
|
|
background : #FFFFFF;
|
|
width : 100%;
|
|
border : none;
|
|
border-radius : 2px;
|
|
-webkit-border-radius : 2px;
|
|
-moz-border-radius : 2px;
|
|
-o-border-radius : 2px;
|
|
-ms-border-radius : 2px;
|
|
}
|
|
select option {
|
|
font-size: 12px;
|
|
color: #666666;
|
|
border: 0px;
|
|
}
|
|
label {
|
|
font-size : 14px;
|
|
color : #FFFFFF;
|
|
display: block;
|
|
margin-bottom: 8px;
|
|
}
|
|
form {
|
|
height: 200px;
|
|
width: 500px;
|
|
margin: 0px;
|
|
}
|
|
.border-separator {
|
|
border-top : 1px solid #FFFFFF;
|
|
height : 0px;
|
|
margin : 1px 0;
|
|
}
|
|
.hidden {
|
|
display: none;
|
|
}
|
|
#buy_block_footer {
|
|
margin : 10px auto 0;
|
|
}
|
|
#prices_display {
|
|
padding-top: 10px;
|
|
float: right;
|
|
width: 150px;
|
|
height: 145px;
|
|
position: relative;
|
|
}
|
|
#reduction {
|
|
font-weight: bold;
|
|
}
|
|
div.price, p#old_price {
|
|
font-size: 13px;
|
|
padding: 0;
|
|
color: #333;
|
|
clear: both;
|
|
margin-bottom: 5px;
|
|
}
|
|
div.price span, p#old_price span {
|
|
font-style: italic;
|
|
font-family: Georgia, Times, "Times New Roman", serif;
|
|
}
|
|
p#old_price span {
|
|
margin-right:5px;
|
|
}
|
|
p#old_price span.bold {
|
|
color: #514C8C;
|
|
}
|
|
p#old_price span.reduction{
|
|
color: #4F4E9A;
|
|
}
|
|
p#old_price span#old_price_display {
|
|
text-decoration: line-through;
|
|
}
|
|
div.price p{
|
|
width: 100%;
|
|
text-align: center;
|
|
padding: 0;
|
|
}
|
|
div.price p.our_price_display span {
|
|
font-weight: bold;
|
|
font-style: italic;
|
|
color: #FB69AA;
|
|
font-size: 16px;
|
|
}
|
|
p.price-ecotax{
|
|
text-align: center;
|
|
font-size: 9px;
|
|
}
|
|
#availability_statut {
|
|
text-align: center;
|
|
margin: 0px;
|
|
padding: 0px;
|
|
}
|
|
#add_to_cart_product_footer input {
|
|
background : url('arrow.png') no-repeat right 9px #514C8C;
|
|
height: 30px;
|
|
font-family: Georgia, Times, "Times New Roman", serif;
|
|
font-size: 13px;
|
|
font-style: italic;
|
|
color: #ffffff;
|
|
margin: 20px 0 0;
|
|
padding: 7px 30px 6px 20px;
|
|
-moz-border-radius: 20px;
|
|
-webkit-border-radius: 20px;
|
|
border-radius: 20px;
|
|
text-decoration: none;
|
|
border : none;
|
|
cursor : pointer;
|
|
display: inline-block;
|
|
}
|
|
#add_to_cart_product_footer {
|
|
cursor: pointer;
|
|
padding: 0;
|
|
text-align: center;
|
|
position: absolute;
|
|
bottom: 12px;
|
|
left: 0;
|
|
right: 0;
|
|
}
|
|
|
|
.product_added_to_cart {
|
|
display: none;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background-color: rgba(0,0,0,0.7);
|
|
box-sizing: border-box;
|
|
text-align: center;
|
|
position: absolute;
|
|
z-index: 999;
|
|
padding: 85px 20px;
|
|
}
|
|
.product_added_to_cart p{
|
|
color: #fff;
|
|
font-family: "georgia";
|
|
font-style: italic;
|
|
font-weight: bold;
|
|
font-size: 18px;
|
|
}
|
|
#jqibox {
|
|
background-image : -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgb(204, 204, 204)), to(rgb(255, 255, 255)));
|
|
background-image : -moz-linear-gradient(34% 100% 90deg,#FFFFFF, #CCCCCC);
|
|
background-image : linear-gradient(34% 100% 90deg,#FFFFFF, #CCCCCC);
|
|
width : 100%;
|
|
height : 100%;
|
|
padding: 0px;
|
|
margin: 0px;
|
|
left: 0px;
|
|
top: 0px;
|
|
}
|
|
#jqibox #jqi {
|
|
margin-left : -124px !important;
|
|
width: 250px !important;
|
|
height: 430px !important;
|
|
}
|
|
.jqiclose {
|
|
display: none;
|
|
}
|
|
.jqimessage {
|
|
width : 100%;
|
|
text-align: center;
|
|
line-height: 1.4em;
|
|
position : relative;
|
|
}
|
|
.jqimessage div {
|
|
border : 1px solid #FFFFFF;
|
|
border-color : #FFFFFF transparent;
|
|
padding : 20px 0;
|
|
}
|
|
.jqimessage div:before {
|
|
height : 1px;
|
|
width : 100%;
|
|
border-top : 1px solid #FFFFFF;
|
|
content : "";
|
|
position : absolute;
|
|
top : 50px;
|
|
padding : 0;
|
|
margin : 0;
|
|
left : 0;
|
|
}
|
|
.jqimessage div:after {
|
|
height : 1px;
|
|
width : 100%;
|
|
border-top : 1px solid #FFFFFF;
|
|
content : "";
|
|
position : absolute;
|
|
bottom : -3px;
|
|
padding : 0;
|
|
margin : 0;
|
|
left : 0;
|
|
}
|
|
.jqimessage p {
|
|
background : #DEA3BD;
|
|
font-size : 18px;
|
|
padding : 40px 20px;
|
|
width : 210px;
|
|
color : #FFFFFF;
|
|
line-height: 1.4em;
|
|
}
|
|
.jqimessage h1 {
|
|
margin-top: 21px;
|
|
}
|
|
.jqibuttons {
|
|
text-align: center;
|
|
}
|
|
|
|
.jqibuttons button {
|
|
background : #514C8C;
|
|
height: 30px;
|
|
font-family: Georgia, Times, "Times New Roman", serif;
|
|
font-size: 13px;
|
|
font-style: italic;
|
|
color: #ffffff;
|
|
margin: 0;
|
|
display : block;
|
|
padding: 7px 20px 6px 20px;
|
|
-moz-border-radius: 20px;
|
|
-webkit-border-radius: 20px;
|
|
border-radius: 20px;
|
|
text-decoration: none;
|
|
border : none;
|
|
margin : 30px auto 0;
|
|
cursor : pointer;
|
|
float : right;
|
|
}
|
|
.jqibuttons button.jqidefaultbutton {
|
|
background : #E26EA2;
|
|
height: 30px;
|
|
font-family: Georgia, Times, "Times New Roman", serif;
|
|
font-size: 13px;
|
|
font-style: italic;
|
|
color: #ffffff;
|
|
margin: 0;
|
|
display : block;
|
|
padding: 7px 20px 6px 20px;
|
|
-moz-border-radius: 20px;
|
|
-webkit-border-radius: 20px;
|
|
border-radius: 20px;
|
|
text-decoration: none;
|
|
border : none;
|
|
margin : 30px auto 0;
|
|
cursor : pointer;
|
|
float : left;
|
|
}
|
|
{/literal}</style>
|
|
</head>
|
|
<body id="product" class="singleCol">
|
|
<script type="text/javascript">
|
|
// <![CDATA[
|
|
|
|
// PrestaShop internal settings
|
|
var currencySign = '{$currencySign|html_entity_decode:2:"UTF-8"}';
|
|
var currencyRate = '{$currencyRate|floatval}';
|
|
var currencyFormat = '{$currencyFormat|intval}';
|
|
var currencyBlank = '{$currencyBlank|intval}';
|
|
var taxRate = {$tax_rate|floatval};
|
|
|
|
//JS Hook
|
|
var oosHookJsCodeFunctions = new Array();
|
|
|
|
// Parameters
|
|
var id_product = '{$product->id|intval}';
|
|
var productHasAttributes = {if isset($groups)}true{else}false{/if};
|
|
var quantitiesDisplayAllowed = {if $display_qties == 1}true{else}false{/if};
|
|
var quantityAvailable = {if $display_qties == 1 && $product->quantity}{$product->quantity}{else}0{/if};
|
|
var allowBuyWhenOutOfStock = {if $allow_oosp == 1}true{else}false{/if};
|
|
var availableNowValue = '{$product->available_now|escape:'quotes':'UTF-8'}';
|
|
var availableLaterValue = '{$product->available_later|escape:'quotes':'UTF-8'}';
|
|
var productPriceTaxExcluded = {$product->getPriceWithoutReduct(true)|default:'null'} - {$product->ecotax};
|
|
var reduction_percent = {if $product->specificPrice AND $product->specificPrice.reduction AND $product->specificPrice.reduction_type == 'percentage'}{$product->specificPrice.reduction*100}{else}0{/if};
|
|
var reduction_price = {if $product->specificPrice AND $product->specificPrice.reduction AND $product->specificPrice.reduction_type == 'amount'}{$product->specificPrice.reduction}{else}0{/if};
|
|
var specific_price = {if $product->specificPrice AND $product->specificPrice.price}{$product->specificPrice.price}{else}0{/if};
|
|
var specific_currency = {if $product->specificPrice AND $product->specificPrice.id_currency}true{else}false{/if};
|
|
var group_reduction = '{$group_reduction}';
|
|
var default_eco_tax = {$product->ecotax};
|
|
var ecotaxTax_rate = {$ecotaxTax_rate};
|
|
var currentDate = '{$smarty.now|date_format:'%Y-%m-%d %H:%M:%S'}';
|
|
var maxQuantityToAllowDisplayOfLastQuantityMessage = {$last_qties};
|
|
var noTaxForThisProduct = {if $no_tax == 1}true{else}false{/if};
|
|
var displayPrice = {$priceDisplay};
|
|
var productReference = '{$product->reference|escape:'htmlall':'UTF-8'}';
|
|
var productAvailableForOrder = {if (isset($restricted_country_mode) AND $restricted_country_mode) OR $PS_CATALOG_MODE}'0'{else}'{$product->available_for_order}'{/if};
|
|
var productShowPrice = '{if !$PS_CATALOG_MODE}{$product->show_price}{else}0{/if}';
|
|
var productUnitPriceRatio = '{$product->unit_price_ratio}';
|
|
var idDefaultImage = {if isset($cover.id_image_only)}{$cover.id_image_only}{else}0{/if};
|
|
|
|
// Customizable field
|
|
var img_ps_dir = '{$img_ps_dir}';
|
|
var customizationFields = new Array();
|
|
{assign var='imgIndex' value=0}
|
|
{assign var='textFieldIndex' value=0}
|
|
{foreach from=$customizationFields item='field' name='customizationFields'}
|
|
{assign var="key" value="pictures_`$product->id`_`$field.id_customization_field`"}
|
|
customizationFields[{$smarty.foreach.customizationFields.index|intval}] = new Array();
|
|
customizationFields[{$smarty.foreach.customizationFields.index|intval}][0] = '{if $field.type|intval == 0}img{$imgIndex++}{else}textField{$textFieldIndex++}{/if}';
|
|
customizationFields[{$smarty.foreach.customizationFields.index|intval}][1] = {if $field.type|intval == 0 && isset($pictures.$key) && $pictures.$key}2{else}{$field.required|intval}{/if};
|
|
{/foreach}
|
|
|
|
// Images
|
|
var img_prod_dir = '{$img_prod_dir}';
|
|
var combinationImages = new Array();
|
|
|
|
{if isset($combinationImages)}
|
|
{foreach from=$combinationImages item='combination' key='combinationId' name='f_combinationImages'}
|
|
combinationImages[{$combinationId}] = new Array();
|
|
{foreach from=$combination item='image' name='f_combinationImage'}
|
|
combinationImages[{$combinationId}][{$smarty.foreach.f_combinationImage.index}] = {$image.id_image|intval};
|
|
{/foreach}
|
|
{/foreach}
|
|
{/if}
|
|
|
|
combinationImages[0] = new Array();
|
|
{if isset($images)}
|
|
{foreach from=$images item='image' name='f_defaultImages'}
|
|
combinationImages[0][{$smarty.foreach.f_defaultImages.index}] = {$image.id_image};
|
|
{/foreach}
|
|
{/if}
|
|
|
|
// Translations
|
|
var doesntExist = '{l s='The product does not exist in this model. Please choose another.' mod='expresscart' js=1}';
|
|
var doesntExistNoMore = '{l s='This product is no longer in stock' mod='expresscart' js=1}';
|
|
var doesntExistNoMoreBut = '{l s='with those attributes but is available with others' mod='expresscart' js=1}';
|
|
var uploading_in_progress = '{l s='Uploading in progress, please wait...' mod='expresscart' js=1}';
|
|
var fieldRequired = '{l s='Please fill in all required fields, then save the customization.' mod='expresscart' js=1}';
|
|
|
|
{if isset($groups)}
|
|
// Combinations
|
|
{foreach from=$combinations key=idCombination item=combination}
|
|
addCombination({$idCombination|intval}, new Array({$combination.list}), {$combination.quantity}, {$combination.price}, {$combination.ecotax}, {$combination.id_image}, '{$combination.reference|addslashes}', {$combination.unit_impact}, {$combination.minimal_quantity});
|
|
{/foreach}
|
|
// Colors
|
|
{if $colors|@count > 0}
|
|
{if $product->id_color_default}var id_color_default = {$product->id_color_default|intval};{/if}
|
|
{/if}
|
|
{/if}
|
|
|
|
{literal}
|
|
$(".jqidefaultbutton").click(function(){
|
|
alert("ok");
|
|
});
|
|
{/literal}
|
|
|
|
//]]>
|
|
</script>
|
|
|
|
{if isset($colors) && $colors}
|
|
<!-- colors -->
|
|
<div id="color_picker">
|
|
<p>{l s='Pick a color:' mod='expresscart' js=1}</p>
|
|
<div class="clear"></div>
|
|
<ul id="color_to_pick_list">
|
|
{foreach from=$colors key='id_attribute' item='color'}
|
|
<li><a id="color_{$id_attribute|intval}" class="color_pick" style="background: {$color.value};" onclick="updateColorSelect({$id_attribute|intval});$('#wrapResetImages').show('slow');" title="{$color.name}">{if file_exists($col_img_dir|cat:$id_attribute|cat:'.jpg')}<img src="{$img_col_dir}{$id_attribute}.jpg" alt="{$color.name}" width="20" height="20" />{/if}</a></li>
|
|
{/foreach}
|
|
</ul>
|
|
<div class="clear"></div>
|
|
</div>
|
|
{/if}
|
|
|
|
{if ($product->show_price AND !isset($restricted_country_mode)) OR isset($groups) OR $product->reference OR (isset($HOOK_PRODUCT_ACTIONS) && $HOOK_PRODUCT_ACTIONS)}
|
|
<!-- add to cart form-->
|
|
<form id="buy_block_footer" {if $PS_CATALOG_MODE AND !isset($groups) AND $product->quantity > 0}class="hidden"{/if} action="{$link->getPageLink('cart.php')}" method="post">
|
|
|
|
<!-- hidden datas -->
|
|
<p class="hidden">
|
|
<input type="hidden" name="token" value="{$static_token}" />
|
|
<input type="hidden" name="id_product" value="{$product->id|intval}" id="product_page_product_id" />
|
|
<input type="hidden" name="add" value="1" />
|
|
<input type="hidden" name="id_product_attribute" id="idCombination" value="" />
|
|
</p>
|
|
<h1>{$product->name}</h1>
|
|
<div class="border-separator"></div>
|
|
<div class="border-separator"></div>
|
|
<div class="center_element">
|
|
{assign var=id_image value=Product::getCover($product->id)}
|
|
<img src="{$link->getImageLink($product->link_rewrite, $product->id|cat:'-'|cat:$id_image.id_image, 'small')}" alt="{$product->name|escape:'htmlall':'UTF-8'}" />
|
|
<div class="right_element">
|
|
{if isset($groups)}
|
|
<!-- attributes -->
|
|
<div id="attributes">
|
|
{foreach from=$groups key=id_attribute_group item=group}
|
|
{if $group.attributes|@count}
|
|
<p>
|
|
<label for="group_{$id_attribute_group|intval}">{$group.name|escape:'htmlall':'UTF-8'} :</label>
|
|
{assign var="groupName" value="group_$id_attribute_group"}
|
|
<select name="{$groupName}" id="group_{$id_attribute_group|intval}" onchange="javascript:findCombination();{if $colors|@count > 0}$('#wrapResetImages').show('slow');{/if};">
|
|
{foreach from=$group.attributes key=id_attribute item=group_attribute}
|
|
<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:'htmlall':'UTF-8'}">{$group_attribute|escape:'htmlall':'UTF-8'}</option>
|
|
{/foreach}
|
|
</select>
|
|
</p>
|
|
{/if}
|
|
{/foreach}
|
|
</div>
|
|
{/if}
|
|
|
|
<div class="quantity_wanted">
|
|
<!-- quantity wanted -->
|
|
<p id="quantity_wanted_p"{if (!$allow_oosp && $product->quantity <= 0) OR $virtual OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display: none;"{/if}>
|
|
<label>{l s='Quantity :' mod='expresscart'}</label>
|
|
<input type="text" 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}" size="2" maxlength="3" {if $product->minimal_quantity > 1}onkeyup="checkMinimalQuantity({$product->minimal_quantity});"{/if} />
|
|
</p>
|
|
|
|
<!-- minimal quantity wanted -->
|
|
<p id="minimal_quantity_wanted_p"{if $product->minimal_quantity <= 1 OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display: none;"{/if}>{l s='You must add ' mod='expresscart'} <b id="minimal_quantity_label">{$product->minimal_quantity}</b> {l s=' as a minimum quantity to buy this product.' mod='expresscart'}</p>
|
|
{if $product->minimal_quantity > 1}
|
|
<script type="text/javascript">
|
|
checkMinimalQuantity();
|
|
</script>
|
|
{/if}
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<div id="prices_display">
|
|
<!-- prices -->
|
|
{if $product->show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE}
|
|
{if !$priceDisplay || $priceDisplay == 2}
|
|
{assign var='productPrice' value=$product->getPrice(true, $smarty.const.NULL, 2)}
|
|
{assign var='productPriceWithoutRedution' value=$product->getPriceWithoutReduct(false, $smarty.const.NULL)}
|
|
{elseif $priceDisplay == 1}
|
|
{assign var='productPrice' value=$product->getPrice(false, $smarty.const.NULL, 2)}
|
|
{assign var='productPriceWithoutRedution' value=$product->getPriceWithoutReduct(true, $smarty.const.NULL)}
|
|
{/if}
|
|
<div class="price">
|
|
{if $priceDisplay >= 0 && $priceDisplay <= 2}
|
|
<p class="our_price_display">
|
|
<span class="bold" id="our_price_display">{convertPrice price=$productPrice}</span>
|
|
</p>
|
|
{/if}
|
|
{if $product->specificPrice AND $product->specificPrice.reduction}
|
|
<p id="old_price">
|
|
<span class="bold">
|
|
{if $priceDisplay >= 0 && $priceDisplay <= 2}
|
|
{if $productPriceWithoutRedution > $productPrice}
|
|
<span id="old_price_display">{convertPrice price=$productPriceWithoutRedution}</span>
|
|
{if isset($product->specificPrice.reduction) && $product->specificPrice.reduction>0}
|
|
{assign var='reduction' value=$product->specificPrice.reduction*100}
|
|
<span id="reduction">{l s='(-'}{$reduction|ceil} {l s='%)'}</span>
|
|
{/if}
|
|
{/if}
|
|
{/if}
|
|
</span>
|
|
</p>
|
|
{/if}
|
|
{if $priceDisplay == 2}
|
|
<p id="pretaxe_price"><span id="pretaxe_price_display">{convertPrice price=$product->getPrice(false, $smarty.const.NULL, 2)}</span> {l s='tax excl.' mod='expresscart'}</p>
|
|
{/if}
|
|
</div>
|
|
{if $product->ecotax != 0}
|
|
<p class="price-ecotax">{l s='include' mod='expresscart'} <span id="ecotax_price_display">{if $priceDisplay == 2}{$ecotax_tax_exc|convertAndFormatPrice}{else}{$ecotax_tax_inc|convertAndFormatPrice}{/if}</span> {l s='for green tax' mod='expresscart'}
|
|
{if $product->specificPrice AND $product->specificPrice.reduction}
|
|
<br />{l s='(not impacted by the discount)' mod='expresscart'}
|
|
{/if}
|
|
</p>
|
|
{/if}
|
|
{if !empty($product->unity) && $product->unit_price_ratio > 0.000000}
|
|
{math equation="pprice / punit_price" pprice=$productPrice punit_price=$product->unit_price_ratio assign=unit_price}
|
|
<p class="unit-price"><span id="unit_price_display">{convertPrice price=$unit_price}</span> {l s='per' mod='expresscart'} {$product->unity|escape:'htmlall':'UTF-8'}</p>
|
|
{/if}
|
|
{/if}
|
|
|
|
<p id="add_to_cart_product_footer" class="button"><input type="submit" name="Submit" value="{l s='Add to cart' mod='expresscart'}" class="exclusive" /></p>
|
|
</div>
|
|
<div style="clear: both;"></div>
|
|
<p id="availability_statut"{if ($product->quantity <= 0 && !$product->available_later && $allow_oosp) OR ($product->quantity > 0 && !$product->available_now) OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display: none;"{/if}>
|
|
<span id="availability_value"{if $product->quantity <= 0} class="warning_inline"{/if}>
|
|
{if $product->quantity <= 0}{if $allow_oosp}{$product->available_later}{else}{l s='This product is no longer in stock' mod='expresscart'}{/if}{else}{$product->available_now}{/if}
|
|
</span>
|
|
</p>
|
|
<div class="border-separator"></div>
|
|
<div class="border-separator"></div>
|
|
</form>
|
|
{/if}
|
|
<div class="product_added_to_cart">
|
|
<p>{l s='Product added to your cart' mod='expresscart'}</p>
|
|
</div>
|
|
</body>
|
|
|
|
<script type="text/javascript">
|
|
{literal}
|
|
$( document ).ready(function() {
|
|
$('#add_to_cart_product_footer').click(function(){
|
|
$(this).hide();
|
|
var idProduct = $('#buy_block_footer input[name="id_product"]').val();
|
|
var idCombination = $('#buy_block_footer input[name="id_product_attribute"]').val();
|
|
var quantity = $('#buy_block_footer #quantity_wanted').val();
|
|
if ($(this).attr('disabled') != 'disabled' && $('#buy_block_footer #quantity_wanted:visible').length > 0){
|
|
$.ajax({
|
|
type: 'POST',
|
|
url: baseDir + 'cart.php',
|
|
async: true,
|
|
cache: false,
|
|
dataType : "json",
|
|
data: 'add=1&ajax=true&qty=' + quantity +'&id_product=' + idProduct + '&idCombination=' + idCombination + '&token=' + static_token,
|
|
success: function(jsonData,textStatus,jqXHR)
|
|
{
|
|
window.parent.ajaxCart.updateCartInformation(jsonData, false);
|
|
if (jsonData.hasError !== true) {
|
|
window.parent.$('.ajax_add_to_cart_product_footer_button').removeClass('active');
|
|
window.parent.$('a.close_popup_footer').remove();
|
|
$('.product_added_to_cart').show();
|
|
setTimeout(function() {
|
|
$('.product_added_to_cart').hide();
|
|
window.parent.hideFooterExpressCart();
|
|
}, 2000);
|
|
}
|
|
},
|
|
error: function(XMLHttpRequest, textStatus, errorThrown)
|
|
{
|
|
alert("TECHNICAL ERROR: unable to add the product.\n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus);
|
|
}
|
|
});
|
|
}
|
|
return false;
|
|
});
|
|
});
|
|
{/literal}
|
|
</script>
|
|
</html>
|