Jump to content

Condition si le produit est en promotion


Recommended Posts

Bonjour à tous,

 

Je voudrais modifier la couleur du prix en rouge si le produit est en promotion lorsqu'on est sur sa page.

 

Donc pour cela je suis allé sur le fichier product.tpl de mon thème et j'ai essayé de modifier le code afin d'y ajouter une condition qui n'y est pas par défaut. Mais sans succès ça ne marche pas.

 

Peut être que vous pourrez m'éclairer là-dessus.

 

Bonne journée,

 

Cordialement

<p class="our_price_display">
 {if $priceDisplay >= 0 && $priceDisplay <= 2}
      {if $product->on_sale}
           <span itemprop="price" id="our_price_display" class="discount_product">{convertPrice price=$productPrice}</span>
      {else}
	   <span itemprop="price" id="our_price_display" class="price">{convertPrice price=$productPrice}</span>
    <!-- CODE A NE PAS PRENDRE EN COMPTE
       {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}
 {/if}
</p>
#buy_block .our_price_display {
  font-family:Cuprum, sans-serif;
  font-size:22px;
  line-height:22px;
  color:#444;
  font-weight:300;
}

#buy_block .discount_product {
  font-family:Cuprum, sans-serif;
  font-size:22px;
  line-height:22px;
  color:#FF0000;
  font-weight:300;
}
Edited by aazarty (see edit history)
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...