108 lines
4.0 KiB
Smarty
108 lines
4.0 KiB
Smarty
<div class="pack_bottom">
|
|
<p class="col-md-offset-2 title">
|
|
{l s='La séléction de produit pour vous aider' mod='cms_pack'}
|
|
</p>
|
|
{if $pack.remise && $reductionAvailable}
|
|
<p class="desc">
|
|
<span class="remise">
|
|
{l s='Vous économisez'} <span>{$pack.remise_percent} %</span> {l s='sur cette sélection'}
|
|
</span>
|
|
{l s='+ de produit = + de réductions' mod='cms_pack'}
|
|
</p>
|
|
{/if}
|
|
|
|
<div class="products">
|
|
<div class="inner">
|
|
{foreach from=$pack.products item=product}
|
|
{assign var='id_image' value=Product::getCover($product->id)}
|
|
<div class="product_inner">
|
|
<div class="row {if $product->quantity == 0}not_available{/if}">
|
|
<div class="col-lg-8 col-md-10 col-lg-offset-2 col-md-offset-1">
|
|
<div class="row">
|
|
<div class="col-md-1 col-sm-1 col-xs-2 pr0">
|
|
<input {if $product->quantity == 0}disabled{/if} type="checkbox" name="{$product->id}" class="checkbox_add_bottom custom-input">
|
|
</div>
|
|
<div class="col-md-6 col-sm-6 col-xs-6">
|
|
<img class="img-responsive img" src="{$link->getImageLink($product->link_rewrite, $id_image.id_image, 'cart_default')|escape:'html':'UTF-8'}" alt="{$product->name|escape:'html':'UTF-8'}" title="{$product->name|escape:'html':'UTF-8'}" itemprop="image" />
|
|
<p class="name">{$product->name}</p>
|
|
</div>
|
|
<div class="col-md-2 col-sm-3 col-xs-4">
|
|
{if $product->quantity == 0}
|
|
<p class="not_available">{l s='Hors stock'} <br /> {$product->available_later}</p>
|
|
{else}
|
|
<div class="quantity quantity_box">
|
|
<span class="change_quantity" data-action="down">-</span>
|
|
<input type="text" value="1" size="3" data-product-id="{$product->id}" data-product-price="{displayPrice price=$product->price}" data-product-price-nf="{$product->price}" data-product-name="{$product->name}" data-product-img="{$link->getImageLink($product->link_rewrite, $id_image.id_image, 'cart_default')|escape:'html':'UTF-8'}" name="quantity_{$product->id}" name="quantity_{$product->id}" class="product_add_{$product->id} quantity_bottom">
|
|
<span class="change_quantity" data-action="up">+</span>
|
|
</div>
|
|
{/if}
|
|
</div>
|
|
<div class="col-md-3 col-sm-2 col-xs-4">
|
|
<div class="price">
|
|
<span>{displayPrice price=$product->price}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{/foreach}
|
|
</div>
|
|
<div class="total">
|
|
<div class="row">
|
|
<div class="col-md-8 col-sm-offset-2">
|
|
<div class="price_info">
|
|
{l s='Sous total'} <span class="price">{displayPrice price=$pack.price_total}</span>
|
|
</div>
|
|
<div class="add_to_cart">
|
|
<button class="btn add_to_cart_pack" id="add_pack_bottom"><i class="icon icon-shopping-cart"></i> <span>{l s='J\'achete' mod='cms_pack'}</span></button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="reassurance">
|
|
<div class="reinsurance">
|
|
<div class="row">
|
|
<div class="col-sm-4">
|
|
<div class="border bloc">
|
|
<span class="icon-logistics3"></span>{l s='Livraison express' mod='cms_pack'}
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-4 bloc">
|
|
<div class="border">
|
|
<span class="icon-coins30"></span>{l s='Satisfait ou remboursé' mod='cms_pack'}
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-4 bloc">
|
|
<div class="border">
|
|
<span class="icon-lock39"></span>{l s='Paiement sécurisé' mod='cms_pack'}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
$(document).ready(function() {
|
|
$('.change_quantity').on('click', function(e){
|
|
var action = $(this).data('action');
|
|
var input = $(this).parent().children('input');
|
|
var actual = parseInt($(input).val());
|
|
|
|
if(action == 'up') {
|
|
var new_value = actual + parseInt(1);
|
|
} else if(action == 'down') {
|
|
if(actual == 0) {
|
|
var new_value = actual;
|
|
} else {
|
|
var new_value = actual - parseInt(1);
|
|
}
|
|
}
|
|
$(input).val(new_value);
|
|
updateInfo(".checkbox_add_bottom", ".pack_bottom");
|
|
});
|
|
});
|
|
</script>
|