Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

how to new drop down menu in search info box


developer_x

Recommended Posts

hi all,

 

 

my client wants to modify the search info box. he wants to display a drop down menu

 

consisting of all the possible values of a field say "x" of products table. after some

 

research i came to know dat the drop down menu of categories works thru the usage of 2

 

functions.

 

1---tep_draw_pull_down_menu( ) [dont remember the parameters.sorry]

 

2---function tep_get_categories($categories_array = '', $parent_id = '0', $indent = '')

 

i saw the usage of both on the advance_search.php page. i somehow showed the categories

 

drop down menu on the search info box. now i want to make a similar drop down menu inside

 

the search info box. user will select an option from it to do search.

 

firstly i thought it would be nice if i make a fuction similar to function no 2 which would

 

retrieve the field 'x' from products table. i made one but when i tried to access the main

 

page i got this message in the left column:

 

 

 

**************

Fatal error: Maximum execution time of 30 seconds exceeded in

 

c:\web\catalog\includes\functions\database.php on line 44

 

Fatal error: Maximum execution time of 30 seconds exceeded in

 

c:\web\catalog\includes\functions\sessions.php on line 37

 

Warning: Unknown(): A session is active. You cannot change the session module's ini

 

settings at this time. in Unknown on line 0

*********

then i hit upon another idea. i just change the orignal database query of the funtion

 

(function tep_get_categories($categories_array = '', $parent_id = '0', $indent = '')) .

instead of:

 

 

$categories_query = tep_db_query("select c.categories_id, cd.categories_name from " .

 

TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where parent_id = '" .

 

(int)$parent_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" .

 

(int)$languages_id . "' order by sort_order, cd.categories_name");

 

 

now it says:

 

 

$categories_query = tep_db_query("select c.categories_id, p.products_price from " .

 

TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS . " p, " . TABLE_CATEGORIES_DESCRIPTION . " cd

 

where parent_id = '" . (int)$parent_id . "' and c.categories_id = cd.categories_id and

 

cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");

 

i thought if it works with the products_field of products table, it will work with any

 

other field 2. but i get the same error again.

some one kindly help me. i have to get this task done ASAP.

Irfan,

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...