cancel
Showing results for 
Search instead for 
Did you mean: 

If an item has visibility set to search only does it show up in the sitemap?

SOLVED

If an item has visibility set to search only does it show up in the sitemap?

If an item has visibility set to search only does it show up in the sitemap?

2 REPLIES

Re: If an item has visibility set to search only does it show up in the sitemap?

I have found that it does show up. Is there a way to change that?

Re: If an item has visibility set to search only does it show up in the sitemap?

This shouldn't happen.

The code that retrieves the product collection for sitemap is Mage_Sitemap_Model_Resource_Catalog_Product::getCollection().
In that method there is this filter that should exclude the products that are not visible and not active:

$this->_addFilter($storeId, 'visibility', Mage::getSingleton('catalog/product_visibility')->getVisibleInSiteIds(), 'in');
$this->_addFilter($storeId, 'status', Mage::getSingleton('catalog/product_status')->getVisibleStatusIds(), 'in');

Maybe you have a visibility set at the global level and a different one set at the store view level.
Check how a product looks like on the store view level that should not appear in the sitemap but does.

Also check if the code that retrieves the product collection is not overwritten.