Guest Posted November 20, 2008 Share Posted November 20, 2008 Hi everybody, i´ve installed this contribution and seems to work well. However, what i´m trying to do is to set some hidden products so i can provide my clients with the url and they do the checkout proccess as well. I mean, i want to have that products hidden for the rest of the site visitors, but when i disable the hidden products category, it disables the products too. Any ideas on this? Please help! Thanks in advance and sorry for my bad english Juan P. Corti Quote Link to comment Share on other sites More sharing options...
lildog Posted November 20, 2008 Share Posted November 20, 2008 This contrib won't do that. There is one that does though, but i do not remember the name. Search the contribs page or maybe someone here can remember the name. lildog Hi everybody, i´ve installed this contribution and seems to work well. However, what i´m trying to do is to set some hidden products so i can provide my clients with the url and they do the checkout proccess as well. I mean, i want to have that products hidden for the rest of the site visitors, but when i disable the hidden products category, it disables the products too. Any ideas on this? Please help! Thanks in advance and sorry for my bad english Juan P. Corti Quote Link to comment Share on other sites More sharing options...
Waiti Posted December 18, 2008 Share Posted December 18, 2008 Hi there, i've got a problem with this script. The script works but i cant see any products ;-) here is the error message Unser Angebot 1054 - Unknown column 'p.products_id' in 'on clause' select count(p.products_id) as total from products_description pd, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id, products_to_categories p2c left join specials s on p.products_id = s.products_id left join categories c on c.categories_id = p2c.categories_id where c.categories_status = '1' and p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '2' and p2c.categories_id = '31' [TEP STOP] thank' for help! Alex Quote Link to comment Share on other sites More sharing options...
Waiti Posted December 18, 2008 Share Posted December 18, 2008 (edited) Hi there, i've got a problem with this script. The script works but i cant see any products ;-) here is the error message Unser Angebot 1054 - Unknown column 'p.products_id' in 'on clause' select count(p.products_id) as total from products_description pd, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id, products_to_categories p2c left join specials s on p.products_id = s.products_id left join categories c on c.categories_id = p2c.categories_id where c.categories_status = '1' and p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '2' and p2c.categories_id = '31' [TEP STOP] thank' for help! Alex Hello again, if found the problem. It's a compability problem with MySQL 5!!! short summary: before every "left join" -place a ")" and before that left join should be the "select from "........" " SQL statement. -place a "(" directly after from old code1: $products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_CATEGORIES . " c on p2c.categories_id = c.categories_id where p.products_id = p2c.products_id and c.categories_status = '1' and p.products_status = '1' and p2c.categories_id = '" . (int)$category_id . "'"); new code1: $products_query = tep_db_query("select count(*) as total from (" . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c) left join " . TABLE_CATEGORIES . " c on p2c.categories_id = c.categories_id where p.products_id = p2c.products_id and c.categories_status = '1' and p.products_status = '1' and p2c.categories_id = '" . (int)$category_id . "'"); old code2: $model_query = tep_db_query("select p.products_model from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c on p.products_id = p2c.products_id left join " . TABLE_CATEGORIES . " c on p2c.categories_id = c.categories_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd where c.categories_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and p.products_id = pd.products_id"); new code2: $model_query = tep_db_query("select p.products_model from ((" . TABLE_PRODUCTS . " p) left join " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c on p.products_id = p2c.products_id) left join " . TABLE_CATEGORIES . " c on p2c.categories_id = c.categories_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd where c.categories_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and p.products_id = pd.products_id"); If you don't understand the above instruction try an english one ;-) :lol: Here is a linkt!!! Error Message - 1054 - Unknown column 'p.products_id' in 'on clause' Read the how_to_fix_1054_error.txt See ya Alex. Sorry for my english :blush: Edited December 18, 2008 by Waiti Quote Link to comment Share on other sites More sharing options...
lildog Posted December 18, 2008 Share Posted December 18, 2008 (edited) Waiti, Thanks for the fix. Do you know if the new code will also work with php4.x? If so I will add it into the contrib. lildog BTW, the english was fine.....:) Hello again, if found the problem. It's a compability problem with MySQL 5!!! short summary: before every "left join" -place a ")" and before that left join should be the "select from "........" " SQL statement. -place a "(" directly after from.... Edited December 18, 2008 by lildog Quote Link to comment Share on other sites More sharing options...
Waiti Posted December 19, 2008 Share Posted December 19, 2008 Waiti, Thanks for the fix. Do you know if the new code will also work with php4.x? If so I will add it into the contrib. lildog BTW, the english was fine.....:) That's a good question... can't tell you but i think it works too it woult be great if someone out here could test that on a php4 database. I wish you all a white x-mas. Alex Quote Link to comment Share on other sites More sharing options...
sdowns Posted January 1, 2009 Share Posted January 1, 2009 (edited) :rolleyes: Enable/Disable Manufacturers would be great too! Edited January 1, 2009 by sdowns Quote Link to comment Share on other sites More sharing options...
sdowns Posted January 2, 2009 Share Posted January 2, 2009 After installing Disable/Enable Categories I have the same error: 1054 - Unknown column 'p.products_image_med' in 'field list'. This error message is only shown on the bottom of the Categories pages where the New Products infobox* should be. It must be related to this: when I imported enable_disable_categories.sql, I got the following error from phpMyAdmin: #1060 - Duplicate column name 'categories_status. :rolleyes: Any ideas what is causing the sql error? * In my case its the Featured Products v1.6.3 infobox. Quote Link to comment Share on other sites More sharing options...
sdowns Posted January 2, 2009 Share Posted January 2, 2009 After installing Disable/Enable Categories I have the same error: 1054 - Unknown column 'p.products_image_med' in 'field list'. This error message is only shown on the bottom of the Categories pages where the New Products infobox* should be. It must be related to this: when I imported enable_disable_categories.sql, I got the following error from phpMyAdmin: #1060 - Duplicate column name 'categories_status. :rolleyes: Any ideas what is causing the sql error? * In my case its the Featured Products v1.6.3 infobox. :blush: Turns out it was caused by index.php in Featured Products v1.6.3. Quote Link to comment Share on other sites More sharing options...
tony-ch Posted January 30, 2009 Share Posted January 30, 2009 :blush: Turns out it was caused by index.php in Featured Products v1.6.3. Hi sdowns I have exactly the same problem...I got also the same error when I was running the enable_disable_categories.sql Have you been able to fix it in the meantime? Quote Link to comment Share on other sites More sharing options...
volau Posted February 11, 2009 Share Posted February 11, 2009 Yes, unless there disabled. I found this package way overcomplex for the task, You could use Hide Categories & Products http://addons.oscommerce.com/info/5907 which is a much simpler package, but does the same job for the most part. I see this is for For OScommerce2.2 rc1 Will it work for OScommerce 2.2 rc2a ? Quote Link to comment Share on other sites More sharing options...
RMH Posted May 10, 2009 Share Posted May 10, 2009 Thank you for a very good contribution. I've got it up and running, but I have installed a contribution to show the featured products on the main page, and it will still show products in hidden categories. Could somebody help me modifying this file (catalog/includes/modules/featured.php) so that it will work with enable/disable categories?: <?php /* osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2002 osCommerce Released under the GNU General Public License Featured Products V1.1 Displays a list of featured products, selected from admin For use as an Infobox instead of the "New Products" Infobox */ ?> <!-- featured_products //--> <?php if(FEATURED_PRODUCTS_DISPLAY == 'true') { $featured_products_category_id = $new_products_category_id; $cat_name_query = tep_db_query("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . $featured_products_category_id . "' limit 1"); $cat_name_fetch = tep_db_fetch_array($cat_name_query); $cat_name = $cat_name_fetch['categories_name']; $info_box_contents = array(); if ( (!isset($featured_products_category_id)) || ($featured_products_category_id == '0') ) { $info_box_contents[] = array('align' => 'left', 'text' => '<a class="headerNavigation" href="' . tep_href_link(FILENAME_FEATURED_PRODUCTS) . '">' . TABLE_HEADING_FEATURED_PRODUCTS . '</a>'); list($usec, $sec) = explode(' ', microtime()); srand( (float) $sec + ((float) $usec * 100000) ); $mtm= rand(); $featured_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, s.status as specstat, s.specials_new_products_price, p.products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id left join " . TABLE_FEATURED . " f on p.products_id = f.products_id where p.products_status = '1' and f.status = '1' order by rand($mtm) DESC limit " . MAX_DISPLAY_FEATURED_PRODUCTS); } else { $info_box_contents[] = array('align' => 'left', 'text' => sprintf(TABLE_HEADING_FEATURED_PRODUCTS_CATEGORY, $cat_name)); $subcategories_array = array(); tep_get_subcategories($subcategories_array, $featured_products_category_id); $featured_products_category_id_list = tep_array_values_to_string($subcategories_array); if ($featured_products_category_id_list == '') { $featured_products_category_id_list .= $featured_products_category_id; } else { $featured_products_category_id_list .= ',' . $featured_products_category_id; } $featured_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, s.status as specstat, s.specials_new_products_price, p.products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c using(products_id) left join " . TABLE_CATEGORIES . " c using(categories_id) left join " . TABLE_FEATURED . " f on p.products_id = f.products_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where c.parent_id = '" . $featured_products_category_id . "' and p.products_status = '1' and f.status = '1' order by rand() DESC limit " . MAX_DISPLAY_FEATURED_PRODUCTS); } $row = 0; $col = 0; $num = 0; while ($featured_products = tep_db_fetch_array($featured_products_query)) { $num ++; if ($num == 1) { new infoBoxHeading($info_box_contents, false, false); } $featured_products['products_name'] = tep_get_products_name($featured_products['products_id']); if($featured_products['specstat']) { $info_box_contents[$row][$col] = array('align' => 'center', 'params' => 'class="smallText" width="33%" valign="top"', 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $featured_products['products_image'], $featured_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products['products_id']) . '">' . $featured_products['products_name'] . '</a><br><s>' . $currencies->display_price($featured_products['products_price'], tep_get_tax_rate($featured_products['products_tax_class_id'])) . '</s><br><span class="productSpecialPrice">' . $currencies->display_price($featured_products['specials_new_products_price'], tep_get_tax_rate($featured_products['products_tax_class_id'])) . '</span>'); } else { $info_box_contents[$row][$col] = array('align' => 'center', 'params' => 'class="smallText" width="33%" valign="top"', 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $featured_products['products_image'], $featured_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products['products_id']) . '">' . $featured_products['products_name'] . '</a><br>' . $currencies->display_price($featured_products['products_price'], tep_get_tax_rate($featured_products['products_tax_class_id']))); } $col ++; if ($col > 2) { $col = 0; $row ++; } } if($num) { new contentBox($info_box_contents); } } else // If it's disabled, then include the original New Products box { // include (DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); // disable for dont show if desactive the feature module } ?><!-- featured_products_eof //--> Quote Link to comment Share on other sites More sharing options...
spooks Posted May 10, 2009 Share Posted May 10, 2009 its been done, based on my hide category contrib Quote Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
RMH Posted May 11, 2009 Share Posted May 11, 2009 its been done, based on my hide category contrib OK, but I'm using the Enable & Disable Categories module v.1.6.6 (http://addons.oscommerce.com/info/326). It's working like it shall on the normal featured products, but I can't get it to work on the featured products contribution that enables futured products to be displayed on the main page instead of new products. (See my last post) Quote Link to comment Share on other sites More sharing options...
RMH Posted May 12, 2009 Share Posted May 12, 2009 I have updated to the last version of the Future products contribution, but I still can't make it work with Enable/Disable categories. I would be very gratefull if somebody could help me edit the file below :) : <?php /* $Id: featured.php,v 1.7 2008/08/22 22:30:20 aa0001 Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2002 osCommerce Released under the GNU General Public License Featured Products V1.1 Displays a list of featured products, selected from admin For use as an Infobox instead of the "New Products" Infobox */ ?> <!-- featured_products //--> <?php if( defined('FEATURED_PRODUCTS_DISPLAY') AND FEATURED_PRODUCTS_DISPLAY == 'true' ) { $featured_products_category_id = $new_products_category_id; $cat_name_query = tep_db_query('SELECT `categories_name` FROM ' . TABLE_CATEGORIES_DESCRIPTION . " WHERE `categories_id` = '" . $featured_products_category_id . "' limit 1"); $cat_name_fetch = tep_db_fetch_array($cat_name_query); $cat_name = $cat_name_fetch['categories_name']; $info_box_contents = array(); list($usec, $sec) = explode(' ', microtime()); srand( (float) $sec + ((float) $usec * 100000) ); $mtm= rand(); if ( (!isset($featured_products_category_id)) || ($featured_products_category_id == '0') ) { $info_box_contents[] = array('align' => 'left', 'text' => '<a class="headerNavigation" href="' . tep_href_link(FILENAME_FEATURED_PRODUCTS) . '">' . TABLE_HEADING_FEATURED_PRODUCTS . '</a>'); // Phocea Optimize featured query // Ben: Option to only show featured products on sale $query = 'SELECT p.products_id, p.products_image, p.products_tax_class_id, IF (s.status, s.specials_new_products_price, NULL) AS specials_new_products_price, p.products_price, pd.products_name '; if ( defined('FEATURED_PRODUCTS_SPECIALS_ONLY') AND FEATURED_PRODUCTS_SPECIALS_ONLY == 'true' ) { $query .= 'FROM ' . TABLE_SPECIALS . ' s LEFT JOIN ' . TABLE_PRODUCTS . ' p ON s.products_id = p.products_id '; } else { $query .= 'FROM ' . TABLE_PRODUCTS . ' p LEFT JOIN ' . TABLE_SPECIALS . ' s ON p.products_id = s.products_id '; } $query .= 'LEFT JOIN ' . TABLE_PRODUCTS_DESCRIPTION . " pd ON p.products_id = pd.products_id AND pd.language_id = '" . $languages_id . "' LEFT JOIN " . TABLE_FEATURED . " f ON p.products_id = f.products_id WHERE p.products_status = '1' AND f.status = '1' order by rand($mtm) DESC limit " . MAX_DISPLAY_FEATURED_PRODUCTS; $featured_products_query = tep_db_query( $query ); } else { $info_box_contents[] = array('align' => 'left', 'text' => sprintf(TABLE_HEADING_FEATURED_PRODUCTS_CATEGORY, $cat_name)); $subcategories_array = array(); tep_get_subcategories($subcategories_array, $featured_products_category_id); $featured_products_category_id_list = tep_array_values_to_string($subcategories_array); if ($featured_products_category_id_list == '') { $featured_products_category_id_list .= $featured_products_category_id; } else { $featured_products_category_id_list .= ',' . $featured_products_category_id; } if ( defined('FEATURED_PRODUCTS_SUB_CATEGORIES') AND FEATURED_PRODUCTS_SUB_CATEGORIES == 'true' ) { // current catID as starting value $cats[] = $new_products_category_id; // put cat-IDs of all cats nested in current branch into $cats array, // go through all subbranches for($i=0; $i<count($cats); $i++) { $categorie_query = tep_db_query('SELECT `categories_id` FROM ' . TABLE_CATEGORIES . " WHERE parent_id = '" . (int)$cats[$i] . "'"); while ($categorie = tep_db_fetch_array($categorie_query)) { $cats[] = $categorie['categories_id']; } // sort out doubles $cats = array_unique($cats); } $catIdSql = implode(', ', $cats); } else { $catIdSql = $featured_products_category_id_list; } // Phocea Optimize featured query $query = 'SELECT distinct p.products_id, p.products_image, p.products_tax_class_id, IF (s.status, s.specials_new_products_price, NULL) AS specials_new_products_price, p.products_price, pd.products_name FROM ' . TABLE_PRODUCTS . ' p LEFT JOIN ' . TABLE_PRODUCTS_TO_CATEGORIES . ' p2c using(products_id) LEFT JOIN ' . TABLE_CATEGORIES . ' c USING (categories_id) LEFT JOIN ' . TABLE_FEATURED . ' f ON p.products_id = f.products_id LEFT JOIN ' . TABLE_SPECIALS . ' s ON p.products_id = s.products_id LEFT JOIN ' . TABLE_PRODUCTS_DESCRIPTION . " pd ON p.products_id = pd.products_id AND pd.language_id = '" . $languages_id . "' where c.categories_id IN(" . $catIdSql . ") AND p.products_status = '1' AND f.status = '1' "; if ( defined('FEATURED_PRODUCTS_SPECIALS_ONLY') AND FEATURED_PRODUCTS_SPECIALS_ONLY == 'true' ) { $query .= " AND s.status = '1' "; } $query .= 'ORDER BY rand(' . $mtm . ') DESC LIMIT ' . MAX_DISPLAY_FEATURED_PRODUCTS; $featured_products_query = tep_db_query( $query ); } $row = 0; $col = 0; $num = 0; while ($featured_products = tep_db_fetch_array($featured_products_query)) { $num ++; if ($num == 1) { new infoBoxHeading($info_box_contents, false, false); } // If on special show regular and sale price if (tep_not_null($featured_products['specials_new_products_price'])) { $products_price = '<s>' . $currencies->display_price($featured_products['products_price'], tep_get_tax_rate($featured_products['products_tax_class_id'])) . '</s><br>'; $products_price .= '<span class="productSpecialPrice">' . $currencies->display_price($featured_products['specials_new_products_price'], tep_get_tax_rate($featured_products['products_tax_class_id'])) . '</span>'; } else { $products_price = $currencies->display_price($featured_products['products_price'], tep_get_tax_rate($featured_products['products_tax_class_id'])); } $info_box_contents[$row][$col] = array('align' => 'center', 'params' => 'class="smallText" width="33%" valign="top"', 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $featured_products['products_image'], $featured_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products['products_id']) . '">' . $featured_products['products_name'] . '</a><br>' . $products_price); $col ++; if ($col > 2) { $col = 0; $row ++; } } if($num) { new contentBox($info_box_contents); } } else { // If it's disabled, then include the original New Products box // include (DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); // disable for dont show if desactive the feature module } ?><!-- featured_products_eof //--> Quote Link to comment Share on other sites More sharing options...
spooks Posted May 12, 2009 Share Posted May 12, 2009 I know u seem to like this, but as I mentioned b4 I created a hide category contrib b4 writing that I looked at this & found it way over complex, with loads of un-neccessary code, that whyn I did my own Hide Categories & Products http://addons.oscommerce.com/info/5907 is a simple consise contrib that does the same job as this (for the most part) whats more applying it to pages need only a tiny change, so very easy. Still if u prefer to struggle!! ;) Quote Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
sjjustina Posted May 20, 2009 Share Posted May 20, 2009 Sam, Thank you for your "hide products" contribution. It should do what I need it to do but I'm having a problem. Considering I'm am new to PHP, but I have some good SQL, ASP skills, but. I know this is a general question but I don't know where to look so I'm hoping you can point me to which files may be the culprit. (Never try to edit code while your ADHD friend is chattering away at you!) The Admin module is working fine no errors. The problem is the index.php is returning 500 errors. I restored only the index.php from a backup and still get the error so I assume the index is calling other files. I did install STS successfully and tested it before starting your contribution. I didn't change anything else unrelated to your fix so it was working before I installed your contribution. This is my first osCommerce site and it's definitely been a LEARNING experience. I hope you can point me in a direction to start looking, I'm getting cross-eyed Thanks, Sarah Quote Link to comment Share on other sites More sharing options...
KJ666 Posted November 16, 2009 Share Posted November 16, 2009 (edited) I just instilled this but i am having a problem, i have took a cat out of the box on the left, and added a link in the nav bar what i want is so that the sub-cats still show, how could i do this ?? Also it shows the products (but no sub-cats which i need), but when you click the product it says it is not found?? Click here for the page in question! Edited November 16, 2009 by KJ666 Quote Link to comment Share on other sites More sharing options...
halluzineyt Posted February 12, 2010 Share Posted February 12, 2010 (edited) Hello I got some problems.. i been installing another adons for multiple categories selection then i got some errors.. i backed up but i used the previous file before i instaled this adon "enable disable category" then when after that i used now my backup which contain enable disable categories then the category which i disabled disappeared .. the bad thing is i just hide it so it wont show in categories on homepage but it contains product and i will add more on it.. how will it return back?? Edited February 12, 2010 by halluzineyt Quote Link to comment Share on other sites More sharing options...
halluzineyt Posted February 12, 2010 Share Posted February 12, 2010 I know u seem to like this, but as I mentioned b4 I created a hide category contrib b4 writing that I looked at this & found it way over complex, with loads of un-neccessary code, that whyn I did my own Hide Categories & Products http://addons.oscommerce.com/info/5907 is a simple consise contrib that does the same job as this (for the most part) whats more applying it to pages need only a tiny change, so very easy. Still if u prefer to struggle!! ;) sam can your contribution hide only the category but not the product inside it so you can still link to them on the site? Quote Link to comment Share on other sites More sharing options...
apapazov Posted April 13, 2010 Share Posted April 13, 2010 the attention of all who receive an error message 1054 - Unknown column 'p.products_id' in 'on clause' in the index you must have the following form of the paragraph: // We show them all // BOF Enable & Disable Categories $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from ((" . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p) left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c) left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id left join " . TABLE_CATEGORIES . " c on c.categories_id = p2c.categories_id where c.categories_status = '1' and p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; // EOF Enable & Disable Categories with this code replace the existing Quote Link to comment Share on other sites More sharing options...
websissy Posted April 14, 2010 Share Posted April 14, 2010 (edited) the attention of all who receive an error message 1054 - Unknown column 'p.products_id' in 'on clause' I struggled all day today to get this contribution and all its updates installed. Just when I thought I was finished, my tests turned up this *&^$%#@ error: 1054 - Unknown column 'p.products_id' in 'on clause' I fought this one for 4 hours until I had cross-checked everything and was convinced I had made no errors in applying the patches. Finally, in frustration, I came here looking for an answer and there was YOUR answer posted here just 10 hours ago. Hallelujah!! And thanks for saving my sanity! :thumbsup: Edited April 14, 2010 by websissy Quote Link to comment Share on other sites More sharing options...
webcomm Posted September 22, 2010 Share Posted September 22, 2010 My version is 2.2rc2a, so it looks like I need to do the manual installation described in INSTALL.txt. Are those changes in lieu of uploading the files in the contribution? In other words, instead of uploading the files in the contribution, I should download the files from my server, make the changes indicated in INSTALL.txt, and then upload those files. I will not be using the PHP files in the contribution at all -- correct? Thanks, Ryan Quote Link to comment Share on other sites More sharing options...
dsaltmer Posted August 20, 2012 Share Posted August 20, 2012 Hi - I've just installed this contribution into my 2.3.1 installation today, had the 1054 problem and corrected it as I was told and it is working, existing categories are shown and hidden as they are supposed to be. There is a problem however - I can't now create any new categories! Any idea why this would happen? Is it a permission thing? I hope someone can help! Quote Link to comment Share on other sites More sharing options...
♥geoffreywalton Posted December 15, 2012 Share Posted December 15, 2012 If you get an error on the maufacturer screen after making the latest corrction in the add-on history try this in /includes/classes/split_page_results.php FIND: $count_query = tep_db_query("select count(" . $count_string . ") as total " . substr($this->sql_query, $pos_from, ($pos_to - $pos_from))); comment it out. And under it add: $count_query = tep_db_query("select count(*) as total from (" . $this->sql_query . ") AS derivedtable1"); Found it hidden up in an archived thread with nothing to do with this. HTH G Quote Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile Virus Threat Scanner My Contributions Basic install answers. Click here for Contributions / Add Ons. UK your site. Site Move. Basic design info. For links mentioned in old answers that are no longer here follow this link Useful Threads. If this post was useful, click the Like This button over there ======>>>>>. 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.