produit edito
This commit is contained in:
parent
8838e507c8
commit
7450daaee2
@ -96,8 +96,7 @@ class Product extends ProductCore
|
||||
if(empty(self::$products_flashsale)) {
|
||||
self::$products_flashsale = self::getProductsInFlashsales();
|
||||
}
|
||||
|
||||
$this->isflash = in_array($row['id_product'], self::$products_flashsale);
|
||||
$this->isflash = in_array($this->id, self::$products_flashsale);
|
||||
|
||||
if ($context == null)
|
||||
$context = Context::getContext();
|
||||
|
@ -2523,7 +2523,7 @@ main#categorycms { margin-bottom: 30px }
|
||||
}
|
||||
#postedito .pack_content .image img {
|
||||
margin: 0 auto;
|
||||
max-width: 90px;
|
||||
max-width: 100%;
|
||||
}
|
||||
#postedito .pack_content .content_product .link_name {
|
||||
color: #666666;
|
||||
@ -2548,14 +2548,11 @@ main#categorycms { margin-bottom: 30px }
|
||||
#postedito .pack_content .content_product .product-flashsale .flashsale-countdown-box {
|
||||
background: #6ac5bb;
|
||||
color: #fff;
|
||||
font-family: 'pompiere_regular';
|
||||
font-family: 'pt_sans';
|
||||
font-size: 18px;
|
||||
margin-bottom: 15px;
|
||||
padding: 7px 10px 5px 10px;
|
||||
padding: 8px 10px 4px 10px;
|
||||
}
|
||||
#postedito .pack_content .content_product .product-flashsale .flashsale-countdown-box i {
|
||||
margin-right: 5px;
|
||||
}
|
||||
#postcms .pack_content .image img {
|
||||
margin: 0 auto;
|
||||
}
|
||||
@ -2579,21 +2576,32 @@ main#categorycms { margin-bottom: 30px }
|
||||
top: 7px;
|
||||
}
|
||||
#postedito .price-percent-reduction {
|
||||
background: url(../img/reduction.png) no-repeat top left;
|
||||
color: #000;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
line-height: 57px;
|
||||
background: url('../img/flashsale-reduction.png');
|
||||
color: #fff;
|
||||
font-size: 22px;
|
||||
padding-left: 9px;
|
||||
position: absolute;
|
||||
text-align: left;
|
||||
left: -1px;
|
||||
top: -1px;
|
||||
height: 120px;
|
||||
width: 106px;
|
||||
line-height: 70px;
|
||||
height: 101px;
|
||||
width: 121px;
|
||||
z-index: 1;
|
||||
font-family: 'pt_sansbold';
|
||||
}
|
||||
#postedito .price-percent-reduction span {
|
||||
color: #fff;
|
||||
font-size: 20px;
|
||||
font-weight: normal;
|
||||
left: -1px;
|
||||
position: relative;
|
||||
top: 18px;
|
||||
}
|
||||
#postedito .price-percent-reduction span sup {
|
||||
font-family: 'pt_sans';
|
||||
top: -.3em;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2691,13 +2699,19 @@ main#categorycms { margin-bottom: 30px }
|
||||
display: inline-block;
|
||||
margin: 0 10px;
|
||||
}
|
||||
@media (max-width: 990px) {
|
||||
@media (max-width: 1199px) {
|
||||
#postedito .pack_content .flash .image img { margin-top: 30px; }
|
||||
}
|
||||
@media (max-width: 991px) {
|
||||
#postedito .pack { padding-top: 20px; }
|
||||
#postedito .pack_content .flash .image img { margin-top: 0; }
|
||||
}
|
||||
@media(max-width: 500px) {
|
||||
#search .anchor-search li { display: block; margin: 15px 0 0 0 }
|
||||
#search .anchor-search li:first-child { margin: 0 }
|
||||
#search .anchor-search li .btn { width: 80%; }
|
||||
#postedito .pack_content .flash .image img { margin-top: 30px; }
|
||||
#postedito .pack_content .content_product .product-flashsale .flashsale-countdown-box { font-size: 14px; padding: 8px 5px 4px 5px; }
|
||||
}
|
||||
|
||||
/*************************************************************************************************************
|
||||
|
@ -47,19 +47,20 @@
|
||||
<div class="pack">
|
||||
<img src="{$img_dir}title_pack.png" class="img-responsive" alt="{l s='Le pack qui me sauve tout de suite'}">
|
||||
<div class="pack_content">
|
||||
<div class="product_top">
|
||||
{assign var='product' value=$product_relation.0}
|
||||
{assign var='id_image' value=Product::getCover($product->id)}
|
||||
{assign var=percentReduction value=0}
|
||||
{if isset($product->price_without_reduction) && isset($product->price) && $product->price != round($product->price_without_reduction, 2)}
|
||||
{math equation="round(100 - (price * 100 / price_without_reduction))" price=$product->price price_without_reduction=$product->price_without_reduction assign=percentReduction}
|
||||
{/if}
|
||||
{assign var='product' value=$product_relation.0}
|
||||
{assign var='id_image' value=Product::getCover($product->id)}
|
||||
{assign var=percentReduction value=0}
|
||||
{if isset($product->price_without_reduction) && isset($product->price) && $product->price != round($product->price_without_reduction, 2)}
|
||||
{math equation="round(100 - (price * 100 / price_without_reduction))" price=$product->price price_without_reduction=$product->price_without_reduction assign=percentReduction}
|
||||
{/if}
|
||||
|
||||
<div class="product_top {if isset($product->isflash) && $product->isflash} flash{/if}">
|
||||
<div class="clearfix">
|
||||
|
||||
<div class="col-md-4 col-xs-4 image">
|
||||
{if $percentReduction}
|
||||
<span class="price-percent-reduction">
|
||||
<span>-{$percentReduction}<sup>%</sup></span>
|
||||
<span>{if isset($product->isflash) && !$product->isflash}-{/if}{$percentReduction}<sup>%</sup></span>
|
||||
</span>
|
||||
{/if}
|
||||
<a href="{$link->getProductLink($product->id, $product->link_rewrite)}" title="{$product->name|escape:'html':'UTF-8'}">
|
||||
|
Loading…
Reference in New Issue
Block a user