【发布时间】:2012-08-24 12:10:36
【问题描述】:
我正在运行 Magento CE 1.6.2.0。
Magento 的在线客户功能非常棒。唯一的问题是通过显示重写(如果存在),“最后一个 URL”列可能会更有帮助。
我从这里更改了app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid/Renderer/Url.php:
public function render(Varien_Object $row)
{
return htmlspecialchars($row->getData($this->getColumn()->getIndex()));
}
到这里:
public function render(Varien_Object $row)
{
$lastUrl = htmlspecialchars($row->getData($this->getColumn()->getIndex()));
$lastUrlRewrite = Mage::getModel('core/url_rewrite')
->setStoreId(1)
->loadByRequestPath($lastUrl);
$url = ($lastUrlRewrite) ? $lastUrlRewrite : $lastUrl;
return $url;
}
StoreId 正确,但输出仍为空。
任何帮助将不胜感激!谢谢。
【问题讨论】:
标签: magento url-rewriting