Bonjour,
J'espère être sur le bon forum. Dans une boutique PrestaShop 1.5, quel code dois-je insérer dans le fichier homefeatured.tpl pour que s'affiche le bouton "Voir produit" sur la page des "Produits en vedette" .
Merci pour votre aide.
Code : Tout sélectionner
{*
* 2007-2012 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <[email protected]>
* @copyright 2007-2012 PrestaShop SA
* @version Release: $Revision: 7457 $
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<script type="text/javascript" src="{$js_dir}listgrid.js"></script>
{if isset($products)}
<div id="product_list">
<!-- Products grid -->
<div id="product_list_grid" class="bordercolor boxpct visible" style="display:none">
<ul class="clear">
{foreach from=$products item=product name=products}
<li class="ajax_block_product gridblock">
<div class="featured_img">
<a href="{$product.link|escape:'htmlall':'UTF-8'}" class="product_img_link" title="{$product.name|escape:'htmlall':'UTF-8'}"><img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_default')}" alt="{$product.legend|escape:'htmlall':'UTF-8'}" {if isset($homeSize)} width="{$homeSize.width}" height="{$homeSize.height}"{/if} /></a>
<div class="div_hide_featured">
{if ($product.id_product_attribute == 0 OR (isset($add_prod_display) AND ($add_prod_display == 1))) AND $product.available_for_order AND !isset($restricted_country_mode) AND $product.minimal_quantity == 1 AND $product.customizable != 2 AND !$PS_CATALOG_MODE}
<a class="abt_featured" href="{$product.link}" title="{$product.name|escape:html:'UTF-8'}">{l s='View'}</a>
{else}
<a class="abt_featured" href="{$product.link}" title="{$product.name|escape:html:'UTF-8'}">{l s='View'}</a>
{/if}
</div>
</div>
<h5><a class="equal_hei" class="product_link" href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.name|escape:'htmlall':'UTF-8'}">{$product.name|truncate:50:'...'|escape:'htmlall':'UTF-8'}</a></h5>
{if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))}
{if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}
<div>
<div class="price">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc} {/if}
{if $priceDisplay >= 0 && $priceDisplay <= 2}
{if $product.price_without_reduction > $product.price}
<span id="old_price_display">{convertPrice price=$product.price_without_reduction}
{if $tax_enabled}
{if $priceDisplay == 1}{l s='tax excl.'}{else}{l s='tax incl.'}{/if}
{/if}
</span>
{/if}
{/if}
<div style="float: right">
<!-- Reduction (percent or amount) -->
{if $product.price_without_reduction neq $product.price}
{if $product.specific_prices}{assign var='pro_specific_prices' value=$product.specific_prices}
{if $pro_specific_prices.reduction_type eq 'percentage' && ($pro_specific_prices.from eq $pro_specific_prices.to OR ($smarty.now|date_format:'%Y-%m-%d %H:%M:%S' <= $pro_specific_prices.to && $smarty.now|date_format:'%Y-%m-%d %H:%M:%S' >= $pro_specific_prices.from))}<div class="reduction_percent"><span class="reduction_percent_display">-{$pro_specific_prices.reduction * 100|floatval}%</span></div>
{/if}
{if $pro_specific_prices.reduction_type eq 'amount' && ($pro_specific_prices.from eq $pro_specific_prices.to OR ($smarty.now|date_format:'%Y-%m-%d %H:%M:%S' <= $pro_specific_prices.to && $smarty.now|date_format:'%Y-%m-%d %H:%M:%S' >= $pro_specific_prices.from))}<div class="reduction_amount"><span class="reduction_amount_display">-{$pro_specific_prices.reduction|floatval}€</span></div>
{/if}
{/if}
{/if}
<!-- End Reduction -->
</div>
</div>
</div>
{/if}
{/if}
</li>
{/foreach}
</ul>
</div>
<!-- Products list -->
<div id="product_list_list" class="boxpct">
<ul class="clear">
{foreach from=$products item=product name=products}
<li class="ajax_block_product {if $smarty.foreach.products.first}first_item{elseif $smarty.foreach.products.last}last_item{/if} {if $smarty.foreach.products.index % 2}alternate_item{else}item{/if} clearfix">
<div class="center_block">
<div class="featured_img">
<a href="{$product.link|escape:'htmlall':'UTF-8'}" class="product_img_link" title="{$product.name|escape:'htmlall':'UTF-8'}">
<img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_default')}" alt="{$product.legend|escape:'htmlall':'UTF-8'}" {if isset($homeSize)} width="{$homeSize.width}" height="{$homeSize.height}"{/if} />
{if isset($product.new) && $product.new == 1}<span class="new">{l s='New'}</span>{/if}
</a>
<div class="div_hide_featured"><a class="abt_featured" href="{$product.link}" title="{$product.name|escape:html:'UTF-8'}">{l s='View'}</a></div>
</div>
</div>
<div class="right_block">
<h3><a href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.name|escape:'htmlall':'UTF-8'}">{$product.name|escape:'htmlall':'UTF-8'|truncate:50:'...'}</a></h3>
<p class="product_desc"><a href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'}" >{$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'}</a></p>
<div class="content_left">
<span class="tituvars">{l s='Availability'}:</span>{if isset($product.available_for_order) && $product.available_for_order && !isset($restricted_country_mode)}<span class="productvars{if ($product.allow_oosp || $product.quantity > 0)} instock">{l s='In Stock'}{elseif (isset($product.quantity_all_versions) && $product.quantity_all_versions > 0)}{l s='Product available with different options'}{else} outstock">{l s='Out of stock'}{/if}</span>{/if}<br>
<span class="tituvars">{l s='Reference'}:</span><span class="productvars">{$product.reference}</span><br>
<span class="tituvars">{l s='Brand'}:</span><span class="productvars">{$product.manufacturer_name}</span><br>
{if isset($product.on_sale) && $product.on_sale && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}<span class="on_sale">{l s='On sale!'}</span>
{elseif isset($product.reduction) && $product.reduction && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}<span class="discount">{l s='Reduced price!'}</span>{/if}
{if isset($product.online_only) && $product.online_only}<span class="online_only">{l s='Online only!'}</span>{/if}
{if isset($comparator_max_item) && $comparator_max_item}
<p class="compare">
<input type="checkbox" class="comparator" id="comparator_item_{$product.id_product}" value="comparator_item_{$product.id_product}" {if isset($compareProducts) && in_array($product.id_product, $compareProducts)}checked="checked"{/if} />
<label for="comparator_item_{$product.id_product}">{l s='Select to compare'}</label>
</p>
{/if}
</div>
{if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))}
{if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}
<span class="price" style="display: inline;">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}
{if $priceDisplay >= 0 && $priceDisplay <= 2}
{if $product.price_without_reduction > $product.price}
<span id="old_price_display">{convertPrice price=$product.price_without_reduction}
{if $tax_enabled}
{if $priceDisplay == 1}{l s='tax excl.'}{else}{l s='tax incl.'}{/if}
{/if}
</span>
<span style="float: right; margin-left: 5px;">
<!-- Reduction (percent or amount) -->
{if $product.price_without_reduction neq $product.price}
{if $product.specific_prices}{assign var='pro_specific_prices' value=$product.specific_prices}
{if $pro_specific_prices.reduction_type eq 'percentage' && ($pro_specific_prices.from eq $pro_specific_prices.to OR ($smarty.now|date_format:'%Y-%m-%d %H:%M:%S' <= $pro_specific_prices.to && $smarty.now|date_format:'%Y-%m-%d %H:%M:%S' >= $pro_specific_prices.from))}<span class="reduction_percent"><span class="reduction_percent_display">-{$pro_specific_prices.reduction * 100|floatval}%</span></span>
{/if}
{if $pro_specific_prices.reduction_type eq 'amount' && ($pro_specific_prices.from eq $pro_specific_prices.to OR ($smarty.now|date_format:'%Y-%m-%d %H:%M:%S' <= $pro_specific_prices.to && $smarty.now|date_format:'%Y-%m-%d %H:%M:%S' >= $pro_specific_prices.from))}<span class="reduction_amount"><span class="reduction_amount_display">-{$pro_specific_prices.reduction|floatval}€</span></span>
{/if}
{/if}
{/if}
<!-- End Reduction -->
</span>
{/if}
{/if}
</span><br/>
{/if}
{if ($product.id_product_attribute == 0 || (isset($add_prod_display) && ($add_prod_display == 1))) && $product.available_for_order && !isset($restricted_country_mode) && $product.minimal_quantity <= 1 && $product.customizable != 2 && !$PS_CATALOG_MODE}
{/if}
{/if}
</div>
</li>
{/foreach}
</ul>
</div>
<!-- /Products list -->
</div>
{/if}
<script>
//featured_img
$('.featured_img').mouseover(function() {
$(".div_hide_featured",this).fadeIn('', function() {
// Animation complete
});;
});
$('.featured_img').mouseleave(function() {
$(".div_hide_featured",this).fadeOut('fast', function() {
// Animation complete
});;
});
function equalHeight(group) {
var tallest = 0;
group.each(function() {
var thisHeight = jQuery(this).height();
if(thisHeight > tallest) {
tallest = thisHeight;
}
});
group.height(tallest);
}
equalHeight(jQuery(".equal_hei"));
</script>