Can anyone please let me know how to stop generating urls for German, Russian and French stores after reindexing catalog_url. I tried disabliing stores in the system --> admin --> Manage Stores but still urls are generating for those stores. please help me in this. Thanks in Advance
1 Answer
The url rewrites are refreshed by the method Mage_Catalog_Model_Url::refreshRewrites()
.
You can rewrite this model and change the method to reindex only the enabled stores.
Something like this:
public function refreshRewrites($storeId = null)
{
if (is_null($storeId)) {
foreach ($this->getStores() as $store) {
if ($store->getIsActive()) {
$this->refreshRewrites($store->getId());
}
}
return $this;
}
$this->clearStoreInvalidRewrites($storeId);
$this->refreshCategoryRewrite($this->getStores($storeId)->getRootCategoryId(), $storeId, false);
$this->refreshProductRewrites($storeId);
$this->getResource()->clearCategoryProduct($storeId);
return $this;
}