Jump to content

(SOLUCIONADO) Producto con precio normal y el mismo tachado


angeldavo

Recommended Posts

  • 1 year later...

Buenos días Angeldavo,

 

Tengo la misma incidencia, podrías aclarar como lo has solucionado, por favor? No consigo modificar mi código correctamente. Gracias!!

 

<!-- prices -->
                            <div class="price">
                                <p class="our_price_display" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
                                    <link itemprop="availability" {if $product->quantity <= 0}href="http://schema.org/OutOfStock"{else}href="http://schema.org/InStock"{/if}>
                                    {if $priceDisplay >= 0 && $priceDisplay <= 2}
                                        <span id="our_price_display" itemprop="price">{convertPrice price=$productPrice}</span>
                                        <!--{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}
                                        {/if}-->
                                        <meta itemprop="priceCurrency" content="{$currency->iso_code}" />
                                    {/if}
                                </p>
                                
                                <p id="old_price"{if (!$product->specificPrice || !$product->specificPrice.reduction) && $group_reduction == 1} class="hidden"{/if}>
                                    {if $priceDisplay >= 0 && $priceDisplay <= 2}
                                        <span id="old_price_display">{if $productPriceWithoutReduction > $productPrice}{convertPrice price=$productPriceWithoutReduction}{/if}</span>
                                        <!-- {if $tax_enabled && $display_tax_label == 1}{if $priceDisplay == 1}{l s='tax excl.'}{else}{l s='tax incl.'}{/if}{/if} -->
                                    {/if}
                                </p>
                                <p id="reduction_percent" {if !$product->specificPrice || $product->specificPrice.reduction_type != 'percentage'} style="display:none;"{/if}>
                                    <span id="reduction_percent_display">
                                        {if $product->specificPrice && $product->specificPrice.reduction_type == 'percentage'}-{$product->specificPrice.reduction*100}%{/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}
                            </div> <!-- end prices -->

Link to comment
Share on other sites

Buenas!

 

Por si le sirve a alguien más, he conseguido solucionarlo con la función de php number_format().

 

<span id="old_price_display">{if number_format($productPriceWithoutReduction,2) > number_format($productPrice,2)}{convertPrice price=$productPriceWithoutReduction}{/if}</span>

 

En esta página está explicado porque ocurre aunque a mi no me ha servido la solución me ha ayudado a solucionarlo:

https://www.vichaunter.org/como-se-hace/prestashop-muestra-el-precio-con-descuento-con-la-misma-cantidad-que-el-normal-sin-haberlo-configurado-solucionado

Link to comment
Share on other sites

  • 1 year later...

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