easybeau Posted July 23, 2006 Posted July 23, 2006 Hello, I've just installed the contribution Enable & Disable Categories. In admin the status stays into 0 even if I put 1 and save it! Status 0 1=Enabled 0=Disabled Other problem: Even if the status=0, categories are still enabled in the left box, cause of the contribution dhtml categories, I guess! The code is in javascript and I don't know what to change. :( Anybody could help me, please! Quote
Guest Posted July 23, 2006 Posted July 23, 2006 My suggestion is to check the install instructions again and make sure you modified all files mentioned in the readme. Also you could check the support thread for this contribution for similar problems others posted. I have installed that module and I know it works. Quote
easybeau Posted July 23, 2006 Author Posted July 23, 2006 Ok, I'll re-install it and see! Thanks for answering. Quote
easybeau Posted July 24, 2006 Author Posted July 24, 2006 I know what's the problem! Actually I installed 3 contributions that have changes in the same area: Categories Enable / Disable, Products_Sold v1.0, sort order! I made a modification and now it works for Categories Enable / Disable but the button 'save sort order' doesn't work any more! I'm lost, anybody could help me. Here is my code in admin/categories.php l.22-89 //sort order case 'beginsort': $sorting = true; break; tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $HTTP_POST_VARS['cPath'])); case 'setsortorder': for ($i=0, $n=sizeof($HTTP_POST_VARS['products_id']); $i<$n; $i++) { tep_set_product_sort_order($HTTP_POST_VARS['products_id'][$i], $HTTP_POST_VARS['sortorder'][$i]); } $sorting = false; tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $HTTP_POST_VARS['cPath'])); break; //end sort order case 'setflag': if ( ($HTTP_GET_VARS['flag'] == '0') || ($HTTP_GET_VARS['flag'] == '1') ) { if (isset($HTTP_GET_VARS['pID'])) { tep_set_product_status($HTTP_GET_VARS['pID'], $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'] . '&pID=' . $HTTP_GET_VARS['pID'])); break; // ####################### 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; // Ajout pour Products_Sold v1.0 case 'setsold': if ( ($HTTP_GET_VARS['sold'] == '0') || ($HTTP_GET_VARS['sold'] == '1') ) { if (isset($HTTP_GET_VARS['pID'])) { tep_set_product_sold($HTTP_GET_VARS['pID'], $HTTP_GET_VARS['sold']); } /*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'] . '&pID=' . $HTTP_GET_VARS['pID'])); break; // Fin ajout pour Products_Sold v1.0 // ####################### End Categories Enable / Disable ############### case 'insert_category': case 'update_category': if (isset($HTTP_POST_VARS['categories_id'])) $categories_id = tep_db_prepare_input($HTTP_POST_VARS['categories_id']); $sort_order = tep_db_prepare_input($HTTP_POST_VARS['sort_order']); // ####################### 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 ############### Quote
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.