JenRed Posted April 5, 2003 Share Posted April 5, 2003 Is it possible to have both the Enable/Disable Categories mod and the Categories Dropdown Box mod? Has anyone successfully got both of these mods working together? What code do I change? etc etc :) thanks Jen Quote I haven't lost my mind - I have it backed up on disk somewhere. Link to comment Share on other sites More sharing options...
Guest Posted April 5, 2003 Share Posted April 5, 2003 I've got enable/disable categories installed and it works just fine... Except, you will need to change all queries that query the product or category table... You will need to filter out those categories/products who are inside a disabled category... I've noticed that after the install that products were showing up that actually were in an enabled sub category that in his turn, was inside a disabled category... When I got the time, I'm going to build a list of enabled categories somewhere in the application_top.php that I could use in all my product/category queries... I haven't installed the categories drop down, but i'll guess you'll need to extend the query to exclude the disabled categories. Quote Link to comment Share on other sites More sharing options...
DIMSUMGIRL Posted April 9, 2003 Share Posted April 9, 2003 yea, I got it to work together but I am not sure what I have done. (didn't jot a note) :? however, here how my allcategoriesdropdown.php look like.. see if u have the same.. $categories_array = tep_get_categories($cat_choose); for ($i=0; $i<sizeof($categories_array); $i++) { $path = ""; $parent_categories = array(); tep_get_parent_categories($parent_categories, $categories_array[$i]['id']); for ($j = sizeof($parent_categories) - 1; $j>=0; $j--) { $path = ($path == "") ? $parent_categories[$j] : ($path . "_" . $parent_categories[$j]); } $categories_array[$i]['id'] = ($path == "") ? $categories_array[$i]['id'] : ($path . "_" . $categories_array[$i]['id']); } $info_box_contents[] = array('form' => '<form action="' . tep_href_link(FILENAME_DEFAULT) . '" method="get">', 'align' => 'center', 'text' => tep_draw_pull_down_menu('cPath', $categories_array,'','onChange="this.form.submit();" size="' . ((sizeof($categories_array) < MAX_MANUFACTURERS_LIST) ? sizeof($categories_array) : MAX_MANUFACTURERS_LIST) . '" style="width:' . BOX_WIDTH . '"') ); new infoBox($info_box_contents); i have also changed many files, so we'll see if you have the same code in this file...and it still doesn't work, i will look at other related files to see what i changed. Quote Link to comment Share on other sites More sharing options...
JenRed Posted April 9, 2003 Author Share Posted April 9, 2003 Glad to hear someone has managed to integrate the two. Considering I don't even have a file called allcategoriesdropdown.php, I think it's safe to say that is one you added! It would be great if you could decipher what changes you made - though I know it won't be easy! If you want to give it a try, let me know how you go... Anybody else done a similar thing and remember what they did? thanks Jen Quote I haven't lost my mind - I have it backed up on disk somewhere. Link to comment Share on other sites More sharing options...
DIMSUMGIRL Posted April 9, 2003 Share Posted April 9, 2003 wait..i guess you want different feature..never mind :D mine is pop down menu..like jump menu box on this forum script (jump to: ) the type you talk about should be even easier. look at tep_db_query of table categories add where 'clause' ex; and categories_status = '1' Quote Link to comment Share on other sites More sharing options...
Guest Posted April 9, 2003 Share Posted April 9, 2003 I think that categories_status = '1' is not sufficient as a certain categorie can have status 1 but its parent categorie is set to 0 Quote Link to comment Share on other sites More sharing options...
DIMSUMGIRL Posted April 9, 2003 Share Posted April 9, 2003 I added that all queries that concerns with categories table. The disabled category doesn't show in dropdown list. However, if someone bookmarked the page when it was enabled, they could access the category and its products. :( Although the category status is 0 Quote Link to comment Share on other sites More sharing options...
DIMSUMGIRL Posted April 9, 2003 Share Posted April 9, 2003 same thing to product info page too (which is default from oscommerce), but I have fixed product info page to show 'product not found'. Quote Link to comment Share on other sites More sharing options...
azer Posted April 28, 2003 Share Posted April 28, 2003 DIMSUMGIRL dis u managed to make it work ? wich snapshot and contribution version are u using ? Quote MS2 Link to comment Share on other sites More sharing options...
DIMSUMGIRL Posted April 28, 2003 Share Posted April 28, 2003 aah I forgot what we were talking about. You can see this site http://www.shopmarie.com The site I was working on. I'm done with it. I think my problem's solved. (I think) Quote Link to comment Share on other sites More sharing options...
azer Posted April 14, 2004 Share Posted April 14, 2004 i have the same probleme as you , for doing the same "Browse Categories" compatible ... could u send me the code u used ? Quote MS2 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.