- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If an item has visibility set to search only does it show up in the sitemap?
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.