Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

what that 'n' is in index file


ked

Recommended Posts

Posted

Hi,

a small problem...

if you go to my site

 

if you select a category and look at the statement at top that says 'Let's see what we have here'...........just above it there is a small 'n' that appeared from nowhere....

i wanted to get rid off this 'n'....

 

can anybody please let me know how can i remove it....and how did it appear....

 

thanks a lot in advance for your help.......

 

cheers,

 

Ked

Posted

Are you using the file manager included in osCommerce to edit your files? If so then don't :)... It has many bugs to say the least. Get yourself a good PHP/HTML editor (there are many free ones out there, start with Google and do a search) and also an FTP program. The issue you are seeing is common of the file manager issue.

 

If you are not, then you changed something somewhere and left an N in there or didn't close a quote in the right spot in your PHP.

Posted

Hi,

 

Thanks for your reply....

But...... do u know what......it only appears when i create a subcategory or add a product to existing category...

don't know what to do...and it causes mess in the subcategory listing...

so which file is causing this problem...is the index file in path oscommerce/index.php ......if so then i will look into it....i just want the file where i can see this problemm....

 

Cheers.

Ked

Posted

Hi,

There are 2 possibilities......I found the following code in my oscommerce/index.php file....

 

--------------------------------------------------------

$width = (int)(100 / MAX_DISPLAY_CATEGORIES_PER_ROW) . '%';

echo ' <td align="center" class="smallText" width="' . $width . '" valign="top"><a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . tep_image(DIR_WS_IMAGES . $categories['categories_image'], $categories['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '<br>' . $categories['categories_name'] . '</a></td>' . "n";

if ((($rows / MAX_DISPLAY_CATEGORIES_PER_ROW) == floor($rows / MAX_DISPLAY_CATEGORIES_PER_ROW)) && ($rows != $number_of_categories)) {

echo ' </tr>' . "n";

echo ' <tr>' . "n";

}

}

// needed for the new products module shown below

$new_products_category_id = $current_category_id;

?>

---------------------------------------------

there is another explaination here for oscommerce/includes/languages/english/index.php

 

To remove the text for TEXT_MAIN completely, the following example is used where only two single quote characters exist:<br><br><nobr>define(\'TEXT_MAIN\', \'\');</nobr><br><br>More information concerning the PHP define() function can be read <a href="http://www.php.net/define"

 

so do i have to keep the define function as

define('TEXT_MAIN','');

 

or

 

define('TEXT_MAIN','\');

 

in this file.....

 

-----------------------------------------------------------------

 

 

i am thinking about this problem in the code above...what do you suggest

Cheers,

Ked

Posted

i checked TEXT MAIN and seems alright...

 

define('TEXT_MAIN','');

 

 

but still not having joy as problems still there...

 

Ked

Posted

You are correct this is where your error is in the first piece of code you posted:

 

'</a></td>' . "n";

[\CODE]

 

should be:

 

[code]

'</a></td>' . "\n";

[\CODE]

 

On the define it it is:

 

define('MAIN_TEXT', '');

 

You only need to escape the quote when you are placing a quote inside of a quote. So for example:

 

define('MAIN_TEXT', 'You can\'t leave this quote without escaping it with the slash.');

Posted

Hey Jeff,

 

That was right.....perfect.....i actually removed the n from the code to look like

 

'</a></td>' . "";

 

but as per your suggestion i kept it as

 

'</a></td>' . "\n";

 

that was excellent....such a small problem....but really was getting annoyed with it....

 

Thanks for your reply...much appreciated:)

 

 

Ked

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...