0

我在使用 magento 1.7 的扩展时遇到问题

我下载了软件包,将所有文件放入正确的文件夹中

  • /app/code/community/EXTENSION_FOLDER
  • /app/design/adminhtml/ - html 更改
  • /app/etc/modules/Extension.xml

配置文件

<?xml version="1.0"?>
<config>
   <modules>
      <Ebizmarts_Cakemail>
         <version>0.0.1</version>
      </Ebizmarts_Cakemail>
   </modules>

    <global>
        <rewrite>
            <ebizmarts_cakemail_account_edit>
                    <from><![CDATA[#^/customer/account/edit/(.*)#]]></from>
                    <to>cakemail/account/edit</to>
            </ebizmarts_cakemail_account_edit>
        </rewrite>

        <blocks>
            <adminhtml>
                <rewrite>
                    <newsletter_subscriber>Ebizmarts_Cakemail_Block_Adminhtml_Newsletter_Subscriber</newsletter_subscriber>
                </rewrite>
            </adminhtml>
        </blocks>

        <models>
            <cakemail>
                <class>Ebizmarts_Cakemail_Model_Cakemail</class>
                <emailtype>Ebizmarts_Cakemail_Model_Cakemail_emailtype</emailtype>
                <!--<rewrite>
                    <listids>Ebizmarts_Cakemail_Model_Cakemail_Listids</listids>
                </rewrite>-->
            </cakemail>
            <newsletter>
                <rewrite>
                    <subscriber>Ebizmarts_Cakemail_Model_Newsletter_Subscriber</subscriber>
                </rewrite>
            </newsletter>


        </models>


        <helpers>
            <Cakemail><class>Ebizmarts_Cakemail_Helper</class></Cakemail>
             <cakemail>
                <rewrite>
                      <data>Ebizmarts_Cakemail_Helper_Data</data>
                </rewrite>
            </cakemail>
        </helpers>

      <resources>
         <Cakemail_setup>
            <setup>
               <module>Ebizmarts_Cakemail</module>
            </setup>
            <connection>
               <use>core_setup</use>
            </connection>
         </Cakemail_setup>

         <Cakemail_write>
            <connection>
               <use>core_write</use>
            </connection>
         </Cakemail_write>

         <Cakemail_read>
            <connection>
               <use>core_read</use>
            </connection>
         </Cakemail_read>

      </resources>

   </global>

    <adminhtml>
        <acl>
            <resources>
                <admin>
                    <children>
                        <system>
                            <children>
                                <config>
                                    <children>
                                        <cakemail translate="title" module="cakemail">
                                            <title>cakemail Section</title>
                                            <sort_order>50</sort_order>
                                        </cakemail>
                                    </children>
                                </config>
                            </children>
                        </system>
                    </children>
                </admin>
            </resources>
        </acl>


        <!--<layout>
            <updates>
                <customerpartner module="Ebizmarts_Customerpartner">
                    <file>customerpartner.xml</file>
                </customerpartner>
            </updates>
        </layout>


    -->
    </adminhtml>

    <admin>
        <routers>
            <cakemail>
                <use>admin</use>
                <args>
                    <module>Ebizmarts_Cakemail</module>
                    <frontName>cakemail</frontName>
                </args>
            </cakemail>
        </routers>
    </admin>

    <default>
        <cakemail>
            <general>
                <active>1</active>
                <url>http://api.cakemail.com/</url>
            </general>
            <subscribe>
                <email_type>html</email_type>
                <double_optin>0</double_optin>
                <update_existing>1</update_existing>
            </subscribe>
            <unsubscribe>
                <delete_member>0</delete_member>
                <send_goodbye>0</send_goodbye>
                <send_notify>0</send_notify>
            </unsubscribe>
        </cakemail>
    </default>

</config>

系统.xml

<?xml version="1.0"?>
<config>

   <sections>
          <cakemail translate="label" module="cakemail">
            <class>separator-top</class>
            <label>Cake Mail Configuration</label>
            <tab>customer</tab>
            <sort_order>109</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">
                    <label>General</label>
                    <frontend_type>text</frontend_type>
                    <sort_order>1</sort_order>
                    <show_in_default>1</show_in_default>
                    <show_in_website>0</show_in_website>
                    <show_in_store>1</show_in_store>
                    <fields>
                        <active translate="label">
                            <label>Enabled</label>
                            <frontend_type>select</frontend_type>
                            <source_model>adminhtml/system_config_source_yesno</source_model>
                            <sort_order>1</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>0</show_in_store>
                        </active>
                        <email translate="label comment">
                            <label>E-mail</label>
                            <frontend_type>text</frontend_type>
                            <sort_order>2</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>0</show_in_store>
                            <comment>The E-mail you registered with at CakeMail.</comment>
                        </email>
                        <password translate="label comment">
                            <label>Password</label>
                            <frontend_type>text</frontend_type>
                            <sort_order>3</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>0</show_in_store>
                            <comment>Your CakeMail Password.</comment>
                        </password>
                        <client translate="label comment">
                            <label>Client</label>
                            <frontend_type>text</frontend_type>
                            <sort_order>4</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>0</show_in_store>
                            <comment>The Client E-mail.</comment>
                        </client>
                        <listid translate="label comment">
                            <label>List id</label>
                            <frontend_type>select</frontend_type>
                            <source_model>cakemail/listids</source_model>
                            <sort_order>5</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>1</show_in_store>
                            <comment>The Client's Cake Mail list id where customers will be added/removed</comment>
                        </listid>
                        <url translate="label comment">
                            <label>XML-RPC URL</label>
                            <frontend_type>text</frontend_type>
                            <sort_order>6</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>0</show_in_store>
                        </url>
                    </fields>
                </general>
              <subscribe>
                    <label>Subscribe options</label>
                        <frontend_type>text</frontend_type>
                        <sort_order>2</sort_order>
                        <show_in_default>1</show_in_default>
                        <show_in_website>0</show_in_website>
                        <show_in_store>0</show_in_store>
                        <fields>
                            <interests translate="label comment">
                                <label>Interests</label>
                                <frontend_type>text</frontend_type>
                                <sort_order>1</sort_order>
                                <show_in_default>0</show_in_default>
                                <show_in_website>0</show_in_website>
                                <show_in_store>0</show_in_store>
                                <comment>Set Interest Groups that contains a comma delimited list of Interest Groups to add.</comment>
                            </interests>
                            <opt-in translate="label comment">
                                <label>Opt-in</label>
                                <frontend_type>text</frontend_type>
                                <sort_order>2</sort_order>
                                <show_in_default>0</show_in_default>
                                <show_in_website>0</show_in_website>
                                <show_in_store>0</show_in_store>
                                <comment>Set the Opt-in IP fields.</comment>
                            </opt-in>
                            <email_type translate="label">
                                <label>Email type</label>
                                <frontend_type>select</frontend_type>
                                <source_model>cakemail/emailtype</source_model>
                                <sort_order>3</sort_order>
                                <show_in_default>0</show_in_default>
                                <show_in_website>0</show_in_website>
                                <show_in_store>0</show_in_store>
                                <comment>Email type preference for the email</comment>
                            </email_type>
                            <double_optin translate="label">
                                <label>Double optin</label>
                                <frontend_type>select</frontend_type>
                                <source_model>adminhtml/system_config_source_yesno</source_model>
                                <sort_order>4</sort_order>
                                <show_in_default>0</show_in_default>
                                <show_in_website>0</show_in_website>
                                <show_in_store>0</show_in_store>
                                <comment>Flag to control whether a double opt-in confirmation message is sent</comment>
                            </double_optin>
                            <update_existing translate="label">
                                <label>Update existing</label>
                                <frontend_type>select</frontend_type>
                                <source_model>adminhtml/system_config_source_yesno</source_model>
                                <sort_order>5</sort_order>
                                <show_in_default>0</show_in_default>
                                <show_in_website>0</show_in_website>
                                <show_in_store>0</show_in_store>
                                <comment>Flag to control whether a existing subscribers should be updated instead of throwing and error</comment>
                            </update_existing>


                        </fields>
                </subscribe>
                <unsubscribe>
                    <label>Unsubscribe options</label>
                        <frontend_type>text</frontend_type>
                        <sort_order>3</sort_order>
                        <show_in_default>1</show_in_default>
                        <show_in_website>0</show_in_website>
                        <show_in_store>0</show_in_store>
                        <fields>
                            <delete_member translate="label">
                                <label>Delete members</label>
                                <frontend_type>select</frontend_type>
                                <source_model>adminhtml/system_config_source_yesno</source_model>
                                <sort_order>1</sort_order>
                                <show_in_default>1</show_in_default>
                                <show_in_website>1</show_in_website>
                                <show_in_store>0</show_in_store>
                                <comment>Flag to completely delete the member from your list instead of just unsubscribing</comment>
                            </delete_member>
                            <send_goodbye translate="label">
                                <label>Send goodbye</label>
                                <frontend_type>select</frontend_type>
                                <source_model>adminhtml/system_config_source_yesno</source_model>
                                <sort_order>1</sort_order>
                                <show_in_default>1</show_in_default>
                                <show_in_website>1</show_in_website>
                                <show_in_store>0</show_in_store>
                                <comment>Flag to send the goodbye email to the email address</comment>
                            </send_goodbye>
                            <send_notify translate="label">
                                <label>Send notify</label>
                                <frontend_type>select</frontend_type>
                                <source_model>adminhtml/system_config_source_yesno</source_model>
                                <sort_order>1</sort_order>
                                <show_in_default>1</show_in_default>
                                <show_in_website>1</show_in_website>
                                <show_in_store>0</show_in_store>
                                <comment>Flag to send the unsubscribe notification email to the address defined in the list email notification settings</comment>
                            </send_notify>

                        </fields>
                </unsubscribe>



            </groups>
        </cakemail>

    </sections>


</config>

它在 magento 1.4 上运行良好,但我无法在 1.7 上安装它。我没有在配置中将其视为单独的部分。

提前致谢!

4

1 回答 1

0

你清除了cache吗?

我有一个可以在 中工作的演示扩展Magento 1.7,并且确实显示了一个配置部分以及一个指向它的菜单链接。

你可以在这里下载。

于 2012-08-28T19:57:21.073 回答