【发布时间】:2015-11-30 16:23:50
【问题描述】:
我在 Magento 1.4.1.1 中使用 Nastnet OrderPrint 扩展。应用后,我在 config.xml 中面临 url 重写的问题 SUPEE-6788 补丁。
config.xml 中有如下代码
<?xml version="1.0"?>
<config>
<modules>
<Nastnet_OrderPrint>
<version>0.1.3</version>
</Nastnet_OrderPrint>
</modules>
<global>
<blocks>
<adminhtml>
<rewrite>
<sales_order_view>Nastnet_OrderPrint_Block_Sales_Order_View</sales_order_view>
</rewrite>
</adminhtml>
</blocks>
<rewrite>
<Nastnet_OrderPrint_OrderController>
<from><![CDATA[#/\w+/sales_order/print/#]]></from>
<to>/orderprint/order/print/</to>
</Nastnet_OrderPrint_OrderController>
</rewrite>
<models>
<Nastnet_OrderPrint>
<class>Nastnet_OrderPrint_Model</class>
</Nastnet_OrderPrint>
</models>
<pdf>
<order>
<default>Nastnet_OrderPrint/order_pdf_items_order_default</default>
<grouped>Nastnet_OrderPrint/order_pdf_items_order_grouped</grouped>
</order>
</pdf>
</global>
<admin>
<routers>
<Nastnet_OrderPrint>
<use>admin</use>
<args>
<module>Nastnet_OrderPrint</module>
<!-- This is used when "catching" the rewrite above -->
<frontName>orderprint</frontName>
</args>
</Nastnet_OrderPrint>
</routers>
</admin>
</config>
根据管理路由的 SUPEE-6788 补丁的发行说明,我可以使用以下修复。
<adminhtml>
<args>
<modules>
<Nastnet_OrderPrint before="Mage_Adminhtml">Nastnet_OrderPrint_Adminhtml</Nastnet_OrderPrint>
</modules>
</args>
</adminhtml>
但是如何解决以下问题?
<rewrite>
<Nastnet_OrderPrint_OrderController>
<from><![CDATA[#/\w+/sales_order/print/#]]></from>
<to>/orderprint/order/print/</to>
</Nastnet_OrderPrint_OrderController>
</rewrite>
【问题讨论】:
标签: magento magento-1.9 magento-1.4