3

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 1

4

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;
}
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.