【发布时间】:2013-11-21 11:44:53
【问题描述】:
我想通过升级脚本截断 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);
}
【问题讨论】:
标签: magento url rewrite reindex