【发布时间】:2012-02-13 02:14:45
【问题描述】:
如果产品 id 不可用且只有产品的 url,如何在 Magento 中加载产品模型?例如,我想从它的友好 url 中检索产品模型,例如
electronics/cameras/olympus-stylus-750-7-1mp-digital-camera.html
我在another post找到了如下代码:
$oRewrite = Mage::getModel('core/url_rewrite')->loadByRequestPath(
$path
);
但它似乎无法正常工作。 Magento 文档在这方面非常缺乏;有谁知道如何做到这一点?
【问题讨论】:
标签: magento