Hamza101 Posted December 2, 2011 Posted December 2, 2011 Hi I want to remove a category name from the category box on my website, but i just want to remove the name, i dont want to delete the category from admin panel. I want to keep the category just dont want it to show up in categories. Some help would be really appreciated thanks .
♥kymation Posted December 2, 2011 Posted December 2, 2011 There are several Addons that hide categories. Check the Addons area for your version of osCommerce. Regards Jim See my profile for a list of my addons and ways to get support.
motohansa Posted December 5, 2011 Posted December 5, 2011 Hi, I am running Oscom 2.3.1. I am also looking for something to 'Hide' categories. I want to remove a category name from the category box on my website, but i just want to remove the name, i dont want to delete the category from admin panel. I want to keep the category just dont want it to show up in categories. As Jim suggested I went and looked through the Addons and found a number of different solutions but none of them were quite what I was after. I found Hide Categories & Products V1 .. http://addons.oscommerce.com/info/5907 This hides it completely from all parts of the store. My idea was to do similar to this addon where there is another column inserted into the categories table, categories_status, in the database but instead of completely hiding it in the store using the IF statement in the categories.php. Instead try and create a conditional statement in the bm_categories.php so that it only displays the categories with 'category_status = Active or 1' in the categories box but leaves all the categories in the admin and as filters in the manufactures. I'm just new to sql and php so if possible I need help writting the conditional statement for the category box display. If someone could point me in the right direction and/or help with the syntax so I can have a go at writing something myself it would be really appreciated. If I get it working I would like to post it back as another contribution (giving appropriate credit). Regards Lucas
motohansa Posted December 5, 2011 Posted December 5, 2011 Sorry I'm new, didnt realise this was General Support for v3.X until it was too late. I have asked a team member to move this to General Support for v2.x for me. Sorry.
puddlec Posted December 5, 2011 Posted December 5, 2011 this is how i have removed some categorys from my categories box on one of my websites // do not show the following categorys if (($tree[$counter]['path'] != 58) && ($tree[$counter]['path'] != 108) && ($tree[$counter]['path'] != 123)) { $categories_string .= '<a href="'; then you just need to close the if statement $categories_string .= '</a>'; // close do not shoe categorys } the only thing that needs to be changed is the number (58, 108, 123), i am using a slightly different categorys box than what osc 2.3.1 comes with (but should still work Phoenix support now at https://phoenixcart.org/forum/ App created for phoenixTinyMCE editor for admin
motohansa Posted December 5, 2011 Posted December 5, 2011 Hi Craig, Thanks alot for the fast reply. I have tried putting the code into bm_categories.php but I'm struggling to find the right place to put it. Can you give me an indication of where it should go please. Thanks
motohansa Posted December 5, 2011 Posted December 5, 2011 Craig, your a legend. worked perfectly. I forgot to mention that I also have a contribution called Unsortedlist_categoryinfobox installed. But I managed to play further and get it all working. I am now going to work on setting up a column in the database which is refered to by the IF statement so that the hidden category doesnt need to be hard coded. I'll post back if I manage to get it working incase anyone is interested. Thanks again Craig.
motohansa Posted December 6, 2011 Posted December 6, 2011 I have finally managed to work out how to hide categories from the Categories info box ONLY and leave the categories in the Admin (with active/inactive control) and as filters under manufacturers. ( I have been looking and trying to do this for months, sorry if this has already been solved somewhere else but I searched and searched and couldnt find how to get this specific setup until now) I was trying to do complicated things and build something myself but it turns out partial installation of an already exisiting addon was all that was required. Use this Addon: http://addons.oscommerce.com/info/5907 Then follow the installation instructions given carefully. (I have got this to work in v2.3.1) Note: For those doing this in v2.3 the file: catalog/includes/boxes/categories.php can be found here: catalog/includes/modules/boxes/bm_categories.php Skip ONLY instructions relating to modifying the following files: catalog/index.php & catalog/includes/boxes/dm_categories.php And thats it. As I mentioned, this sets up the Active/Inactive in the admin and sets up the new column in the database and then hides the category only from the category info box. Thanks very much to Craig for the initial help and Spooks for the great contribution. Cheers Lucas
kiran046 Posted June 16, 2012 Posted June 16, 2012 I am suffering from the same problem.. but its not working for me.. please tell me exactly where to put this code, // do not show the following categorys if (($tree[$counter]['path'] != 58) && ($tree[$counter]['path'] != 108) && ($tree[$counter]['path'] != 123)) { $categories_string .= '<a href="'; $categories_string .= '</a>'; // close do not shoe categorys } i inserted it in bm_catagory.php but it hides all catagories except the one which i want to hide.... and is it necessary to use the addon with this code.. please reply. thank you
multimixer Posted June 16, 2012 Posted June 16, 2012 if (($tree[$counter]['path'] != 58) && ($tree[$counter]['path'] != 108) && ($tree[$counter]['path'] != 123)) { i inserted it in bm_catagory.php but it hides all catagories except the one which i want to hide.... How is your if statement exactly? My community profile | Template system for osCommerce - New: Responsive | Feedback channel
kiran046 Posted June 16, 2012 Posted June 16, 2012 exactly the same i send before..just the ID's are different..
kiran046 Posted June 16, 2012 Posted June 16, 2012 exactly the same i send before..just the ID's are different.. and also one thing is it necessary to use the addon for the same problem....
kiran046 Posted June 16, 2012 Posted June 16, 2012 How is your if statement exactly? exactly the same i send before..just the ID's are different..
multimixer Posted June 16, 2012 Posted June 16, 2012 I would suggest you post your statement, paste it to here My community profile | Template system for osCommerce - New: Responsive | Feedback channel
kiran046 Posted June 16, 2012 Posted June 16, 2012 I would suggest you post your statement, paste it to here // do not show the following categorys if (($tree[$counter]['path'] != 46)) { $categories_string .= '<a href="'; $categories_string .= '</a>'; // close do not shoe categorys } i want to hide the catagory whose id is 46....
kiran046 Posted June 18, 2012 Posted June 18, 2012 // do not show the following categorys if (($tree[$counter]['path'] != 46)) { $categories_string .= '<a href="'; $categories_string .= '</a>'; // close do not shoe categorys } i want to hide the catagory whose id is 46.... problem solved.. i use the hide catagory and products module for this... thank you..
Recommended Posts
Archived
This topic is now archived and is closed to further replies.