Zen Cart Logo
Forums / Setting Up Specials and SaleMaker / How to insert line break on sale display

How to insert line break on sale display

Views: 1,954

Results 1 to 3 of 3
6 Jan 2011, 3:58 PM
#1
runawayd avatar

runawayd

New Zenner

Join Date:
May 2010
Posts:
16
Plugin Contributions:
0

How to insert line break on sale display

We set up a sale using Salemaker but on the product category pages the text display appears as "Sale: $XX.XXSave: XX% off" with no space or line break between the sale price and the word "Save." On the product pages it's perfect - the text appears on 2 separate lines.

Does anyone know how I can insert a line break on the category pages in between the sale price and the word "Save"? I have tried to edit several files but it doesn't work so I must be looking at the wrong files or missing something.

You can see what I'm talking about if you go to http://www.organicwearapparel.com/index.php?main_page=index&cPath=1_17

In case it's relevant, we're using version 1.3.8a. Any help would be greatly appreciated.

6 Jan 2011, 4:27 PM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: How to insert line break on sale display

It's on two lines in my stock test site, so it looks like you're missing a <br/> in includes/functions/functions_prices.php, though I don't know why/if you edited that file. If you haven't, try replacing it with a fresh copy.

Use the Developers Tool Kit to search for productpricediscount.

25 Mar 2011, 9:20 PM
#3
wickerliving avatar

wickerliving

New Zenner

Join Date:
Jan 2011
Location:
Hellertown, PA
Posts:
4
Plugin Contributions:
0

Re: How to insert line break on sale display

runawayd:

We set up a sale using Salemaker but on the product category pages the text display appears as "Sale: $XX.XXSave: XX% off" with no space or line break between the sale price and the word "Save." On the product pages it's perfect - the text appears on 2 separate lines.

Does anyone know how I can insert a line break on the category pages in between the sale price and the word "Save"? I have tried to edit several files but it doesn't work so I must be looking at the wrong files or missing something.

You can see what I'm talking about if you go to http://www.organicwearapparel.com/index.php?main_page=index&cPath=1_17

In case it's relevant, we're using version 1.3.8a. Any help would be greatly appreciated.

It sure looks like your missing the break tad <br /> is there. The funny part is there IS a break tag in your details page but its not in the correct spot. Its a bit odd that its working in both our browsers but Im sure there is at least one browser it will cause an error on. Here is the code I pulled from inspecting your code

YOUR PRODUCT LISTING PAGE

<div class="listingDescription"></div> <span class="normalprice">$31.50 </span> <span class="productSalePrice">Sale: $26.78</span>

*There should be a break tag between the two lines of code for "normalprice" and "productSalePrice"
*Also note that the old tag <br> has been discontinued and the correct code is now <br />. But also be sure your css code references the correct one too. Using a find and replace program such as textwrangler will make it easy to find and edit that.

*Note below that the break tag is not correctly placed. Although it may work in your browser it should actually be placed between the </span> and the <span class..... tags. Where it is currently placed the Sale Price line is technically just being stretched to both lines. It may cause an error in certain browsers.

YOUR PRODUCT "DETAILS" PAGE

<!--bof Product Price block --> <span class="products_price" > <span class="normalprice">$31.50 </span> <br /> <span class="productSalePrice">Sale: $26.78</span> <span class="productPriceDiscount"><br />Save: 15% off</span> </span> <!--eof Product Price block -->

Try downloading the Google Chrome browser if you haven't already. Open up any web page in question. Right click on the element (in this case the sale price) and click on the "INSPECT ELEMENT" option.
You will see a list of the code pop up below and if you hover your mouse over each line you will see it highlight the section of the webpage above.