osCommerce Community Support Forums: "n" help- letter appearing in product category - osCommerce Community Support Forums

Jump to content

Corporate Sponsor


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

"n" help- letter appearing in product category letter appearing in product category Rate Topic: -----

#1 User is offline   ozmium Icon

  • Find Posts
  • Group: Community Member
  • Posts: 23
  • Joined: 20-September 04
  • Real Name:Amanda

Posted 05 November 2004 - 05:25 PM

Hi, I have these n leters appearing in the table for the product categories.
Not quite sure what I did- (have been trying to do some contrib installs.

Any advice on what file to look at to get rid of these?

thanks
amanda :huh:
0

#2 User is offline   241 Icon

  • Find Posts
  • Group: Community Member
  • Posts: 6,181
  • Joined: 24-October 03
  • Real Name:Stephen Bissett
  • Location:Scotland

Posted 05 November 2004 - 05:28 PM

ISSUE:
Display shows the 'n' character in index page when categories are selected.

You have edited the index.php using the online file manager which has removed the \ backslashes from the code, this is a known issue with using the file manager to edit files, it is better to use an ftp program such as ws_ftp to download the file and edit it locally then ftp back to the server.

FIX:
To fix this issue you will need to find the 4 instances of "n"; on your index.php and change them to "\n";

around line #104 look for this code
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"; 
      } 
    }

change to this
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"; 
      } 
    }

and then around line #256 look for this code
while ($filterlist = tep_db_fetch_array($filterlist_query)) { 
          $options[] = array('id' => $filterlist['id'], 'text' => $filterlist['name']); 
        } 
        echo tep_draw_pull_down_menu('filter_id', $options, (isset($HTTP_GET_VARS['filter_id']) ? $HTTP_GET_VARS['filter_id'] : ''), 'onchange="this.form.submit()"'); 
        echo '</form></td>' . "n"; 
      } 
    }

and change to this
while ($filterlist = tep_db_fetch_array($filterlist_query)) { 
          $options[] = array('id' => $filterlist['id'], 'text' => $filterlist['name']); 
        } 
        echo tep_draw_pull_down_menu('filter_id', $options, (isset($HTTP_GET_VARS['filter_id']) ? $HTTP_GET_VARS['filter_id'] : ''), 'onchange="this.form.submit()"'); 
        echo '</form></td>' . "\n"; 
      } 
    }

No longer giving free advice. Please place deposit in meter slot provided. Posted Image Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! Posted Image


Support The Project
Documentation/Knowledgebase/Discussions
My Contributions
0

#3 User is offline   ozmium Icon

  • Find Posts
  • Group: Community Member
  • Posts: 23
  • Joined: 20-September 04
  • Real Name:Amanda

Posted 06 November 2004 - 03:18 PM

THANKS so much for your help! fixed it! :lol:
0

#4 User is offline   bhavatmaj Icon

  • Find Posts
  • Group: Community Member
  • Posts: 49
  • Joined: 12-March 09
  • Real Name:Bhavatmaj
  • Gender:Male
  • Location:India

Posted 22 April 2009 - 06:31 AM

thanks
bhavatmaj
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic