我想使用“产品视图”页面上的自定义模块以及“添加到购物车”按钮来添加新按钮(自己的测量)。单击新按钮后,它将重定向模块的index.phtml。 我的模块config.xml文件是:-
<?xml version="1.0"?>
<config>
<modules>
<SilkSoftware_Measurement>
<version>0.1.0</version>
</SilkSoftware_Measurement>
</modules>
<frontend>
<routers>
<measurement>
<use>standard</use>
<args>
<module>SilkSoftware_Measurement</module>
<frontName>measurement</frontName>
</args>
</measurement>
</routers>
<layout>
<updates>
<measurement>
<file>measurement.xml</file>
</measurement>
</updates>
</layout>
</frontend>
<global>
<helpers>
<measurement>
<class>SilkSoftware_Measurement_Helper</class>
</measurement>
</helpers>
<blocks>
<measurement>
<class>SilkSoftware_Measurement_Block</class>
</measurement>
</blocks>
</global>
<admin>
<routers>
<measurement>
<use>admin</use>
<args>
<module>SilkSoftware_Measurement</module>
<frontName>admin_measurement</frontName>
</args>
</measurement>
</routers>
</admin>
<adminhtml>
<menu>
<measurement module="measurement">
<title>Measurement</title>
<sort_order>100</sort_order>
<children>
<measurementbackend module="measurement">
<title>own measurement</title>
<sort_order>0</sort_order>
<action>admin_measurement/adminhtml_measurementbackend</action>
</measurementbackend>
</children>
</measurement>
</menu>
<acl>
<resources>
<all>
<title>Allow Everything</title>
</all>
<admin>
<children>
<measurement translate="title" module="measurement">
<title>Measurement</title>
<sort_order>1000</sort_order>
<children>
<measurementbackend translate="title">
<title>own measurement</title>
</measurementbackend>
</children>
</measurement>
</children>
</admin>
</resources>
</acl>
<layout>
<updates>
<measurement>
<file>measurement.xml</file>
</measurement>
</updates>
</layout>
</adminhtml>
</config>
我在Silksoftware的帮助下创建了此模块,它正确显示了模块前端。我希望每当我安装模块时,此按钮(自己的测量)就会自动添加到产品视图页面上,并在单击按钮时将其重定向到模块index.phtml文件。