Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Problem with code?


jpmad4it

Recommended Posts

Posted

Hello everyone,

 

If you go here:

 

http://boogaloobaby.co.uk/index.php?cPath=48

 

You'll see that above my Manufacturer's names, there are 10 lines with the character 'n' in them. I have no idea where this has come from, but i'm guessing that it may be the part of a new line code that has not been written correctly. Can anyone point me to the correct file so I can have a look for any errors? :blink:

 

Kind regards,

Jp

Posted

It's caused by using the file manager in admin to edit files. That script is broken and should not be used unless you install the latest oscommerce patch for it. To remove the "n" you will need to replace all instances of it in the file that was edited with a "\n".

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Posted
It's caused by using the file manager in admin to edit files. That script is broken and should not be used unless you install the latest oscommerce patch for it. To remove the "n" you will need to replace all instances of it in the file that was edited with a "\n".

 

Jack

 

Hey, I've never used the file manager, I always use an FTP program. So where can I find those n's?? I'm not sure which script to look in?

Posted
Hey, I've never used the file manager, I always use an FTP program. So where can I find those n's?? I'm not sure which script to look in?

 

Fixed it, in the code in the index.php file I found this code:

 

 $rows = 0;
while ($categories = tep_db_fetch_array($categories_query)) {
  $rows++;
  $cPath_new = tep_get_path($categories['categories_id']);
  $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";
  }

 

As you can see there are 3 new line tags that are not correct. I just fixed them with "\n" and the problem is solved i think :rolleyes:

Archived

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

×
×
  • Create New...