If this is your first visit, check our documentation. To post, register or login.

changes to index.php

Started by charliepingpong on 29 Oct 2011, 2:14 AM · Views: 725

Results 1 to 5 of 5
29 Oct 2011, 2:14 AM
#1
charliepingpong avatar

charliepingpong

Zen Follower

Join Date:
May 2011
Location:
NSW
Posts:
169
Plugin Contributions:
0

Post #1 by charliepingpong

made changes to index.php so 'no products to display in this category' was deleted and then saved the file in my text editor and uploaded it to includes-languages - english- myfolder but when i did that my whole page went blank???

i left original index.php untouched in directory before myfolder...

what have i done wrong?

i'm forced to edit original file and myfolder becomes obsolete :censored:

29 Oct 2011, 2:27 AM
#2
charliepingpong avatar

charliepingpong

Zen Follower

Join Date:
May 2011
Location:
NSW
Posts:
169
Plugin Contributions:
0

Post #2 by charliepingpong

http://getzenned.com/2010/01/05/removing-there-are-no-products-to-list-in-this-category/
**
THIS IS WRONG** if you follow below instructions and make no sytax error- it throws a blank page

Removing “There are no products to list in this category”
January 5th, 2010
There may be times when you want to set up a category on your zen cart that does not have any items to purchase in it. For example, it could be something important that you want displayed in your category box with information or images in it.

When you create a category that does not have any products in it, zen cart will automatically insert the following line at the bottom of that category page:

“There are no products to list in this category”

If you would like to get rid of this, you need to edit the includes/ languages/ english/ YOUR CUSTOM FOLDER/ index.php file. If you use an HTML editor, you need to go to around line 81 and you will see the following:

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

Simply edit that line by taking out the sentence – being careful to not delete the quote marks. So you would end up with the following:

define(‘TEXT_NO_PRODUCTS’, ”);

29 Oct 2011, 2:49 AM
#3
nigelt74 avatar

nigelt74

Totally Zenned

Join Date:
Sep 2005
Location:
Waikato, New Zealand
Posts:
1,558
Plugin Contributions:
1

Post #3 by nigelt74

Thats the normal way of preventing that message displaying it should work, it means you have done something wrong, i have just tested it and it works perfectly well for me.

What error are you getting in your cache folder, I assume you read the FAQ on getting blank pages and how to work out what is wrong

https://www.zen-cart.com/tutorials/index.php?article=82

Webzings Design
Semi retired from Web Design

29 Oct 2011, 2:51 AM
#4
usernamenone avatar

usernamenone

Totally Zenned

Join Date:
Sep 2006
Posts:
541
Plugin Contributions:
0

Post #4 by usernamenone

The instructions are correct but the commas are pointing in the same way which will cause error which will cause blank page.

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

to remove in between

define('TEXT_NO_PRODUCTS', ' ');


Play with it long enough and you will break it.
29 Oct 2011, 5:47 AM
#5
charliepingpong avatar

charliepingpong

Zen Follower

Join Date:
May 2011
Location:
NSW
Posts:
169
Plugin Contributions:
0

Post #5 by charliepingpong

Solved- i needed to leave a gap between quotes where text was but that is weird because i don't see gap in example- anyway its working now thanks