Jump to content

Carroussel meilleures ventes / Taxes exclues


Recommended Posts

Bonjour,

 

J'ai un problème avec mon carrousel en page d’accueil qui me remonte mes meilleures ventes.

Quand je passe le groupe d’utilisateur de ma boutique PRO en "taxe exclues"pour avoir les prix en HT (en front) celui-ci (le carrousel) ne peut me remonter les prix et m’affiche ( à la place des prix) l'erreur suivante : Notice: Undefined index: price_tax_exc in /httpdocs/cache/smarty/compile/5f/e3/16/5fe31613701a14b08ccf14511125bca3d9bd785e.file.hometopproduct.tpl.php on line 91

 

A vot' bon coeur m'sieurs dames :)

Link to comment
Share on other sites

La fameuse ligne 91 : <?php }else{ ?><?php echo $_smarty_tpl->smarty->registered_plugins[smarty::PLUGIN_FUNCTION]['convertPrice'][0][0]->convertPrice(array('price'=>$_smarty_tpl->tpl_vars['product']->value['price_tax_exc']),$_smarty_tpl);?>

Link to comment
Share on other sites

Voila le code du fichier hometopproduct.tpl original situé dans le dossier du module hometopproduct :

 

<!-- MODULE Home Top Products -->
{if isset($products) AND $products}
<section id="top-products_block_center_mod" class="block products_block clearfix">
    <h4>{l s='top products' mod='hometopproduct'}</h4>

        <div class="block_content">
            {assign var='nbItemsPerLine' value=4}
            {assign var='nbLi' value=$products|@count}


            <div id="top_products_slider"  class="flexslider_carousel">
          <ul class="slides">
    {foreach from=$products item=product name=hometopproducts}
<li class="ajax_block_product {if $smarty.foreach.hometopproducts.first}first_item{elseif $smarty.foreach.hometopproducts.last}last_item{else}item{/if} {if $smarty.foreach.hometopproducts.iteration%$nbItemsPerLine == 0}last_item_of_line{elseif $smarty.foreach.hometopproducts.iteration%$nbItemsPerLine == 1} {/if} {if $smarty.foreach.hometopproducts.iteration > ($smarty.foreach.hometopproducts.total - ($smarty.foreach.hometopproducts.total % $nbItemsPerLine))}last_line{/if}">
                    <a href="{$product.link}" title="{$product.name|escape:html:'UTF-8'}" class="product_image"><img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_default')}" alt="{$product.name|escape:html:'UTF-8'}" />
                    {if isset($product.new) && $product.new == 1}<span class="new">{l s='New' mod='hometopproduct'}</span>{/if}
                    {if isset($product.on_sale) && $product.on_sale && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}<span class="on_sale {if isset($product.new) && $product.new == 1} on_sale2{/if}">{l s='On sale!' mod='hometopproduct'}</span>
                {elseif isset($product.reduction) && $product.reduction && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}<span class="on_sale {if isset($product.new) && $product.new == 1} on_sale2{/if}">{l s='Reduced price!' mod='hometopproduct'}</span>{/if}
                    </a>






                    <h5><a href="{$product.link}" title="{$product.name|truncate:50:'...'|escape:'htmlall':'UTF-8'}">{$product.name|truncate:46:'...'|escape:'htmlall':'UTF-8'}</a></h5>
                            {if $product.show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE}<p class="price_container"><span class="price">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span>{if isset($product.reduction) && $product.reduction}
           <span class="old_price">{convertPrice price=$product.price_without_reduction}</span>
           {/if}</p>{else}<div style="height:21px;"></div>{/if}
                <div>
                        {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}

                            {if ($product.quantity > 0 OR $product.allow_oosp)}
                            <a class="exclusive ajax_add_to_cart_button" rel="ajax_id_product_{$product.id_product}" href="{$link->getPageLink('cart.php')}?qty=1&id_product={$product.id_product}&token={$static_token}&add" title="{l s='Add to cart' mod='hometopproduct'}">{l s='Add to cart' mod='hometopproduct'}</a>
                            {else}
                            <a class="exclusive ajax_add_to_cart_button"  href="{$product.link}" title="{$product.name|escape:'htmlall':'UTF-8'}">{l s='View' mod='hometopproduct'}</a>
                            {/if}
                        {else}
                                                <a class="exclusive ajax_add_to_cart_button" href="{$product.link}" title="{$product.name|escape:'htmlall':'UTF-8'}">{l s='View' mod='hometopproduct'}</a>
                           {/if}</div>
                </li>
    {/foreach}
  </ul>
        </div>

        </div>


</section>
{/if}
<!-- /MODULE Home top Products -->

Link to comment
Share on other sites

Problème en partie résolu

J'ai modifié <p class="price_container"><span class="price">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span>

par <p class="price_container"><span class="price">{$product.price}</span>  

 

Par contre je n'ai toujours pas l'affichage des réductions barrées et des pictos...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...