magento如何去掉分類url中的父目錄

Go to app/code/core/Mage/Catalog/Model/

Open Url.php and go to line no 632 and comment(//) the below line


//if (null === $parentPath) {

//$parentPath = $this->getResource()->getCategoryParentPath($category);

//}

//elseif ($parentPath == '/') {

$parentPath = ''; //('Don't comment it')

//}

Now save and upload it.

Now login to admin panel of your site then go to System->Config->Index Management and click on select all then select Reindex Data from the Action Dropdown then click on submit.

Now refresh your cache to see the effect.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章