JuDrYa Posted September 23, 2014 Share Posted September 23, 2014 Hola a tod@s. Necesito ocultar parte de un código si el precio NO tiene descuento... (Marcado en rojo) ----------------------------------------------------------------------------------------------------------------------------- <p class="our_price_display" itemprop="offers" itemscope itemtype="http://schema.org/Offer"> {if $product->quantity > 0}<link itemprop="availability" href="http://schema.org/InStock"/>{/if} {if $priceDisplay >= 0 && $priceDisplay <= 2} <span class="now_price_product">{l s='Now'}</span> </br> <span id="our_price_display" itemprop="price" style="font-size: 18px; font-weight: bold;"> {convertPrice price=$productPrice} </span> <span style="font-size: 12px; font-weight: bold;"> {if $tax_enabled && ((isset($display_tax_label) && $display_tax_label == 1) || !isset($display_tax_label))} {if $priceDisplay == 1}({l s='tax excl.'}){else}({l s='tax incl.'}){/if} </span> {/if} <meta itemprop="priceCurrency" content="{$currency->iso_code}" /> {/if} </p> <p id="old_price"{if (!$product->specificPrice || !$product->specificPrice.reduction) && $group_reduction == 0} class="hidden"{/if}> {if $priceDisplay >= 0 && $priceDisplay <= 2} <span class="before_price_product">{l s='Before'}</span> </br> <span id="old_price_display" style="font-size: 18px; font-weight: bold;"> {if $productPriceWithoutReduction > $productPrice}{convertPrice price=$productPriceWithoutReduction}{/if} </span> <span style="font-size: 12px; font-weight: bold;"> {if $tax_enabled && $display_tax_label == 1}{if $priceDisplay == 1}({l s='tax excl.'}){else}({l s='tax incl.'}){/if}{/if} {/if} </span> </p> {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} ----------------------------------------------------------------------------------------------------------------------------- PERDON por no meterlo en las etiquetas "Code" pero es que sino, no me deja remarcarlo en rojo. Link to comment Share on other sites More sharing options...
ventura Posted September 23, 2014 Share Posted September 23, 2014 Lo tienes un poco mas bajo de donde has puesto el codigo {if (!$product->specificPrice || !$product->specificPrice.reduction) && $group_reduction == 0} Link to comment Share on other sites More sharing options...
JuDrYa Posted September 23, 2014 Author Share Posted September 23, 2014 Gracias por contestar "ventura", pero me pierdo. Habia probado a poner eso asi... ----------------------------------------------------------------------------------------------------------------------------- <p class="our_price_display" itemprop="offers" itemscope itemtype="http://schema.org/Offer"> {if $product->quantity > 0}<link itemprop="availability" href="http://schema.org/InStock"/>{/if} {if $priceDisplay >= 0 && $priceDisplay <= 2} {if (!$product->specificPrice || !$product->specificPrice.reduction) && $group_reduction == 0} <span class="now_price_product">{l s='Now'}</span> </br> {/if} <span id="our_price_display" itemprop="price" style="font-size: 18px; font-weight: bold;"> {convertPrice price=$productPrice} </span> <span style="font-size: 12px; font-weight: bold;"> {if $tax_enabled && ((isset($display_tax_label) && $display_tax_label == 1) || !isset($display_tax_label))} {if $priceDisplay == 1}({l s='tax excl.'}){else}({l s='tax incl.'}){/if} </span> {/if} <meta itemprop="priceCurrency" content="{$currency->iso_code}" /> {/if} </p>----------------------------------------------------------------------------------------------------------------------------- Pero me lo oculta tenga o no descuento. Link to comment Share on other sites More sharing options...
JuDrYa Posted September 23, 2014 Author Share Posted September 23, 2014 Gracias, consegui solucionarlo. Link to comment Share on other sites More sharing options...
Recommended Posts