Results 1 to 6 of 6
  1. #1
    Join Date
    May 2010
    Posts
    32
    Plugin Contributions
    0

    Default 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,
    Last edited by Otha; 10 Aug 2010 at 05:58 PM. Reason: clarification
    May the Zen be with you ~Otha

  2. #2
    Join Date
    Aug 2004
    Location
    New York City
    Posts
    7,174
    Plugin Contributions
    0

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

    Code:
     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

  3. #3
    Join Date
    May 2010
    Posts
    32
    Plugin Contributions
    0

    Default 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

  4. #4
    Join Date
    May 2010
    Posts
    32
    Plugin Contributions
    0

    Default 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

  5. #5
    Join Date
    Aug 2004
    Location
    New York City
    Posts
    7,174
    Plugin Contributions
    0

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

  6. #6
    Join Date
    Aug 2005
    Location
    Vic, Oz
    Posts
    1,905
    Plugin Contributions
    5

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

    Quote Originally Posted by Otha View Post
    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)

 

 

Similar Threads

  1. Replies: 3
    Last Post: 2 Aug 2016, 01:03 PM
  2. v150 Changing Main Page Default text
    By The Gift Fairy in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 15 Feb 2012, 12:20 PM
  3. Changing Discount Coupon default Text
    By cactusrunning in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 11
    Last Post: 18 May 2010, 03:31 PM
  4. Replies: 9
    Last Post: 3 Mar 2008, 04:54 PM
  5. How to align item description text on ALL ITEMS page to mirror the category page?
    By shinyadornments in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 15 Feb 2008, 07:48 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg