cancel
Showing results for 
Search instead for 
Did you mean: 

Disabling parent sitemap for magento multistore [SOLVED]

Disabling parent sitemap for magento multistore [SOLVED]

Hi there,

 

For a multistore magento webshop I have an issue with an (auto) generated parent sitemap. It is generated at example.com/sitemap/. See: http://snag.gy/VB7S9.jpg

 

I would like to have the HTML sitemap on this url instead of a parent sitemap of both store views. Is there a solutuion for this?

 

Thanks in advance!

3 REPLIES 3

Re: Disabling parent sitemap for magento multistore

In order to make HTML list you need to list all URL's of your catalog. You can get all URL's of category and product by using below code.

 

//Category List
$collection = Mage::getModel('catalog/category')
			->getCollection()
			->addAttributeToSelect('*')
			->addIsActiveFilter();

foreach($collection as $category)
{
	echo $category->getUrl() . "<br/>";
}


//Products List

$collection = Mage::getModel('catalog/product')
					->getCollection()
					->addAttributeToSelect('*')
					->addAttributeToFilter('status', Mage_Catalog_Model_Product_Status::STATUS_ENABLED)
					->addAttributeToFilter('visibility', array(
						Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH,														Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_CATALOG
					));
foreach($collection as $product)
{
	echo $product->getProductUrl() . "<br/>";
}

Hope it helps you Smiley Happy

-
Magento Programmer | Was my answer helpful? You can accept it as a solution.

Re: Disabling parent sitemap for magento multistore

Hi Grav,

 

Thx for the code, but there is a standard magento function which does this automaticly, see:

 

http://merch.docs.magento.com/ce/user_guide/Magento_Community_Edition_User_Guide.html#search_seo/seo...

 

However it seems that this is not working in a multistore environment, and on example.com/sitemap/ is a parent sitemap displayed, this is not desirable (see above screenshot).

 

Thanks for the answer anyway.

Re: Disabling parent sitemap for magento multistore

Ah my misstake, made the folder sitemap Smiley LOL