Jump to content

[ASTUCE 1.6] Supprimer affichage 0% fiche produit


Recommended Posts

Bonjour, j'avais un soucis d'affichage sur la fiche produit. Quand il n'y avait plus de promotion sur un produit, il s'affichait encore -0%. 

Je vous donne l'astuce pour ne plus que ça s'affiche

Dans product.tpl

Remplacer :

<p id="reduction_percent" {if !$product->specificPrice || $product->specificPrice.reduction_type != 'percentage'} style="display:none;"{/if}>

Par :

<p id="reduction_percent" {if !$product->specificPrice || $product->specificPrice.reduction_type != 'percentage' || $product->specificPrice.reduction ==0} style="display:none;"{/if}>

Voilà, j'espère que ça aidera

Link to comment
Share on other sites

Dans le thème par défaut le code est conforme pourtant:

								<p id="reduction_percent" {if $productPriceWithoutReduction <= 0 || !$product->specificPrice || $product->specificPrice.reduction_type != 'percentage'} style="display:none;"{/if}>{strip}
									<span id="reduction_percent_display">
										{if $product->specificPrice && $product->specificPrice.reduction_type == 'percentage'}-{$product->specificPrice.reduction*100}%{/if}
									</span>
								{/strip}</p>
								<p id="reduction_amount" {if $productPriceWithoutReduction <= 0 || !$product->specificPrice || $product->specificPrice.reduction_type != 'amount' || $product->specificPrice.reduction|floatval ==0} style="display:none"{/if}>{strip}
									<span id="reduction_amount_display">
									{if $product->specificPrice && $product->specificPrice.reduction_type == 'amount' && $product->specificPrice.reduction|floatval !=0}
										-{convertPrice price=$productPriceWithoutReduction|floatval-$productPrice|floatval}
									{/if}
									</span>
								{/strip}</p>

 

  • Like 1
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...