我想通过升级脚本截断 magento core_url_rewrite 表并重新索引目录 url 重写。该表被截断,但重新索引目录 url 不起作用。任何帮助请..
//truncate magento core_url_rewrite table
$installer = $this;
$installer->startSetup();
$installer->run(
"TRUNCATE TABLE `{$this->getTable('core_url_rewrite')}` "
);
$installer->endSetup();
// reindex catalog url rewrites
$indexCatUrl = Mage::getSingleton('index/indexer')->getProcessByCode('catalog_url');
try {
$indexCatUrl->reindexAll();
} catch(Exception $e) {
$this->log('Error Reindex all ' . $e);
throw ($e);
}