I have a problem with my category sitemap.
Like you can see here : http://bizpro.ch/catalog/seo_sitemap/category/ the category list doesn't respect the menu position.
Do you have any idea?
I have a problem with my category sitemap.
Like you can see here : http://bizpro.ch/catalog/seo_sitemap/category/ the category list doesn't respect the menu position.
Do you have any idea?
You can overwrite the Mage_Catalog_Block_Seo_Sitemap_Category
class from your own module (more on that here: http://inchoo.net/magento/overriding-magento-blocks-models-helpers-and-controllers/)
And set the order yourself
class [Namespace]_[Module]_Block_Catalog_Seo_Sitemap_Category extends Mage_Catalog_Block_Seo_Sitemap_Category
{
protected function _prepareLayout()
{
parent::_prepareLayout();
$helper = Mage::helper('catalog/category');
// here I've edited the first argument to be `position` instead of default `name`
$collection = $helper->getStoreCategories('position', true, false);
$this->setCollection($collection);
return $this;
}
}
var_dump((string)$collection->getSelect());
Commented
Nov 11, 2015 at 10:45