Jump to content

Description courte / Block Prix


Recommended Posts

hello,

 

yes, c'est tout bête, ça se passe dans le template product.tpl

la description courte se présente comme ça (en haut de left infos)

	   	 {if $product->description_short}
			<div id="short_description_content" class="rte align_justify">{$product->description_short}</div>
		{/if}

tope-la et mets-la sous le bloc repéré par le commentaire

<!--prices-->

et le tour est joué

 

have swing

Link to comment
Share on other sites

hello,

 

rafraîchir ne suffit souvent pas, le mieux est soit de supprimer froidement tous les fichiers dans le dossier de cache de smarty sauf index.php, soit, ce que je fais en phase de dev, se mettre en config : préférences -> optimisation -> smarty forcer la compil oui et utiliser le cache non

ne pas oublier d'inverser une fois les modifs prises en compte, ce mode ralentit pas mal l'affichage et est assez nuisible en prod

 

have swing

Link to comment
Share on other sites

hello,

 

curieux... tu es bien sûr d'avoir mis ça

	   	 {if $product->description_short OR $packItems|@count > 0}


		<div id="short_description_block">
			{if $product->description_short}
				<div id="short_description_content" class="rte align_justify">{$product->description_short}</div>
			{/if}
			{if $product->description}
			<p class="buttons_bottom_block_bibi">» <a href="#" class="moredetails" id="moredetails">{l s='More details'}</a></p>
			{/if}
			{if $packItems|@count > 0}
				<h3>{l s='Pack content'}</h3>
				{foreach from=$packItems item=packItem}
					<div class="pack_content">
						{$packItem.pack_quantity} x <a href="{$link->getProductLink($packItem.id_product, $packItem.link_rewrite, $packItem.category)}">{$packItem.name|escape:'htmlall':'UTF-8'}</a>
						<p>{$packItem.description_short}</p>
					</div>
				{/foreach}
			{/if}
		</div>
		{/if}

sous la fin du bloc de prix qui se finit par

           	 {*close if for show price*}
           {/if}

 

have swing

Link to comment
Share on other sites

oui j'ai bien fait tout sa, mais rien y fait.

 

 

<!-- left infos-->
<div id="pb-left-column">
{if $product->description_short OR $packItems|@count > 0}
<div id="short_description_block">
{if $product->description_short}
<div id="short_description_content" class="rte align_justify">{$product->description_short}</div>
{/if}

{if $product->description}
<p class="buttons_bottom_block"><a href="javascript:{ldelim}{rdelim}" class="button">{l s='More details'}</a></p>
{/if}
{if $packItems|@count > 0}
<h3>{l s='Pack content'}</h3>
{foreach from=$packItems item=packItem}
<div class="pack_content">
{$packItem.pack_quantity} x <a href="{$link->getProductLink($packItem.id_product, $packItem.link_rewrite, $packItem.category)}">{$packItem.name|escape:'htmlall':'UTF-8'}</a>
<p>{$packItem.description_short}</p>
</div>
{/foreach}
{/if}
</div>
{/if}

<!--prices-->
{*close if for show price*}
{/if}

Link to comment
Share on other sites

hello,

 

ah non, mets-le sous le /if

je te mets une copie de mon template (pas mal modifié notamment dans le short description, je joue avec le description en js mais c'est l'idée)

       	 <!-- prices -->
           {if $product->show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE}
               <p class="price">
                   {if !$priceDisplay || $priceDisplay == 2}
                       {assign var='productPrice' value=$product->getPrice(true, $smarty.const.NULL, 2)}
                       {assign var='productPriceWithoutRedution' value=$product->getPriceWithoutReduct(false, $smarty.const.NULL)}
                   {elseif $priceDisplay == 1}
                       {assign var='productPrice' value=$product->getPrice(false, $smarty.const.NULL, 2)}
                       {assign var='productPriceWithoutRedution' value=$product->getPriceWithoutReduct(true, $smarty.const.NULL)}
                   {/if}
                   {if $product->on_sale}
                       <img src="{$img_dir}onsale_{$lang_iso}.gif" alt="{l s='On sale'}" class="on_sale_img"/>
                       <span class="on_sale">{l s='On sale!'}</span>
                   {elseif $product->specificPrice AND $product->specificPrice.reduction AND $productPriceWithoutRedution > $productPrice}
                       <span class="discount">{l s='Reduced price!'}</span>
                   {/if}

                   {l s='A partir de'} <span class="our_price_display">
                   {if $priceDisplay >= 0 && $priceDisplay <= 2}
                       <span id="our_price_display">{convertPrice price=$productPrice}</span>
                   {/if}
                   </span>
                   {if $priceDisplay == 2}
                       <br />
                       <span id="pretaxe_price"><span id="pretaxe_price_display">{convertPrice price=$product->getPrice(false, $smarty.const.NULL, 2)}</span> {l s='tax excl.'}</span>
                   {/if}

               </p>
               {if $product->specificPrice AND $product->specificPrice.reduction}
                   <p id="old_price"><span class="bold">
                   {if $priceDisplay >= 0 && $priceDisplay <= 2}
                       {if $productPriceWithoutRedution > $productPrice}
                           <span id="old_price_display">{convertPrice price=$productPriceWithoutRedution}</span>
                               {if $tax_enabled && $display_tax_label == 1}
                                   {if $priceDisplay == 1}{l s='tax excl.'}{else}{l s='tax incl.'}{/if}
                               {/if}
                       {/if}
                   {/if}
                   </span>
                   </p>

               {/if}
               {if $product->specificPrice AND $product->specificPrice.reduction_type == 'percentage'}
                   <p id="reduction_percent">{l s='(price reduced by'} <span id="reduction_percent_display">{$product->specificPrice.reduction*100}</span> %{l s=')'}</p>
               {/if}
               {if $packItems|@count}
                   <p class="pack_price">{l s='instead of'} <span style="text-decoration: line-through;">{convertPrice price=$product->getNoPackPrice()}</span></p>
                   <br class="clear" />
               {/if}
               {if $product->ecotax != 0}
                   <p class="price-ecotax">{l s='include'} <span id="ecotax_price_display">{if $priceDisplay == 2}{$ecotax_tax_exc|convertAndFormatPrice}{else}{$ecotax_tax_inc|convertAndFormatPrice}{/if}</span> {l s='for green tax'}
                       {if $product->specificPrice AND $product->specificPrice.reduction}
                       <br />{l s='(not impacted by the discount)'}
                       {/if}
                   </p>
               {/if}
               {if !empty($product->unity) && $product->unit_price_ratio > 0.000000}
              	 {math equation="pprice / punit_price"  pprice=$productPrice  punit_price=$product->unit_price_ratio assign=unit_price}
                   <p class="unit-price"><span id="unit_price_display">{convertPrice price=$unit_price}</span> {l s='per'} {$product->unity|escape:'htmlall':'UTF-8'}</p>
               {/if}
               {*close if for show price*}
           {/if}

           <!--description courte-->
           {if $product->description_short OR $packItems|@count > 0}
           <div id="short_description_block">
               {if $product->description_short}
                   <div id="short_description_content" class="rte align_justify">{$product->description_short}</div>
               {/if}
               {if $product->description}
               <p class="buttons_bottom_block_bibi">» <a href="#" class="moredetails" id="moredetails">{l s='More details'}</a></p>
               {/if}
               {if $packItems|@count > 0}
                   <h3>{l s='Pack content'}</h3>
                   {foreach from=$packItems item=packItem}
                       <div class="pack_content">
                           {$packItem.pack_quantity} x <a href="{$link->getProductLink($packItem.id_product, $packItem.link_rewrite, $packItem.category)}">{$packItem.name|escape:'htmlall':'UTF-8'}</a>
                           <p>{$packItem.description_short}</p>
                       </div>
                   {/foreach}
               {/if}
           </div>
           {/if}

 

have swing

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...