soulspinr Posted July 29, 2005 Share Posted July 29, 2005 Do I have to install every single one of these files from the .zip? Forgive me, know about as much about .php as a rabid hamster...maybe less. Quote Link to comment Share on other sites More sharing options...
Salvage. Posted August 6, 2005 Share Posted August 6, 2005 Just curious, has anyone installed this with Product Sort Order contribution? I seem to be having some unknown compatibility issues. Quote Link to comment Share on other sites More sharing options...
Salvage. Posted August 9, 2005 Share Posted August 9, 2005 Still having problems with this, it seems that the field to check whether or not the category is enabled or not will not show up in admin, any advice? Quote Link to comment Share on other sites More sharing options...
Guest Posted August 13, 2005 Share Posted August 13, 2005 posted wrong forum first... oops forgive me  After installation, I get the error shown below if I click on either of the status lights. Changing status via Edit works fine. Fatal error: Call to undefined function: tep_set_categories_status() in /home/magn99to/public_html/catalog/admin/categories.php on line 40  I cannot seem to track this down... obviously I missed something.  Help!  Thanx! <{POST_SNAPBACK}> Quote Link to comment Share on other sites More sharing options...
inkan Posted August 19, 2005 Share Posted August 19, 2005 Hi! I just installed this great feature, and noticed a small bug. When listing products by choosing manufacturer from the start page in the drop down Manufacturers box, the products that are "linked" between sub categories are shown multiple times.  I think this is the same problem that was corrected earlier by inserting "distinct" etc in the SQL query in /catalog/products_new.php. I think something similar would solve this, as I recall, it should be done in the /catalog/boxes/manufacture_info.php file (but I am not 100% sure). Maybe someone with better MySQL query knowledge could help here?  Maybe this query (row 14 - 16) can be modified so that one product only show up once?    $manufacturer_query = tep_db_query("select m.manufacturers_id, m.manufacturers_name, m.manufacturers_image, mi.manufacturers_url from " . TABLE_MANUFACTURERS . " m left join " . TABLE_MANUFACTURERS_INFO . " mi on (m.manufacturers_id = mi.manufacturers_id and mi.languages_id = '" . (int)$languages_id . "'), " . TABLE_PRODUCTS . " p  where p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and p.manufacturers_id = m.manufacturers_id");   if (tep_db_num_rows($manufacturer_query)) {    $manufacturer = tep_db_fetch_array($manufacturer_query);   Besides this minor bug, I am really impressed by the feature, working with disabled categories really helps to be able to prepare new products in advance. Thanks everyone who has contributed with the code!!!  /Inkan in Sweden Quote Link to comment Share on other sites More sharing options...
inkan Posted August 19, 2005 Share Posted August 19, 2005 I have found the file now, the changes should be done in /catalog/includes/modules/upcoming_products.php  row 12:  $expected_query = tep_db_query("select p.products_id, pd.products_name, products_date_available as date_expected from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where to_days(products_date_available) >= to_days(now()) and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by " . EXPECTED_PRODUCTS_FIELD . " " . EXPECTED_PRODUCTS_SORT . " limit " . MAX_DISPLAY_UPCOMING_PRODUCTS);  This query should be corrected so that products don?t show up multiple times.  This is the listing on the first page (this months new products), so it is a little annoying.  Thanks in advance for any suggestions!  /Inkan in Sweden Quote Link to comment Share on other sites More sharing options...
dandelion Posted September 2, 2005 Share Posted September 2, 2005 I've just installed this contribution and it works very well except that it's not working with the main categories in front page contribution found here  Can anyone help me figure this one out?  THANKS Quote Link to comment Share on other sites More sharing options...
CAnneB2 Posted September 21, 2005 Share Posted September 21, 2005 Still having problems with this, it seems that the field to check whether or not the category is enabled or not will not show up in admin, any advice? <{POST_SNAPBACK}> Â Has anyone been able to figure this out? Â I seem to have the same problem. I am unable to: Â 1) view the status "lights" graphics (yes, graphics are uploaded to admin/images directory), Â 2) disable/enable any category in admin/categories.php (main page), Â 3) see any option to disable/enable when editing or creating a new category. Â TIA! Â Chris B. Quote Link to comment Share on other sites More sharing options...
linkwireless Posted September 21, 2005 Share Posted September 21, 2005 I had installed this contrib and it works great! But I also have the jcssmenu contrib installed as well and does not work with this menu. The jcssmenu shows all categories regardless of enabled or disabled. Anyone else using jcssmenu with this contrib? Anyone have any ideas where I should look to get this to work with jcssmenu? :huh: Â Thanks in advance & for this contrib! Quote Link to comment Share on other sites More sharing options...
Guest Posted October 2, 2005 Share Posted October 2, 2005 Hi Guys I had installed too this mod on my Creload and I adapted it... It works almost great but products in disabled categories are still reachable using URL... :( Can't find where is the problem... HEEEEEEEEEEEP ........ :blush: :lol: Â dandelion, here comes the modified request of my main_categories.php ... Â // #################### Added Enable / Disable Categories ############## // $query = "select c.categories_id, cd.categories_name, c.parent_id, c.categories_image from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION ." cd where c.categories_id = cd.categories_id"; $query = "select c.categories_id, cd.categories_name, c.parent_id, c.categories_image from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION ." cd where c.categories_id = cd.categories_id and c.categories_status = '1' "; // #################### End Added Enable / Disable Categories ############## Â Enjoy ;) Quote Link to comment Share on other sites More sharing options...
Guest Posted October 19, 2005 Share Posted October 19, 2005 Same problems as others I think...  The contrib. removes the category from the ?list box?, but ?Main Categories? box still lists the category I want to deactivate.  Any ideas?   Neil   I've just installed this contribution and it works very well except that it's not working with the main categories in front page contribution found here Can anyone help me figure this one out?  THANKS   Did you ever solve this? Quote Link to comment Share on other sites More sharing options...
dandelion Posted October 19, 2005 Share Posted October 19, 2005 Same problems as others I think... The contrib. removes the category from the ?list box?, but ?Main Categories? box still lists the category I want to deactivate.  Any ideas? Neil Did you ever solve this? Actually it is solved but I have no idea how. monika in germany was working on fixing a code problem that I couldn't resolve and she fixed it for me a the same time. You could pm her and ask what she did. Quote Link to comment Share on other sites More sharing options...
dandelion Posted October 30, 2005 Share Posted October 30, 2005 (edited) Okay here's the mess I'm in now. I'm starting a new store for a new client. I didn't want to add all the contributions again so I've uploaded the Aromatherapy for You.com files and database to the new store space and I'm editing it. The problem is the enable disable categories isn't allowing me to enable any categories.  I get this Fatal error >_< (do they have to call it fatal error - sounds like it can't be fixed and I'm dead)  Fatal error: Call to undefined function: tep_set_categories_status() in /var/www/html/catalog/admin/categories.php on line 48  I've checked this file and it's the same as the file has all the correct changes. Here is that section of code   // // ####################### Added Categories Enable / Disable ############### case 'setflag_cat': if ( ($HTTP_GET_VARS['flag'] == '0') || ($HTTP_GET_VARS['flag'] == '1') ) { if (isset($HTTP_GET_VARS['cID'])) { tep_set_categories_status($HTTP_GET_VARS['cID'], $HTTP_GET_VARS['flag']); } if (USE_CACHE == 'true') { tep_reset_cache_block('categories'); tep_reset_cache_block('also_purchased'); } } tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $HTTP_GET_VARS['cPath'] . '&cID=' . $HTTP_GET_VARS['cID'])); break; // ####################### End Categories Enable / Disable ###############  Help PLEASE!  Here is the site Edited October 30, 2005 by dandelion Quote Link to comment Share on other sites More sharing options...
♥Monika in Germany Posted October 30, 2005 Share Posted October 30, 2005 Okay here's the mess I'm in now. I'm starting a new store for a new client. I didn't want to add all the contributions again so I've uploaded the Aromatherapy for You.com files and database to the new store space and I'm editing it. The problem is the enable disable categories isn't allowing me to enable any categories. I get this Fatal error >_< (do they have to call it fatal error - sounds like it can't be fixed and I'm dead)  Fatal error: Call to undefined function: tep_set_categories_status() in /var/www/html/catalog/admin/categories.php on line 48  I've checked this file and it's the same as the file has all the correct changes. Here is that section of code // // ####################### Added Categories Enable / Disable ############### case 'setflag_cat': if ( ($HTTP_GET_VARS['flag'] == '0') || ($HTTP_GET_VARS['flag'] == '1') ) { if (isset($HTTP_GET_VARS['cID'])) { tep_set_categories_status($HTTP_GET_VARS['cID'], $HTTP_GET_VARS['flag']); } if (USE_CACHE == 'true') { tep_reset_cache_block('categories'); tep_reset_cache_block('also_purchased'); } } tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $HTTP_GET_VARS['cPath'] . '&cID=' . $HTTP_GET_VARS['cID'])); break; // ####################### End Categories Enable / Disable ###############  Help PLEASE!  Here is the site  Hi Ruth,  this is an easy one ... for some reason, the files you uploaded to the new site were not current. the function is missing in admin/includes/general.php  so what I would do backup what you have right now according to design changes, redownload the working site from Aromatherapy and upload tothe new spot. There may be more surrpises if you do not proceed this way. Quick fix would be to just redownload the general file and upload to new spot. Quote :-) Monika  addicted to writing code ... can't get enough of databases either, LOL!  my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum  Interactive Media Award July 2007 ~ category E-Commerce my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ... Link to comment Share on other sites More sharing options...
dandelion Posted October 31, 2005 Share Posted October 31, 2005 Monika thank you so much - All fixed up now! Â Okay guys here's another one - the disable doesn't remove the categories from the sitemap. Quote Link to comment Share on other sites More sharing options...
♥Monika in Germany Posted October 31, 2005 Share Posted October 31, 2005 Monika thank you so much - All fixed up now! Okay guys here's another one - the disable doesn't remove the categories from the sitemap.  same issue as with the new products ... it's just not in the query.  Post your query sql form that page! Quote :-) Monika  addicted to writing code ... can't get enough of databases either, LOL!  my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum  Interactive Media Award July 2007 ~ category E-Commerce my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ... Link to comment Share on other sites More sharing options...
dandelion Posted December 1, 2005 Share Posted December 1, 2005 Here is a problem with this contribution - it automatically changed the status in the admin to inactive so if my client went in to edit a category it would default to inactive and he would unintentionally lose his category! My oscommerce pal Monika in Germany fixed it up for me - here's what she did.  In categories.php  // ####################### Added Categories Enable / Disable ############### // $sql_data_array = array('sort_order' => $sort_order); // $categories_status = tep_db_prepare_input($HTTP_POST_VARS['categories_status']); //changed by Monika for inactive bug // $sql_data_array = array('sort_order' => $sort_order, 'categories_status' => $categories_status, 'pricebreak' => $pricebreak); $sql_data_array = array('sort_order' => $sort_order, 'pricebreak' => $pricebreak); // ####################### End Added Categories Enable / Disable ###############  Hope this helps someone else too - Thanks Monika! Quote Link to comment Share on other sites More sharing options...
fritzsmith Posted December 7, 2005 Share Posted December 7, 2005 Setting the category not to default to "inactive" after editing. Monika's code seemed to have been modified from the original. Â Mine looked like the below. Â // ####################### Added Categories Enable / Disable ############### // $sql_data_array = array('sort_order' => $sort_order); $categories_status = tep_db_prepare_input($HTTP_POST_VARS['categories_status']); $sql_data_array = array('sort_order' => $sort_order, 'categories_status' => $categories_status); // ####################### End Added Categories Enable / Disable ############### Â I commented out all the lines and it seems to work fine now. Â // ####################### Added Categories Enable / Disable ############### // $sql_data_array = array('sort_order' => $sort_order); // below 2 lines commented out to default for category status to remain the same // $categories_status = tep_db_prepare_input($HTTP_POST_VARS['categories_status']); // $sql_data_array = array('sort_order' => $sort_order, 'categories_status' => $categories_status); // ####################### End Added Categories Enable / Disable ############### Â I've been looking for how to do it for weeks. All credit goes to Monika. Â Thank you, Thank you Quote Link to comment Share on other sites More sharing options...
♥Monika in Germany Posted December 7, 2005 Share Posted December 7, 2005 (edited) Setting the category not to default to "inactive" after editing.Monika's code seemed to have been modified from the original.  Mine looked like the below.  // ####################### Added Categories Enable / Disable ############### // $sql_data_array = array('sort_order' => $sort_order); $categories_status = tep_db_prepare_input($HTTP_POST_VARS['categories_status']); $sql_data_array = array('sort_order' => $sort_order, 'categories_status' => $categories_status); // ####################### End Added Categories Enable / Disable ###############  I commented out all the lines and it seems to work fine now.  // ####################### Added Categories Enable / Disable ############### // $sql_data_array = array('sort_order' => $sort_order); // below 2 lines commented out to default for category status to remain the same // $categories_status = tep_db_prepare_input($HTTP_POST_VARS['categories_status']); // $sql_data_array = array('sort_order' => $sort_order, 'categories_status' => $categories_status); // ####################### End Added Categories Enable / Disable ###############  I've been looking for how to do it for weeks. All credit goes to Monika.  Thank you, Thank you  Hi,  Ruth forgot to remove the custom mod she has in her code ;-)  this is what yours SHOULD look like, or you will never again be able to edit sort order!!!  // ####################### Added Categories Enable / Disable ###############$sql_data_array = array('sort_order' => $sort_order); // commented back in by Monika so sorting is possible // below 2 lines commented out to default for category status to remain the same // $categories_status = tep_db_prepare_input($HTTP_POST_VARS['categories_status']); // $sql_data_array = array('sort_order' => $sort_order, 'categories_status' => $categories_status); // ####################### End Added Categories Enable / Disable ############### Edited December 7, 2005 by Monika in Germany Quote :-) Monika  addicted to writing code ... can't get enough of databases either, LOL!  my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum  Interactive Media Award July 2007 ~ category E-Commerce my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ... Link to comment Share on other sites More sharing options...
wavemonkey Posted February 3, 2006 Share Posted February 3, 2006 HELP??!!! Â Hello, I have a mildly modified site and am having difficulties with getting the Enable/Disable Categories mod to work. Â After the configuration of my files as per the documentation, I find that: Â 1. My Category Administration page, displays a new column "status" for each category. This column however has no red/green button, and indeed I cannot find anywhere to modify this status. Â So, the following problems are all occurring, which I'm assuming are only coming from the inability to 'activate' the status of my categories in the admin panel. Â 2. My categories still display on my shops product menu, however each category is now empty of products 3. My Categories no longer display the menu images for the subcategories (I'm also assuming this is because the subcategories are somehow disabled) Â Â I have checked and rechecked all my file alterations in the admin directory, and cannot find where the issue may be. Â --> I'm wondering whether the contribution Attribute_Sets-5.5-2.cip.zip is the cause of this issue? Â I've tried installing this package twice now to no avail. Are there any other alternatives that will work to enable/disable my categories? Quote Link to comment Share on other sites More sharing options...
Carlinz Posted February 21, 2006 Share Posted February 21, 2006 Hi, Ive attempted to install this contribution for a friend and its all gone tits up. Â Ive followed the instructions. Overwritten all the files (starting with the earliest version, to the latest). Ran the piece of code in the SQL database. Â But on attempting to access the admin panel I am stumped by this error : "Fatal error: Call to undefined function: tep_admin_check_login() in /htdocs/catalog/admin/includes/application_top.php on line 215" Â Application_top has not been modified itself so why are the newly modified files stopping application_top from using the function "tep_admin_check_login()"? Â Any help GREATLY appreciated! :( His site is sitting in an unusable state. Â Thank you! Quote Link to comment Share on other sites More sharing options...
Guest Posted February 23, 2006 Share Posted February 23, 2006 I've installed this contribution and everything seems to be working great with the categories. Â The only problem I have is that my specials page is now broken. Â All I get displayed in the specials box is:-= Â 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-9, 9' at line 1 select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from products p, products_description pd, specials s where p.products_status = '1' and s.products_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '1' and s.status = '1' order by s.specials_date_added DESC limit -9, 9 [TEP STOP] Â Any help with this would be much appreciated. Â Thanks in advance Quote Link to comment Share on other sites More sharing options...
mreigle Posted February 25, 2006 Share Posted February 25, 2006 I wasn't getting the category red/green buttons to show up either, but after digging around I found the following lines of code in /admin/categories.php on line 827 that were not clearly marked and needed to be added: Â <!-- // ################" Added Categories Disable ############# <td class="dataTableContent" align="center">Â </td> --> <td class="dataTableContent" align="center"> <?php if ($categories['categories_status'] == '1') { echo tep_image(DIR_WS_IMAGES . 'icon_status_green.gif', IMAGE_ICON_STATUS_GREEN, 10, 10) . 'Â Â <a href="' . tep_href_link(FILENAME_CATEGORIES, 'action=setflag_cat&flag=0&cID=' . $categories['categories_id'] . '&cPath=' . $cPath) . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_red_light.gif', IMAGE_ICON_STATUS_RED_LIGHT, 10, 10) . '</a>'; } else { echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'action=setflag_cat&flag=1&cID=' . $categories['categories_id'] . '&cPath=' . $cPath) . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_green_light.gif', IMAGE_ICON_STATUS_GREEN_LIGHT, 10, 10) . '</a>Â Â ' . tep_image(DIR_WS_IMAGES . 'icon_status_red.gif', IMAGE_ICON_STATUS_RED, 10, 10); } ?> </td> <!-- // ################" End Added Categories Disable ############# --> Â I added that in and I finally got the buttons to show up, although they don't do anything! They turn red, but the categories never disappear from the first page. Â The products inside the categories will disappear, but the category name never moves at all. Â Has anyone figured this out? Am I doing something completely wrong? I've installed this several times!!! Quote Link to comment Share on other sites More sharing options...
Guest Posted February 27, 2006 Share Posted February 27, 2006 I wasn't getting the category red/green buttons to show up either, but after digging around I found the following lines of code in /admin/categories.php on line 827 that were not clearly marked and needed to be added:Â <!-- // ################" Added Categories Disable ############# <td class="dataTableContent" align="center">Â </td> --> <td class="dataTableContent" align="center"> <?php if ($categories['categories_status'] == '1') { echo tep_image(DIR_WS_IMAGES . 'icon_status_green.gif', IMAGE_ICON_STATUS_GREEN, 10, 10) . 'Â Â <a href="' . tep_href_link(FILENAME_CATEGORIES, 'action=setflag_cat&flag=0&cID=' . $categories['categories_id'] . '&cPath=' . $cPath) . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_red_light.gif', IMAGE_ICON_STATUS_RED_LIGHT, 10, 10) . '</a>'; } else { echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'action=setflag_cat&flag=1&cID=' . $categories['categories_id'] . '&cPath=' . $cPath) . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_green_light.gif', IMAGE_ICON_STATUS_GREEN_LIGHT, 10, 10) . '</a>Â Â ' . tep_image(DIR_WS_IMAGES . 'icon_status_red.gif', IMAGE_ICON_STATUS_RED, 10, 10); } ?> </td> <!-- // ################" End Added Categories Disable ############# --> Â I added that in and I finally got the buttons to show up, although they don't do anything! They turn red, but the categories never disappear from the first page. Â The products inside the categories will disappear, but the category name never moves at all. Â Has anyone figured this out? Am I doing something completely wrong? I've installed this several times!!! Â mreigle there are no categories on the first page, you must be using another contibution like 'categories on fron page' and if thats the case you need to alter the code that you inserted for that to only show the categories that aren't disabled.. Â Â I'm still looking for help getting my specials working again after installing this contribution... Quote Link to comment Share on other sites More sharing options...
CAnneB2 Posted March 20, 2006 Share Posted March 20, 2006 Hi all, Â I've installed this contrib, but I guess it doesn't work exactly as I thought it would/should. When I disable the category in admin, I expected to go to my front end catalog and find that the category would not show in the "categories" box. However, this isn't what's happening. I still see the category in the "categories" box, and when I click on the category I disabled, it says "there currently are no products within this category". Is this supposed to happen? Â I changed my "categories" box code to the new "categories_query" used in "index.php", however this did not resolve my issue. Has anyone been able to figure if this is supposed to be happening or if I'm missing something? Â Thanks for the help! Chris B. 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.