Zen Cart Logo
Forums / Code Collaboration / adding manufacturers id to advanced search button

adding manufacturers id to advanced search button

Views: 2,693

Results 1 to 4 of 4
15 Jul 2013, 5:35 PM
#1
jeffiec avatar

jeffiec

New Zenner

Join Date:
Jun 2009
Posts:
86
Plugin Contributions:
0

adding manufacturers id to advanced search button

Trying to create a button for advanced search, trying to add to this statement:
/index.php?main_page=advanced_search_result&search_in_description=1 &keyword="+document.getElementById('partnum1').value;

Trying to add $manufacturer_id=1, tried both:

/index.php?main_page=advanced_search_result&$manufacturer_id=1&search_in_description=1&keyword="+document.getElementById('partnum1').value;
/index.php?main_page=advanced_search_result&search_in_description=1&keyword="+document.getElementById('partnum1').value+"&$manufacturer_id=1";
neither 1 works, bith show a blank page after the heading and generate an error log :
PHP Fatal error: Call to undefined function zen_get_products_model() in /home/total/public_html/includes/modules/total/product_listing.php on line 140
Pulling what little hair i have left out, and advice would be great.
Jeff
oh, link lol:
http://totalequipmentparts.com/index.php?main_page=home_dev

15 Jul 2013, 9:25 PM
#2
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: adding manufacturers id to advanced search button

jeffiec:

PHP Fatal error: Call to undefined function zen_get_products_model() in /home/total/public_html/includes/modules/total/product_listing.php on line 140

That means exactly what it says: the function zen_get_products_model() is not defined. Is that an extra_function eg part of some plugin? And what is the function supposed to do?

I believe your template name is yorkshire_clean, so where does includes/modules/total/product_listing.php come from?

15 Jul 2013, 10:01 PM
#3
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: adding manufacturers id to advanced search button

/index.php?main_page=advanced_search_result&$manufacturer_id=1&search_in_descript ion=1&keyword="+document.getElementById('partnum1').value;You never use a $ (indicating a PHP variable) this way in a URL. Try &manufacturer_id=1 in the URL. (This will most likely not affect the other error you are getting.)

Also make sure that manufacturer_id is the correct name of the variable.

16 Jul 2013, 7:38 AM
#4
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: adding manufacturers id to advanced search button

Continuing from Glenn's post the correct variable is $manufacturers_id (or manufacturers_id depending where it is used).