Jump to content

(Solucionado) Colocar Precio Debajo Del Título


Recommended Posts

Buenas tardes.

Me gustaría que el precio del producto en esta página:

http://mantelycocina...troller=product

apareciese debajo del título del mismo, o de la descripción, entro en product.tpl y la verdad es que me hago un lío con tantísimo código, se que si no voy mal encaminada el código a mover sería el que viene después de <!-- prices --> pero nose hasta que parte de ese código ¿alquien me ilumina? ¡gracias!

Edited by Photonica (see edit history)
Link to comment
Share on other sites

Prueba esto que te comento y dime si es lo que quieres.

 

Ve al fichero:

 

/themes/mantelycocina/product.tpl

 

Busca esto:

 

<div class="price">
{if !$priceDisplay || $priceDisplay == 2}
 {assign var='productPrice' value=$product->getPrice(true, $smarty.const.NULL, $priceDisplayPrecision)}
 {assign var='productPriceWithoutReduction' value=$product->getPriceWithoutReduct(false, $smarty.const.NULL)}
{elseif $priceDisplay == 1}
 {assign var='productPrice' value=$product->getPrice(false, $smarty.const.NULL, $priceDisplayPrecision)}
 {assign var='productPriceWithoutReduction' value=$product->getPriceWithoutReduct(true, $smarty.const.NULL)}
{/if}
<p class="our_price_display">
{if $priceDisplay >= 0 && $priceDisplay <= 2}
 <span id="our_price_display">{convertPrice price=$productPrice}</span>
 <!--{if $tax_enabled  && ((isset($display_tax_label) && $display_tax_label == 1) OR !isset($display_tax_label))}
  {if $priceDisplay == 1}{l s='tax excl.'}{else}{l s='tax incl.'}{/if}
 {/if}-->
{/if}
</p>
{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 $productPriceWithoutReduction > $productPrice}
 <span class="discount">{l s='Reduced price!'}</span>
{/if}
{if $priceDisplay == 2}
 <br />
 <span id="pretaxe_price"><span id="pretaxe_price_display">{convertPrice price=$product->getPrice(false, $smarty.const.NULL)}</span> {l s='tax excl.'}</span>
{/if}
  </div>
  <p id="reduction_percent" {if !$product->specificPrice OR $product->specificPrice.reduction_type != 'percentage'} style="display:none;"{/if}><span id="reduction_percent_display">{if $product->specificPrice AND $product->specificPrice.reduction_type == 'percentage'}-{$product->specificPrice.reduction*100}%{/if}</span></p>
  <p id="reduction_amount" {if !$product->specificPrice OR $product->specificPrice.reduction_type != 'amount' && $product->specificPrice.reduction|intval ==0} style="display:none"{/if}><span id="reduction_amount_display">{if $product->specificPrice AND $product->specificPrice.reduction_type == 'amount' && $product->specificPrice.reduction|intval !=0}-{convertPrice price=$product->specificPrice.reduction|floatval}{/if}</span></p>
  {if $product->specificPrice AND $product->specificPrice.reduction}
<p id="old_price"><span class="bold">
{if $priceDisplay >= 0 && $priceDisplay <= 2}
 {if $productPriceWithoutReduction > $productPrice}
  <span id="old_price_display">{convertPrice price=$productPriceWithoutReduction}</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 $packItems|@count && $productPrice < $product->getNoPackPrice()}
<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}

 

Y prueba colocarlo debajo de:

 

 <h1>{$product->name|escape:'htmlall':'UTF-8'}</h1>

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...