我已经为不同国家和城市的商店创建了自定义模块,所以我必须从这个 url http://domain1.com/magento/index.php/shops/index/viewcountry/country/IN/重写模块的 url 到这个 url
http://domain1.com/magento/index.php/India-sarees-shops.html
下面是我的 urlrewrite 代码
<?php
$storeId = Mage::app()->getStore()->getId();
Mage::getModel('core/url_rewrite')
->setIsSystem(0)
->setStoreId($storeId)
->setOptions('RP')
->setIdPath('viewcountry/country/' .$country['value'])
->setTargetPath($country['label'].'-sarees-shops.html')
->setRequestPath('shops/index/viewcountry/country/'.$country['value'].'/')
->save();
?>
还得到“指定商店的 ID 路径,指定商店的请求路径已经存在”错误请帮帮我