Magento: Fastest way to hide empty categories in Magento frontend? - magento

What I'm trying to do seems trivial but I've been looking on Google for this for the past 3 hours and can't find it...
--> I'm just trying to list the categories of my website but hide those that are empty AND that all their subcategories are also empty (no products).
Shouldn't that be easy to do?? Everything I've found seems utterly complicated or custom-coded. Am I the only one that doesn't want to show empty categories?
Note: I'm using Magento 1.3.2.4, I don't want to manually hide categories in backend.

There is an article about that from Pratski :
Display Only If There Are Products In The Category

Related

Why is my wish list limited to one item?

Im using magento 1.9 and im having an issue with the wishlist, for some reason it will only let me have one item in my wishlist and when I goto add another item to the wishlist it replaces the item that was already in my wishlist, there is nothing in the configuration to limit the wishlist item im just a bit confused at why it would be doing this, any ideas ?
Right!!, after hunting the web to try and find a solution I have found a solution, you have to edit the file app/code/core/Mage/Wishlist/Model/Wishlist.php
find:
public function getItemCollection()
and change
$this->_itemCollection = Mage::getResourceModel('wishlist/item_collection')
->addWishlistFilter($this)
->addStoreFilter($this->getSharedStoreIds($currentWebsiteOnly))
->setVisibilityFilter();
to
$this->_itemCollection = Mage::getResourceModel('wishlist/item_collection')
->addWishlistFilter($this)
->addStoreFilter($this->getSharedStoreIds($currentWebsiteOnly));
this worked for me and im using magento 1.9.0.1
the source for this fix is here: http://www.magentocommerce.com/boards/viewthread/291225/
This is an out of the box feature, you do not need to edit any core code to fix this. Correction: You don’t have to edit any code
I had the same issue and found it was from an improper import of products and that website availability was incorrectly set.
It seems that Magento added a website filter on the wishlist collection to prevent items not available in a website from appearing in a customer's wishlist.
It also seems that items may not have a website value => which prevents wish list items from appearing (or just 1 item, the last one added).
How to fix it : Simply select your store products on catalog page, select ‘Update Attributes’ action and click on submit.
Select Websites panel and check your website in ‘Add Product To Websites’ block.
Reindex your data if necessary.
You can now add your products to your wishlist and see all of them in your wishlist. This is the proper solution and does not remove functionality from your Magento webstore.
Simply reindex everything in: System > Index management

Magento rewrites and layered navigation

I'm having a problem with a Magento shop.
I'll explain it a bit:
Our shop has over 25k products.
We use a lot of attributes because it's a fashion shop. (size, color, brand etc.)
Our shop had over a thousend categories and was very slow because of so many categories, so we narrowed it down to 7 categories and added more attributes to help us filter.
The problem now however is the layered navigation. Let me show you an example:
When going to a category and selecting filters, the link is like this:
http://example.com/kinderkleding.html?doelgroep=jongenskleding&artikelgroep=broeken
The link that we want is:
http://example.com/kinderkleding/jongenskleding/broeken.html
We have tried many different extentions like GoMage Layered Navigation and SEO Layered Navigation. The first one didn't work at all with this and the second one adds a "identifier" to the link. This means the link would be like this:
/kinderkleding/shopby/jongenskleding/broeken.html
So it adds "shopby" in the link. This is very bad for our SEO.
We need the link without the "shopby".
We tried to rewrite our own links in Magento but that didn't work. We've got links like this with Magento rewrites: /kinderkleding/jongenskleding/broeken.html?doelgroep=jongenskleding&artikelgroep=broeken
Is there any way this can be fixed by an extension or custom php code?
We've tried so many different things.
Is there anyone with a suggestion?
I've made the last 2 links bold because I can't seem to be able to post more than 2 links.

Sort topmenu in Magento?

This is really driving me crazy. I have been trying for hours to get it right, but no luck!
All i want is to be able to sort the parent & subcategories in the topmenu of Magento. I tried a lot of custom coding, but all what Ive found seems to be out of date. Then i also tried to just move the categories order in the admin panel of Magento. This seems to work, but only for parent categories. It won't sort the subcategories. In addition, for some strange reason it will put the old order back again. So for instance, when i sorted the parent categories, it seems to work but when i refresh the admin page the old sorted categories are back and when i refresh the frontpage i see (indeed) the old (wrong) sorted categories back. Might have something to do with the cache ? It should be so simple (i hope:)). Is there anyone who can tell me how i can sort the categories and subcategories (custom, or by id, or anything else...)?
Thanks.
I feel these urls will help you in this case
http://www.magentocommerce.com/wiki/4_-_themes_and_template_customization/catalog/getting_and_using_categories_and_subcategories
How to sort a category list array alphabetically in Magento

Adding multiple items to special page

I have a quick how to question with Magento.
On my main site I need to have 7 links to special "categories" of items, but these don;t reflect categories of items. It is for a clothes shop so link may be to a summer wear page to only display items tagged as summer wear but from all types of item and categories.
What would the best way to go about creating this functionality?
I am assuming that when you say 'taged' you mean the product has a attribute set to 'summer'. In that case:
If you have products that you want to group together by attribute and list similar to a category page without being in a category, you could try using the Fishpig Splash Page extension:
http://fishpig.co.uk/attribute-splash-pages.html
This extensions allows product attributes to group products instead of categories.
I hope I understood your question correctly.
You can create categories for each of the 7 pages you mention, but hide them from the navigation in the category settings page.
you can then add your products to these categories as you see fit.
They will still be in their original categories too, but you can now link to the new pages and see them there too.
It seems like to me, you would just create the categories like normal. Because products can belong to many categories, you would just assign on a per-product basis which ones need to be in your categories.

Should Magento sitemap contain empty categories?

From SEO point of view, isn't it dangerous to give out a page without any practical value? If you advertise to have content for a particular category, but you actually don't, wouldn't that make the poeple who clicked on the link to just move along?
More importantly, would the empty category not make guys working at Google mark your website as spammy? Cause you have 100 categories in your sitemap, and only 10 actually contain products?
If you are not using them for content or other presentation you should hide/disable categories that are empty until you have products in them.

Resources