Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Broken Links


ChrisHoward

Recommended Posts

Posted

Hi,

 

I've recently come across this error on a site of mine:

 

Product not found!

 

When a result is clicked from the advanced_search.php page? The link that the products are going to are as follows for example:

 

http://www.ohmhealthcare.com/product_info....products_id/124

 

Could it be the /manufacturers_id// thats causing the problem and if so where can I change this?

 

Thanks in advance.

Chris :)

  • 1 month later...
Posted
Could it be the /manufacturers_id// thats causing the problem and if so where can I change this?

 

I have the EXACT same problem. After doing an advanced search, my links are coming up as

 

...westvillagedesign.com/product_info.php/manufacturers_id//products_id/33909...

 

Help please, anyone!

Posted

Guess what, I found a solution!

 

If you don't have any need for the manufacurer's search option, simpley comment this part out in the advanced search form. To do this, find advanced_search.php in your top directory for oscommerce. Find the following lines of code and add <!-- before the first <tr> and --> after the last </tr>. This has solved my problem anyhow.

 

<tr>
??<td class="fieldKey"><?php echo ENTRY_MANUFACTURERS; ?></td>
??<td class="fieldValue"><?php echo tep_draw_pull_down_menu('manufacturers_id', 
tep_get_manufacturers(array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS)))); ?></td>
</tr>

 

Hope that helps you.

 

Diana.

  • 5 months later...
Posted
Guess what, I found a solution!

 

If you don't have any need for the manufacurer's search option, simpley comment this part out in the advanced search form. To do this, find advanced_search.php in your top directory for oscommerce. Find the following lines of code and add <!-- before the first <tr> and --> after the last </tr>. This has solved my problem anyhow.

 

<tr>
 <td class="fieldKey"><?php echo ENTRY_MANUFACTURERS; ?></td>
 <td class="fieldValue"><?php echo tep_draw_pull_down_menu('manufacturers_id', 
tep_get_manufacturers(array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS)))); ?></td>
</tr>

 

Hope that helps you.

 

Diana.

 

Diana, thats not a solution! its a workaround.

 

The culprit here is the file catalog/includes/modules/product_listing.php

 

When you do an advanced search without selecting a manufacturer it still sets the 'manufacturer_id' but it sets it to '' (empty)

 

You need to edit "catalog/includes/modules/product_listing.php"

Approx line 97 there is a case statment for PRODUCT_LIST_NAME (I've added mods so may be different)

 

====

Change:

if (isset($HTTP_GET_VARS['manufacturers_id']) {

To:

if (isset($HTTP_GET_VARS['manufacturers_id']) && is_numeric($HTTP_GET_VARS['manufacturers_id'])) {

====

 

Should work now.

 

This is a known bug:

http://www.oscommerce.com/community/bugs,1...uct_listing.php

 

I use is_numeric() instead of tep_not_null() as a manufacturers_id should always be numeric

 

jfp

Archived

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

×
×
  • Create New...