rmyles Posted February 19, 2003 Share Posted February 19, 2003 Hi there, I'm trying to install the admin tool for the headertags controller but I've run into a problem I'm hoping someone could help me out with: in admin/categories.php I'm supposed to find the line: } elseif ($HTTP_GET_VARS['action'] == 'new_product') { if ( ($HTTP_GET_VARS['pID']) && (!$HTTP_POST_VARS) ) { $product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . $HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "'"); $product = tep_db_fetch_array($product_query); I've looked at every elseif statement and can't seem to find this piece of code. I'm using ver2.2 Thanks in advance Quote Link to comment Share on other sites More sharing options...
Ajeh Posted February 20, 2003 Share Posted February 20, 2003 That is a rather old peice of code that I wrote and the Admin Richard wrote for me was done a couple days after. Search for: 'new_product' And see if there isn't something similar there. Quote Link to comment Share on other sites More sharing options...
rmyles Posted February 20, 2003 Author Share Posted February 20, 2003 Hi Linda, There is a similar line but it's an if statement and I figured it could mean a vastly different thing. Here it is, maybe you can tell me I should replace it instead: if ($HTTP_GET_VARS['action'] == 'new_product') { if ( ($HTTP_GET_VARS['pID']) && (!$HTTP_POST_VARS) ) { $product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . $HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "'"); $product = tep_db_fetch_array($product_query); Thanks for responding Linda Quote Link to comment Share on other sites More sharing options...
Ajeh Posted February 20, 2003 Share Posted February 20, 2003 Basically, anywhere you find products_model there has to be a reference to the two new fields in the same way. So if you find it in 6 places, you need to add the 3 fields in those 6 places. You can also look at Ian Wilson's Load4 or Load5 and see how the categories.php page is changed to utilize the Header Tags Controller for the Admin side. Quote Link to comment Share on other sites More sharing options...
rmyles Posted February 20, 2003 Author Share Posted February 20, 2003 Unbelievable! After reading this instruction several dozen times I was actually able to get this to work. Thanks so much Linda! Quote Link to comment Share on other sites More sharing options...
Ajeh Posted February 21, 2003 Share Posted February 21, 2003 You are most welcome. Glad it gave you a push in the right direction. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.