Jump to content

Normal Price Blue Saleprice Red Ordernary Price Black


Recommended Posts

  • 8 months later...

I tried to come up with my own solution.  It works but isn't pretty.  Maybe someone can suggest a better way of writing it.

 

In the global.css file, I copied and pasted this code, changing ".price" to ".saleprice":

 

.saleprice {

  font-size: 14px;

  color: red; /* default black */

  white-space: nowrap;

  font-family: "Roboto", sans-serif;

  letter-spacing: 0;

}

 

Edited file product.tpl, copying this code:

 

<span id="our_price_display" class="price" itemprop="price" content="{$productPrice}">{convertPrice price=$productPrice|floatval}{/if}</span>

 

And pasted it just below itself, and then edited both copies like this:

 

<span id="our_price_display" class="price" itemprop="price" content="{$productPrice}">{if $productPriceWithoutReduction <= $productPrice}{convertPrice price=$productPrice|floatval}{/if}</span>

 

<span id="our_price_display" class="saleprice" itemprop="price" content="{$productPrice}">{if $productPriceWithoutReduction > $productPrice}{convertPrice price=$productPrice|floatval}{/if}</span>

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