How can i get a category url rewritten for a specific store in magento?
I have 2 stores: us and uk.
Store codes: en_gb and en_us.
If i load a category in code
$store = Mage::getModel('core/store')->load(3); // 3 is the uk store $categoryUrl = Mage::getModel('catalog/category')->load($store->getRootCategoryId())->setStoreId($store->getId());
The url that comes back always has the default website code in the path i.e. and also never the seo friendly url. It is the
By setting the store in the script the correct country is added to the url:
Why is this needed?
Also it still doesnt give the seo friendly url