【发布时间】:2012-09-25 05:28:17
【问题描述】:
我想为我们的 Magento 购物篮实现自定义 URL。 Magento 开箱即用的 url paht 是 /checkout/cart 但客户端请求 /checkout/bag。
我试图以某种方式 * 后端的 URL 重写管理 - 它有效,但我需要将代码中的所有出现更新为新的 url,因为 $this->getUrl('checkout/cart') 不会转换为结帐/袋子 * 我也尝试听从http://alanstorm.com/magento_dispatch_rewrites_intro 的一些建议,但基本上它也对我没有帮助。 * 我也尝试了这篇文章中的例子http://phprelated.myworks.ro/two-add-to-cart-buttons-with-different-redirect-actions-at-once-in-magnto/
那么,有什么方法可以在不更新我们的模板和类 $this->getUrl('checkout/cart') 中的所有出现的情况下将翻译从路径 'checkout/cart' 重写为 checkout/bag
任何依赖于网络服务器架构的解决方案都不是终极解决方案。
【问题讨论】:
标签: magento rewrite custom-url