recette
This commit is contained in:
parent
ea9694d6d5
commit
3aa467db18
@ -2,7 +2,7 @@
|
||||
|
||||
<div class="row">
|
||||
{foreach from=$categories item=category name=category_index}
|
||||
<div class="col-md-3 col-sm-4 col-xs-6 category">
|
||||
<div class="col-md-3 col-sm-4 col-xs-6 col-xxs-12 category">
|
||||
<a href="{$link->getCategoryLink($category)}">
|
||||
<img src="/img/c/{$category->id}-0_thumb.jpg" alt="{$category->name}" class="img-responsive">
|
||||
</a>
|
||||
|
@ -6,6 +6,9 @@ include_once dirname(__FILE__).'/classes/CmsPack.php';
|
||||
|
||||
class Cms_Pack extends Module
|
||||
{
|
||||
public static $cache_reductionAvailable;
|
||||
public static $cache_pack;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->name = 'cms_pack';
|
||||
@ -48,10 +51,11 @@ class Cms_Pack extends Module
|
||||
|
||||
public function hookdisplayleftPostCms($params) {
|
||||
$pack = $this->loadPackForCMS($params['id_cmspost']);
|
||||
|
||||
|
||||
if($pack) {
|
||||
$this->smarty->assign(array(
|
||||
'pack' => $pack,
|
||||
'pack' => $pack,
|
||||
'reductionAvailable' => self::$cache_reductionAvailable,
|
||||
));
|
||||
return $this->display(__FILE__, 'pack_left.tpl');
|
||||
}
|
||||
@ -61,53 +65,74 @@ class Cms_Pack extends Module
|
||||
|
||||
if ($pack) {
|
||||
$this->smarty->assign(array(
|
||||
'pack' => $pack,
|
||||
'pack' => $pack,
|
||||
'reductionAvailable' => self::$cache_reductionAvailable,
|
||||
));
|
||||
return $this->display(__FILE__, 'pack_bottom.tpl');
|
||||
}
|
||||
}
|
||||
|
||||
public function loadPackForCMS($id_cmspost) {
|
||||
$id_pack = Db::getInstance()->getValue('
|
||||
SELECT `id_pack`
|
||||
FROM `'._DB_PREFIX_.'cmsps_posts_relation_pack`
|
||||
WHERE `id_post` = '.(int)$id_cmspost
|
||||
);
|
||||
$result = array();
|
||||
$id_lang = Context::getContext()->language->id;
|
||||
if ($id_pack) {
|
||||
$pack = new CmsPack((int) $id_pack);
|
||||
if (!Validate::isLoadedObject($pack)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$pack->loadProducts();
|
||||
public function loadPackForCMS($id_cmspost)
|
||||
{
|
||||
if(empty(self::$cache_pack))
|
||||
{
|
||||
$id_pack = Db::getInstance()->getValue('
|
||||
SELECT `id_pack`
|
||||
FROM `'._DB_PREFIX_.'cmsps_posts_relation_pack`
|
||||
WHERE `id_post` = '.(int)$id_cmspost
|
||||
);
|
||||
$result = array();
|
||||
$id_lang = Context::getContext()->language->id;
|
||||
if ($id_pack) {
|
||||
$pack = new CmsPack((int) $id_pack);
|
||||
if (!Validate::isLoadedObject($pack)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$collection_product = new Collection('Product', $id_lang);
|
||||
$collection_product->where('id_product', 'IN', $pack->products);
|
||||
$collection_product->where('active', '=', 1);
|
||||
$products = $collection_product->getResults();
|
||||
$pack->loadProducts();
|
||||
|
||||
$collection_product = new Collection('Product', $id_lang);
|
||||
$collection_product->where('id_product', 'IN', $pack->products);
|
||||
$collection_product->where('active', '=', 1);
|
||||
$products = $collection_product->getResults();
|
||||
|
||||
$products = array_map(function($product) {
|
||||
return $product->loadReductionInfo();
|
||||
}, $products);
|
||||
$result['products'] = $products;
|
||||
$products = array_map(function($product) {
|
||||
return $product->loadReductionInfo();
|
||||
}, $products);
|
||||
$result['products'] = $products;
|
||||
|
||||
$price = array_map(function($product) {
|
||||
return floatval($product->price);
|
||||
}, $result['products']);
|
||||
$result['price_total'] = array_sum($price);
|
||||
$price = array_map(function($product) {
|
||||
return floatval($product->price);
|
||||
}, $result['products']);
|
||||
$result['price_total'] = array_sum($price);
|
||||
|
||||
$result['pack'] = $pack->title;
|
||||
$result['pack'] = $pack->title;
|
||||
|
||||
if ($pack->id_cart_rule) {
|
||||
$result['remise'] = true;
|
||||
$result['remise_percent'] = $pack->getPercentageReduction();
|
||||
} else {
|
||||
$result['remise']= false;
|
||||
if ($pack->id_cart_rule) {
|
||||
$result['remise'] = true;
|
||||
$result['remise_percent'] = $pack->getPercentageReduction();
|
||||
} else {
|
||||
$result['remise']= false;
|
||||
}
|
||||
}
|
||||
|
||||
self::$cache_pack = $result;
|
||||
}
|
||||
|
||||
// On check si tous les produits sont en stock pour afficher ou non la réduction
|
||||
if(empty(self::$cache_reductionAvailable) && isset(self::$cache_pack['products']))
|
||||
{
|
||||
self::$cache_reductionAvailable = true;
|
||||
foreach(self::$cache_pack['products'] as $product)
|
||||
{
|
||||
if($product->quantity == 0)
|
||||
{
|
||||
self::$cache_reductionAvailable = false;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
return self::$cache_pack;
|
||||
}
|
||||
}
|
||||
|
@ -144,7 +144,8 @@ class AdminCmsPackController extends ModuleAdminController
|
||||
$cartRule->partial_use = 1;
|
||||
$cartRule->priority = 1;
|
||||
$cartRule->highlight = 1;
|
||||
$cartRule->code = Tools::passwdGen(8);
|
||||
$cartRule->code = '';
|
||||
// $cartRule->code = Tools::passwdGen(8);
|
||||
$cartRule->minimum_amount = 0;
|
||||
$cartRule->minimum_amount_tax = 0;
|
||||
$cartRule->reduction_product = -2;
|
||||
|
@ -24,7 +24,6 @@ $(document).ready(function() {
|
||||
updateInfo(".checkbox_add_bottom", ".pack_bottom");
|
||||
});
|
||||
|
||||
|
||||
$('#layer_cart_pack .cross, .layer_cart_overlay_pack, #layer_cart_pack .continue.link').on('click',function(){
|
||||
if($('#layer_cart_pack').hasClass('open') == true)
|
||||
$('#layer_cart_pack').removeClass('open');
|
||||
@ -48,6 +47,9 @@ function updateInfo(checkboxes, pack) {
|
||||
}
|
||||
|
||||
function addCmsPackToCart(checkboxes, pack) {
|
||||
var addProducts = [];
|
||||
var html = "";
|
||||
var quantity_add = 0;
|
||||
$(checkboxes).each(function( index ) {
|
||||
if ($(this).is(':checked')) {
|
||||
var idProduct = $(this).attr('name');
|
||||
@ -55,8 +57,22 @@ function addCmsPackToCart(checkboxes, pack) {
|
||||
var name = $(pack+' input[name="quantity_'+idProduct+'"]').data('product-name');
|
||||
var img = $(pack+' input[name="quantity_'+idProduct+'"]').data('product-img');
|
||||
var price = $(pack+' input[name="quantity_'+idProduct+'"]').data('product-price');
|
||||
|
||||
ajaxCart.addMultiple(idProduct, null, quantity, name, img, price);
|
||||
|
||||
if (result = ajaxCart.addMultiple(idProduct, null, quantity)) {
|
||||
addProducts.push(idProduct);
|
||||
}
|
||||
if(quantity > 0) {
|
||||
html += "<div class='col-xs-12 product-info-container'><div class='product-image-container col-xs-2 col-xxs-12'><img src='"+img+"' class='img-responsive' ></div><div class='product-box col-xs-10 col-xxs-12'><p class='product-name'>"+name+"</p><p class='prices'><span class='product-price'>"+price+"</span></p><p class='product-attributes col-xs-2'>x <span class='nb_quantity'>"+quantity+"</span></p></div></div></div>";
|
||||
quantity_add += + parseInt(quantity);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
ajaxCart.updateInfoCart(quantity_add);
|
||||
$('#layer_cart_pack #product-info').html(html);
|
||||
if($('#layer_cart_pack').hasClass('open') == false)
|
||||
$('#layer_cart_pack').addClass('open');
|
||||
$('.layer_cart_overlay_pack').show();
|
||||
}, 1500);
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
<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}
|
||||
{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'}
|
||||
@ -16,22 +16,26 @@
|
||||
{foreach from=$pack.products item=product}
|
||||
{assign var='id_image' value=Product::getCover($product->id)}
|
||||
<div class="product_inner">
|
||||
<div class="row">
|
||||
<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 type="checkbox" name="{$product->id}" class="checkbox_add_bottom custom-input">
|
||||
<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">
|
||||
<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 $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">
|
||||
|
@ -2,26 +2,38 @@
|
||||
<p class="title">
|
||||
{l s='Le panier qui sauve la vie' 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>
|
||||
</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">
|
||||
<div class="row {if $product->quantity == 0}not_available{/if}">
|
||||
<div class="col-md-1">
|
||||
<input type="checkbox" name="{$product->id}" class="checkbox_add_right custom-input">
|
||||
<input {if $product->quantity == 0}disabled{/if} type="checkbox" name="{$product->id}" class="checkbox_add_right custom-input">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<img class="img-responsive" 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" />
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<div class="col-md-8">
|
||||
<p class="name">{$product->name}</p>
|
||||
<div class="price">
|
||||
<div class="quantity">
|
||||
<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}" class="product_add_{$product->id} quantity_right">
|
||||
</div>
|
||||
<span> <span class="min">x</span> {displayPrice price=$product->price}</span>
|
||||
{if $product->quantity == 0}
|
||||
<p class="not_available">{l s='Hors stock'} <br /> {$product->available_later}</p>
|
||||
{else}
|
||||
<div class="quantity">
|
||||
<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}" class="product_add_{$product->id} quantity_right">
|
||||
</div>
|
||||
<span> <span class="min">x</span> {displayPrice price=$product->price}</span>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -264,6 +264,9 @@ body.content_only { margin: 0 }
|
||||
#header #mainmenu .menu-content > li .submenu.submenu-boutique {
|
||||
min-height: unset;
|
||||
}
|
||||
#header #mainmenu .menu-content > li .submenu.submenu-boutique > .border > .container {
|
||||
background: url('../img/img_menu.png') no-repeat 0 50%;
|
||||
}
|
||||
#header #mainmenu .menu-content > li .submenu.submenu-boutique .boutique {
|
||||
float: right;
|
||||
position: relative;
|
||||
@ -273,7 +276,7 @@ body.content_only { margin: 0 }
|
||||
|
||||
|
||||
#main_menu {
|
||||
font-family: 'pt_sansbold';
|
||||
font-family: 'pt_sansbold';
|
||||
}
|
||||
#main_menu ul {
|
||||
margin: 0; padding: 0;
|
||||
@ -401,7 +404,14 @@ body .ac_results {
|
||||
min-height: 320px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.post > a {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
.post_simple {
|
||||
border: 1px solid #dfdfdf;
|
||||
-webkit-border-radius: 2px;
|
||||
@ -426,6 +436,7 @@ body .ac_results {
|
||||
padding: 15px 0;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
z-index: 2
|
||||
}
|
||||
.post .info .label_post {
|
||||
background: url("../img/bg_tips.png") no-repeat center top;
|
||||
@ -515,6 +526,14 @@ body .ac_results {
|
||||
margin-bottom: 0;
|
||||
padding: 20px;
|
||||
}
|
||||
.post-product .article > a {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
.post-product .article img{
|
||||
margin-bottom: 20px;
|
||||
padding-bottom: 40px;
|
||||
@ -948,6 +967,7 @@ body .ac_results {
|
||||
#header #mainmenu li { padding: 0 30px; width: 100% }
|
||||
#header #mainmenu > div > ul.menu-content > li.close-tab { background: #e44e58; font-family: 'pt_sansbold'; text-transform: uppercase; }
|
||||
#header #mainmenu > div > ul.menu-content > li > a { border-bottom: 1px solid #f1f1f1; color: #333; display: block; font-family: 'pt_sans'; font-size: 14px; padding: 15px 0; position: relative; width: 100%; }
|
||||
#header #mainmenu > div > ul.menu-content > li > span { border-bottom: 1px solid #f1f1f1; color: #333; display: block; font-family: 'pt_sans'; font-size: 14px; padding: 15px 0; position: relative; width: 100%; }
|
||||
#header #mainmenu > div > ul.menu-content > li > a:hover { text-decoration: none }
|
||||
#header #mainmenu > div > ul.menu-content > li.close-tab > a { border: 0; color: #fff }
|
||||
#header #mainmenu > div > ul.menu-content > li.close-tab > a i { float: right; }
|
||||
@ -955,12 +975,12 @@ body .ac_results {
|
||||
#header #mainmenu > div > ul > li > .submenu { background: #fff; height: 100%; left: -101%; margin: 0; overflow-y: auto; position: fixed; top: 0; transition: all 0.3s ease 0s; width: 50%; z-index: 2 }
|
||||
#header #mainmenu > div > ul > li.open > .submenu { font-size: 14px; left: 0 }
|
||||
#header #mainmenu .menu-content > li .submenu .column { padding: 0 30px }
|
||||
#header #mainmenu > div > ul > li > a + .submenu .container { width: 100% }
|
||||
#header #mainmenu > div > ul > li > a + .submenu .close-tab { background: #e44e58; font-family: 'pt_sans'; text-transform: uppercase; }
|
||||
#header #mainmenu > div > ul > li > a + .submenu .close-tab a { color: #fff; display: block; padding: 15px 30px; text-transform: uppercase; }
|
||||
#header #mainmenu > div > ul > li > a + .submenu .close-tab a i { float: right }
|
||||
#header #mainmenu > div > ul > li > a + .submenu .menu-subtitle { color: #6ac5bb; display: block; font-size: 16px; margin-left: -15px; padding: 30px 0 0 0 }
|
||||
#header #mainmenu > div > ul > li > a + .submenu .cta-menu { display: none; }
|
||||
#header #mainmenu > div > ul > li > * + .submenu .container { width: 100% }
|
||||
#header #mainmenu > div > ul > li > * + .submenu .close-tab { background: #e44e58; font-family: 'pt_sans'; text-transform: uppercase; }
|
||||
#header #mainmenu > div > ul > li > * + .submenu .close-tab a { color: #fff; display: block; padding: 15px 30px; text-transform: uppercase; }
|
||||
#header #mainmenu > div > ul > li > * + .submenu .close-tab a i { float: right }
|
||||
#header #mainmenu > div > ul > li > * + .submenu .menu-subtitle { color: #6ac5bb; display: block; font-size: 16px; margin-left: -15px; padding: 30px 0 0 0 }
|
||||
#header #mainmenu > div > ul > li > * + .submenu .cta-menu { display: none; }
|
||||
#header #mainmenu > div > ul > li > a.open { background: #b4293c; text-decoration: none; }
|
||||
#header #mainmenu > div > ul > li > a.open + .submenu { max-height: 500px; overflow: hidden }
|
||||
#header #mainmenu > div > ul > li li a { display: block; padding: 15px 0 5px 50px }
|
||||
@ -1064,6 +1084,10 @@ body .ac_results {
|
||||
.post-product .product_post_label{ margin-top: 15px;}
|
||||
.post-product .product_post .add_to_cart{ text-align: center; }
|
||||
.post-product .product_post .ajax_add_to_cart_button{ width: 80%;}
|
||||
|
||||
.footer_social { text-align: center }
|
||||
.footer_social .title-social { display: block }
|
||||
.inner_partenaire span.h4 { font-size: 40px; padding: 0 15px 20px 15px; }
|
||||
}
|
||||
|
||||
@media (max-width: 549px) {
|
||||
@ -1080,6 +1104,7 @@ body .ac_results {
|
||||
left: 0;
|
||||
margin-left: 0;
|
||||
position: relative;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
}
|
||||
.footer_social {font-size: 25px; text-align: center;}
|
||||
@ -1102,6 +1127,7 @@ body .ac_results {
|
||||
.newsletter_lightbox h5{font-size: 30px}
|
||||
.newsletter_lightbox .form-group{padding: 0 5px;}
|
||||
.newsletter_lightbox input.newsletter-input, .newsletter_lightbox .btn.btn-black{display: block; width: 100%; text-align: center;}
|
||||
.video_home { padding: 22px 0 }
|
||||
}
|
||||
|
||||
|
||||
@ -1737,6 +1763,8 @@ main#categorycms { margin-bottom: 30px }
|
||||
#postcms .pack_left .products .product_inner .row{
|
||||
margin:0;
|
||||
}
|
||||
#postcms .pack_left .products .product_inner .row.not_available { opacity: 0.3 }
|
||||
#postcms .pack_left .products .product_inner .row.not_available .not_available { font-size: 13px; }
|
||||
#postcms .pack_left .products .product_inner .row .col-md-1,
|
||||
#postcms .pack_left .products .product_inner .row .col-md-8{
|
||||
padding: 0;
|
||||
@ -1819,7 +1847,13 @@ main#categorycms { margin-bottom: 30px }
|
||||
padding-left: 200px;
|
||||
text-transform: none;
|
||||
}
|
||||
#postcms .pack_bottom .desc .remise span { font-weight: bold; color: #e4535d}
|
||||
#postcms .pack_left .desc .remise {
|
||||
display: block;
|
||||
font-family: 'pompiere_regular';
|
||||
font-size: 24px;
|
||||
text-transform: none;
|
||||
}
|
||||
#postcms .remise span { font-weight: bold; color: #e4535d}
|
||||
#postcms .pack_bottom .products {
|
||||
border: 1px solid #dfdfdf;
|
||||
-webkit-border-radius: 5px 5px 5px 5px;
|
||||
@ -1829,6 +1863,8 @@ main#categorycms { margin-bottom: 30px }
|
||||
#postcms .pack_bottom .products .product_inner:nth-child(even) {
|
||||
background: #f9f9f9;
|
||||
}
|
||||
#postcms .pack_bottom .products .product_inner .not_available { opacity: 0.3; }
|
||||
#postcms .pack_bottom .products .product_inner p.not_available { opacity: 1; font-size: 13px; }
|
||||
#postcms .pack_bottom .img {
|
||||
float: left;
|
||||
border-radius: 50px
|
||||
@ -1840,6 +1876,7 @@ main#categorycms { margin-bottom: 30px }
|
||||
float: left;
|
||||
font-family: 'pt_sansbold';
|
||||
font-size: 16px;
|
||||
width: 70%;
|
||||
}
|
||||
#postcms .pack_bottom .quantity_box {
|
||||
margin-top: 15px;
|
||||
@ -2295,6 +2332,16 @@ main#categorycms { margin-bottom: 30px }
|
||||
padding-top: 15px;
|
||||
}
|
||||
|
||||
#manufacturers > div {
|
||||
margin: 5px 0;
|
||||
}
|
||||
#manufacturers img {
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
|
||||
#best_sales h2 {
|
||||
text-align: center;
|
||||
margin-bottom: 30px;
|
||||
@ -2355,13 +2402,13 @@ main#categorycms { margin-bottom: 30px }
|
||||
#best_sales h2{ font-size: 30px;}
|
||||
|
||||
#best_sales .product-container:nth-child(3n+1),
|
||||
#best_sales .product-container { border-right: 1px solid #d6d6d6; }
|
||||
#best_sales .product-container { border-right: 1px solid #d6d6d6; }
|
||||
#best_sales .product-container:nth-child(2n+1) { border-right: 0; }
|
||||
|
||||
/*#best_sales img{ height: 120px; }*/
|
||||
.product-container .product-infos h5.product-name{ height: auto;}
|
||||
#reassurance_home_store{ background: none;}
|
||||
#reassurance_home_store .bloc{ color: #333;float: left; width: 50%; padding: 0 15px;}
|
||||
#reassurance_home_store .bloc{ color: #333; padding: 0 15px;}
|
||||
}
|
||||
@media (max-width: 570px) {
|
||||
#slider{ display: none;}
|
||||
@ -2944,9 +2991,10 @@ main#categorycms { margin-bottom: 30px }
|
||||
.layer_cart_cart { margin-bottom: 15px;}
|
||||
}
|
||||
@media (max-width: 500px) {
|
||||
#layer_cart {
|
||||
#layer_cart {
|
||||
display: none;
|
||||
margin: 0 0 0 -150px;
|
||||
width: 300px;
|
||||
width: 300px;
|
||||
}
|
||||
}
|
||||
|
||||
@ -3243,16 +3291,17 @@ main#categorycms { margin-bottom: 30px }
|
||||
#shopping-cart #shopping-cart-products .table-row.valign-middle > div.form-group.qty strong { float: none; margin: 0;}
|
||||
#shopping-cart #calcul #total_price { font-family: 'pt_sans' }
|
||||
|
||||
.cart_navigation .btn-next, .cart_navigation .btn-cancel { margin-bottom: 20px; width: 100%; }
|
||||
}
|
||||
@media (max-width: 500px) {
|
||||
#shopping-cart #shopping-cart-products .total { margin-top: 0; text-align: left }
|
||||
#shopping-cart #calcul .line > div:first-child, #shopping-cart #calcul .line > div:last-child { display: inline; float: none; font-size: 14px; }
|
||||
#shopping-cart #calcul .line > div:first-child { padding: 0; }
|
||||
#shopping-cart #calcul .line > div:first-child, #shopping-cart #calcul .line > div:last-child { display: inline; font-size: 14px; }
|
||||
#shopping-cart #calcul .line #total_tax { font-size: 14px }
|
||||
#shopping-cart #calcul .line > div:first-child { font-family: 'pt_sans' }
|
||||
#shopping-cart #shopping-cart-products .taxes li { border: 0; float: none; padding-left: 0; }
|
||||
|
||||
#shopping-cart #calcul .discount_form .form-group { margin: 20px 0 30px 0; }
|
||||
.cart_navigation .btn-next, .cart_navigation .btn-cancel { margin-bottom: 20px; width: 100%; }
|
||||
.cart_navigation .btn-cart { margin-bottom: 15px; width: 100% }
|
||||
}
|
||||
|
||||
@ -3593,6 +3642,7 @@ body .addresses {
|
||||
.addresses .radio-button .custom-radio, .addresses .radio-button img.hidden-xs + .custom-radio { margin: 35px 0 0 45px; }
|
||||
}
|
||||
@media (max-width: 500px) {
|
||||
.addresses .address .address_title { padding-left: 0 }
|
||||
.addresses .radio-button .radio, .addresses .radio-button img.hidden-xs + .custom-radio { margin: 35px 0 0 40%; }
|
||||
.addresses #order-carrier-list .delivery-option .price { font-size: 14px }
|
||||
}
|
||||
@ -3745,7 +3795,7 @@ body .addresses {
|
||||
.order-paiement .cgv .submit .btn.btn-next { font-size: 16px }
|
||||
}
|
||||
@media (max-width: 370px) {
|
||||
.order-paiement .paiement-module > div:first-child + div img { width: 100% }
|
||||
.order-paiement .paiement-module > div:first-child + div img { max-width: 100% }
|
||||
.order-paiement .cgv .submit .btn.btn-next { font-size: 14px }
|
||||
}
|
||||
|
||||
|
@ -102,12 +102,13 @@ p#add_to_cart{ text-align: center; margin: 0 auto;}
|
||||
padding: 10px 20px;
|
||||
line-height: 25px;
|
||||
}
|
||||
.submit .btn-checkout {
|
||||
font-size: 35px;
|
||||
height: 60px;
|
||||
padding: 8px 80px;
|
||||
@media(min-width: 992px) {
|
||||
.submit .btn-checkout {
|
||||
font-size: 35px;
|
||||
height: 60px;
|
||||
padding: 8px 80px;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-default.disabled, .btn-default.disabled.active, .btn-default.disabled.focus, .btn-default.disabled:active, .btn-default.disabled:focus, .btn-default.disabled:hover, .btn-default[disabled], .btn-default.active[disabled], .btn-default.focus[disabled], .btn-default[disabled]:active, .btn-default[disabled]:focus, .btn-default[disabled]:hover, fieldset[disabled] .btn-default, fieldset[disabled] .btn-default.active, fieldset[disabled] .btn-default.focus, fieldset[disabled] .btn-default:active, fieldset[disabled] .btn-default:focus, fieldset[disabled] .btn-default:hover { background-color: #2b2b2b }
|
||||
|
||||
.animated-full * {
|
||||
|
@ -29,7 +29,7 @@
|
||||
<div class="bg-grey">
|
||||
<div class="container">
|
||||
<div class="col-lg-offset-3 col-lg-6 col-md-offset-2 col-md-8 col-sm-offset-1 col-sm-10 col-xs-offset-1 col-xs-10 footer_social">
|
||||
{l s='Retrouvez-nous'}
|
||||
<span class="title-social">{l s='Retrouvez-nous'}</span>
|
||||
<span class="social">
|
||||
<a href="https://www.facebook.com/ToutPratique-182589007555/" target="_blank"><i class="icon icon-facebook"></i></a>
|
||||
</span>
|
||||
@ -39,7 +39,7 @@
|
||||
<span class="social">
|
||||
<a href="https://www.youtube.com/user/toutpratique" target="_blank"><i class="icon icon-youtube"></i></a>
|
||||
</span>
|
||||
{l s='Contactez-nous'}
|
||||
<span class="title-social">{l s='Contactez-nous'}</span>
|
||||
<span class="social">
|
||||
<a href="{$link->getPageLink('contact')}"><i class="icon icon-email"></i></a>
|
||||
</span>
|
||||
|
@ -45,16 +45,16 @@
|
||||
|
||||
<div id="reassurance_home_store">
|
||||
<div class="row">
|
||||
<div class="col-sm-3 bloc bloc1">
|
||||
<div class="col-sm-3 col-xs-6 col-xxs-12 bloc bloc1">
|
||||
<span class="icon-wallet2"></span> {l s='Frais de port gratuit à partir de 60€'}
|
||||
</div>
|
||||
<div class="col-sm-3 bloc bloc2">
|
||||
<div class="col-sm-3 col-xs-6 col-xxs-12 bloc bloc2">
|
||||
<span class="icon-logistics3"></span> {l s='Livraison express'}
|
||||
</div>
|
||||
<div class="col-sm-3 bloc bloc3">
|
||||
<div class="col-sm-3 col-xs-6 col-xxs-12 bloc bloc3">
|
||||
<span class="icon-lock39"></span> {l s='Paiement sécurisé'}
|
||||
</div>
|
||||
<div class="col-sm-3 bloc bloc4">
|
||||
<div class="col-sm-3 col-xs-6 col-xxs-12 bloc bloc4">
|
||||
<span class="icon-flag"></span> {l s='Made in France'}
|
||||
</div>
|
||||
</div>
|
||||
|
BIN
themes/toutpratique/img/img_menu.png
Normal file
BIN
themes/toutpratique/img/img_menu.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 342 KiB |
Binary file not shown.
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 40 KiB |
BIN
themes/toutpratique/img/newsletter_footer_old.png
Normal file
BIN
themes/toutpratique/img/newsletter_footer_old.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 27 KiB |
@ -386,7 +386,7 @@ function fakeFormElements()
|
||||
});
|
||||
}
|
||||
|
||||
function advancedDropdownMenu()
|
||||
function advancedDropdownMenu()
|
||||
{
|
||||
$menuContainer = $('#mainmenu');
|
||||
$menuMobileBtn = $('#menu-mobile > a'); // Bouton pour ouvrir le menu mobile
|
||||
|
@ -228,11 +228,7 @@ var ajaxCart = {
|
||||
// close fancybox
|
||||
updateFancyBox : function (){},
|
||||
// add a product in the cart via ajax
|
||||
addMultiple : function(idProduct, idCombination, quantity, name, img, price) {
|
||||
var addProducts = [];
|
||||
var html = "";
|
||||
var quantity_add = 0;
|
||||
|
||||
addMultiple : function(idProduct, idCombination, quantity) {
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
headers: { "cache-control": "no-cache" },
|
||||
@ -242,24 +238,11 @@ var ajaxCart = {
|
||||
dataType : "json",
|
||||
data: 'controller=cart&add=1&ajax=true&qty=' + ((quantity && quantity != null) ? quantity : '1') + '&id_product=' + idProduct + '&token=' + static_token + ( (parseInt(idCombination) && idCombination != null) ? '&ipa=' + parseInt(idCombination): ''),
|
||||
success: function(jsonData,textStatus,jqXHR) {
|
||||
|
||||
if(!jsonData.hasError)
|
||||
{
|
||||
addProducts.push(idProduct);
|
||||
if(quantity > 0) {
|
||||
html += "<div class='col-xs-12 product-info-container'><div class='product-image-container col-xs-2 col-xxs-12'><img src='"+img+"' class='img-responsive' ></div><div class='product-box col-xs-10 col-xxs-12'><p class='product-name'>"+name+"</p><p class='prices'><span class='product-price'>"+price+"</span></p><p class='product-attributes col-xs-2'>x <span class='nb_quantity'>Ce produit n'est plus en stock.</span></p></div></div></div>";
|
||||
quantity_add += + parseInt(quantity);
|
||||
}
|
||||
if (!jsonData.hasError) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(quantity > 0) {
|
||||
html += "<div class='col-xs-12 product-info-container'><div class='product-image-container col-xs-2 col-xxs-12'><img src='"+img+"' class='img-responsive' ></div><div class='product-box col-xs-10 col-xxs-12'><p class='product-name'>"+name+"</p><p class='prices'><span class='product-price'>"+price+"</span></p><p class='product-attributes col-xs-2'>x <span class='nb_quantity'>"+quantity+"</span></p></div></div></div>";
|
||||
quantity_add += + parseInt(quantity);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
// error: function(XMLHttpRequest, textStatus, errorThrown)
|
||||
// {
|
||||
@ -279,14 +262,6 @@ var ajaxCart = {
|
||||
// alert(error);
|
||||
// }
|
||||
});
|
||||
|
||||
setTimeout(function(){
|
||||
ajaxCart.updateInfoCart(quantity_add);
|
||||
$('#layer_cart_pack #product-info').html(html);
|
||||
if($('#layer_cart_pack').hasClass('open') == false)
|
||||
$('#layer_cart_pack').addClass('open');
|
||||
$('.layer_cart_overlay_pack').show();
|
||||
}, 1500);
|
||||
},
|
||||
|
||||
returnStatus : function(data) {
|
||||
|
@ -6,6 +6,7 @@
|
||||
$.get(menuAjaxUrl, function( data ) {
|
||||
$('.load_menu').after(data);
|
||||
$('.load_menu').remove();
|
||||
advancedDropdownMenu();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
@ -34,5 +34,5 @@
|
||||
</ul>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<p>Copyright ©{$smarty.now|date_format:"%Y"} ToutPratique Tous droits réservés <span class="link_credits"><a href="#">Crédits</a> . <a href="#">A propos de Tout Pratique</a></span></p>
|
||||
<p>Copyright ©{$smarty.now|date_format:"%Y"} ToutPratique Tous droits réservés <span class="link_credits"><a href="{$link->getCMSLink(10)}">Crédits</a> . <a href="{$link->getCMSLink(4)}">A propos de Tout Pratique</a></span></p>
|
||||
<!-- /Block links module -->
|
||||
|
@ -26,7 +26,7 @@
|
||||
<h4>{l s='Les marques qui nous font confiance' mod='blockmanufacturer'}</h4>
|
||||
|
||||
{foreach from=$manufacturers item=manufacturer name=manufacturer_list}
|
||||
<div class="col-md-2 {if $smarty.foreach.manufacturer_list.last}last_item{elseif $smarty.foreach.manufacturer_list.first}first_item{else}item{/if}">
|
||||
<div class="col-lg-2 col-md-3 col-sm-4 col-xs-6 col-xxs-12 {if $smarty.foreach.manufacturer_list.last}last_item{elseif $smarty.foreach.manufacturer_list.first}first_item{else}item{/if}">
|
||||
<a href="{$link->getManufacturerLink($manufacturer.id_manufacturer)}">
|
||||
<img src="/img/m/{$manufacturer.image}-home_manufacturer.jpg" alt="{$manufacturer.name}">
|
||||
</a>
|
||||
|
@ -3,9 +3,11 @@
|
||||
<div class="row">
|
||||
<div class="col-md-9 col-sm-8 col-xs-12">
|
||||
<div class="article" {if isset($post->have_image) && !$post->have_image} style="background:{printCouleur}"{/if}>
|
||||
{if isset($post->have_image) && $post->have_image}
|
||||
<a href="{$link->getPostCmsLink($post->id)}"><img class="img-responsive" src="{$base_dir}img/cms_post/{$post->id}/big.jpg" alt="{$post->title}"></a>
|
||||
{/if}
|
||||
<a href="{$link->getPostCmsLink($post->id)}">
|
||||
{if isset($post->have_image) && $post->have_image}
|
||||
<img class="img-responsive" src="{$base_dir}img/cms_post/{$post->id}/big.jpg" alt="{$post->title}">
|
||||
{/if}
|
||||
</a>
|
||||
|
||||
<div class="info">
|
||||
{if $post->new}
|
||||
|
Loading…
Reference in New Issue
Block a user