最初我是新手到magento。所以請幫助我學習magento。我創建了一個名爲「卡片憑證」的自定義模塊。我需要啓用或禁用模塊表單adminpanel。所以我創建了系統文件如何做自定義模塊啓用/禁用管理不工作 - Magento
我的app/code/community/card/voucher/etc/system.xml。代碼如下所示
<config>
<tabs>
<myconf translate="label">
<label>card voucher</label>
<sort_order>150</sort_order>
</myconf>
</tabs>
<sections>
<tab1 translate="label" module="adminhtml">
<label>Enable/Disable</label>
<tab>myconf</tab>
<sort_order>10</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<groups>
<general translate="label comment">
<label>General</label>
<sort_order>50</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<comment><![CDATA[This is a <strong>card voucher</strong> Extension used for checking voucher code.<br />You can simply enable disable this extension here. ]]></comment>
<fields>
<active translate="label comment">
<label>Enable/Disable</label>
<frontend_type>select</frontend_type>
<sort_order>54</sort_order>
<source_model>adminhtml/system_config_source_enabledisable</source_model>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</active>
</fields>
</general>
</groups>
</tab1>
</sections>
然後我禁用了模塊,但仍住在我的網站。我認爲這個代碼僅僅足以建立這個功能。
請儘快
感謝
從應用/ etc/modules中禁用模塊然後清除緩存和管理員註銷。這應該在那之後起作用。 – Chiragit007 2014-10-16 12:54:48
Ok @ Chiragit007,但這是一種手動方式,是否有任何可能通過管理面板進行啓用/禁用過程。 – 2014-10-16 13:16:02
是去系統 - >配置 - >高級部分。在那裏找到你的模塊,並將其設置爲「禁用」。不要忘記最後保存設置。 – Chiragit007 2014-10-16 13:17:13