Hide Category from sidebar
Hello again,
I would like to know how to hide an active category item from the sidebar without disabling it. P.S. Not sure if I'm supposed to create a new thread for each new question or add on to my existing thread. If I'm in violation of any rules please let me know and I will adjust my post. P.S.S. Is there a way to bulk add existing products to a category? like the way you can add existing items to the Featured Products. |
Re: Hide Category from sidebar
New questions, belong in new threads. Unless it is just an extension of the original question.
In answer to your PSS: You can modify multiple products at once, try doing this and adding them to category. I don't believe that hiding an active category is possible without modification of smarty or PHP code. I would start by adding the option to the category page in admin, a simple checkbox for "hide". Then you can work on the front side, taking action based on that checkbox. Adding a custom variable to a category is relatively simple to do. I have a tutorial that shows how to do it for a product: https://www.youtube.com/watch?v=-7ESOW0pKU4 Adapting what you learn there, the same technique can easily be applied to a category. |
Re: Hide Category from sidebar
Quote:
Thanks for the reply! I was hoping to be able to do it with custom CSS with an nth-child, something to the effect of li.whateverclassname:nth-child(2){ display:none; } Since I've never even seen CSS before this past friday it's hard for me to figure out the class hierarchy when using inspect element in chrome. Also the seeming random use of line item class by xcart when generating the sidebar is confusing. As for editing multiple products categories I don't seem to be able to do that. I can only delete, clone, enable, or disable multiple products at once. |
Re: Hide Category from sidebar
Ahh, we are talking about XC5. I was confused, thinking you meant XC4. You are right, there is no way to do this at the moment, besides perhaps an export/import involving modifying the spreadsheet.
|
Re: Hide Category from sidebar
Do you mean that if you are in iGoods category, then this category should not be clickable as shown on my snapshot?
If so, then this can be achieved relatively easily via mod: http://awesomescreenshot.com/0494fp3183 |
Re: Hide Category from sidebar
Quote:
No, I would like to have igoods active but not show up in the category sidebar at all. |
Re: Hide Category from sidebar
Quote:
OK, got it. In this case you need to create a module and decorate the getCategories() method of the \XLite\View\TopCategories class. There you should walk through each category object and put it into return array unless the category is not the same one you are in. Please, let me know if it makes sense to you. Tony. |
All times are GMT -8. The time now is 06:23 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.