ajout picto listing
This commit is contained in:
parent
1dce6f94c5
commit
7e029cc2dc
@ -162,11 +162,17 @@ class AdvPicto extends Module
|
||||
public function hookDisplayPictogrammesProduct($params)
|
||||
{
|
||||
$id_product = $params['id_product'];
|
||||
|
||||
$is_listing = $params['is_listing'];
|
||||
$pictos = AdvPictoClass::getPictosForProductDetails($id_product);
|
||||
|
||||
$this->smarty->assign('pictos', $pictos);
|
||||
|
||||
if($is_listing)
|
||||
{
|
||||
return $this->display(__FILE__, 'category.tpl');
|
||||
}
|
||||
else {
|
||||
return $this->display(__FILE__, 'product.tpl');
|
||||
}
|
||||
}
|
||||
}
|
@ -184,8 +184,10 @@ class AdvPictoClass extends ObjectModel
|
||||
{
|
||||
$context = Context::getContext();
|
||||
|
||||
$id_product = (int) $id_product;
|
||||
if(!empty($id_product) && is_int($id_product))
|
||||
{
|
||||
|
||||
$query = '
|
||||
SELECT DISTINCT(advp.`id_advpicto`), `title`
|
||||
FROM `'._DB_PREFIX_.'advpicto_product` advp
|
||||
|
@ -2874,6 +2874,7 @@ main#categorycms { margin-bottom: 30px }
|
||||
font-family: 'pompiere_regular';
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
#product .pictos .picto:nth-child(odd) { padding-right: 5px; }
|
||||
#product .pictos .picto:nth-child(even) { padding-left: 5px; }
|
||||
#product .pictos .picto div {
|
||||
|
@ -503,6 +503,21 @@ header.page-heading.order-process { padding: 25px 0 0 0 }
|
||||
.product-container .btn {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.product-container .pictos {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.product-container .pictos li {
|
||||
width: auto;
|
||||
margin-right: 1%;
|
||||
display: inline-block;
|
||||
height: 38px;
|
||||
max-width: 30%;
|
||||
}
|
||||
.product-container .pictos li img {
|
||||
max-height: 100%;
|
||||
max-width: 100%;
|
||||
}
|
||||
.product-container:hover .btn {
|
||||
background: #6ac5bb none repeat scroll 0 0;
|
||||
color: #fff;
|
||||
|
@ -0,0 +1,11 @@
|
||||
{if $pictos}
|
||||
<ul class="pictos">
|
||||
{foreach from=$pictos item=picto name=picto}
|
||||
{if $picto.hasImg}
|
||||
<li>
|
||||
<img src="{$base_dir}img/picto/{$picto.id_advpicto}.jpg" alt="{$picto.title}" />
|
||||
</li>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if}
|
@ -25,7 +25,8 @@
|
||||
<a class="product-img" href="{$product.link|escape:'html':'UTF-8'}" title="{$product.name|escape:'html':'UTF-8'}" itemprop="url">
|
||||
<img class="img-responsive" src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_default')|escape:'html':'UTF-8'}" alt="{$product.name|escape:'html':'UTF-8'}" title="{$product.name|escape:'html':'UTF-8'}" itemprop="image" />
|
||||
</a>
|
||||
{hook h='displayPictogrammesCategory' id_product=$product.id}
|
||||
{hook h='displayPictogrammesProduct' id_product=$product.id_product is_listing='true'}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-7 product-infos">
|
||||
|
Loading…
x
Reference in New Issue
Block a user