Forums / Templates, Stylesheets, Page Layout / Changing default text on a category page with no items

Changing default text on a category page with no items

Locked

Views: 1,276

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
10 Aug 2010, 4:56 PM
#1
otha avatar

otha

New Zenner

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

Changing default text on a category page with no items

Hello,

There is a line of default text which is displayed when you click on a category item, where there is not yet any product listed. The text is as follows:

"There are no products to list in this category."

Where in the code can I change this default text? I tried finding the sentance by searhing the local folder but came up with, "nothing found".

Thanks in advance,

May the Zen be with you ~Otha

10 Aug 2010, 5:07 PM
#2
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: Changing default text on a category page with no items

My search found it in index.php (various folders). You should change it in

includes/languages/english/YOUR_TEMPLATE/index.php (where YOUR_TEMPLATE is the name of your custom template). Depending on your version, it might be around line 40.

 define('TEXT_NO_PRODUCTS', 'There are no products to list in this category.');  

Mary Ellen
I came; I saw; I Zenned
Taking over the world... one website at a time
Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

Holzheimer
Fan Odyssey

10 Aug 2010, 6:39 PM
#3
otha avatar

otha

New Zenner

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

Re: Changing default text on a category page with no items

Hi afo,

Thanks for your quick reply! I found the text as you directed. Oddly enough, when I change it, the page won't display at all. The only difference I can see is that the original text is 46 charaacters long and the text I replaced it with is 75 characters long. Is there a limitation on the length of the text in this part of the code?

May the Zen be with you ~Otha

10 Aug 2010, 8:46 PM
#4
otha avatar

otha

New Zenner

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

Re: Changing default text on a category page with no items

I found the solution to my last question. The page would not display because in the new text I placed in the code, there was a word with a comma (') in it. I needed to use the escape code for the comma: '

May the Zen be with you ~Otha

11 Aug 2010, 2:48 AM
#5
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: Changing default text on a category page with no items

' isn't a comma. , is a comma. ' is an apostrophe and, yes, it needs to be escaped. Glad you found the answer. :smile:

Mary Ellen
I came; I saw; I Zenned
Taking over the world... one website at a time
Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

Holzheimer
Fan Odyssey

11 Aug 2010, 4:31 AM
#6
gilby avatar

gilby

Totally Zenned

Join Date:
Aug 2005
Location:
Vic, Oz
Posts:
1,816
Plugin Contributions:
0

Re: Changing default text on a category page with no items

Otha:

Hello,

There is a line of default text which is displayed when you click on a category item, where there is not yet any product listed. The text is as follows:

"There are no products to list in this category."

Where in the code can I change this default text? I tried finding the sentance by searhing the local folder but came up with, "nothing found".

Thanks in advance,

Why not just disable (hide) the category until you do have products in it.
It annoys customers when they click on categories expecting to find something, only to find it empty.
(imo)