我如何使用下载的magento模块

时间:2014-08-22 21:03:17

标签: php magento

我正在尝试使用以下magento模块https://github.com/netz98/N98_LayoutHelper来删除帐户信息中心链接。我在我的ftp上复制了应用程序的内容,并使用

更新了local.xml文件
<customer_account>
<reference name="customer_account_navigation">
    <action method="removeLink"><name>OAuth Customer Tokens</name></action>
    <action method="removeLink"><name>billing_agreements</name></action>
    <action method="removeLink"><name>recurring_profiles</name></action>
    <action method="removeLink"><name>downloadable_products</name></action>
</reference>
</customer_account>

但访问我的帐户页面时出现此错误

  Invalid method Mage_Customer_Block_Account_Navigation::removeLink(Array
    (
    [0] => OAuth Customer Tokens
    )
    )

    Trace:
    #0 [internal function]: Varien_Object->__call('removeLink', Array)
    #1 [internal function]: Mage_Customer_Block_Account_Navigation->removeLink('OAuth     Customer ...')
    #2 /home/x28vfrmrm/public_html/cris/app/code/core/Mage/Core/Model/Layout.php(348): call_user_func_array(Array, Array)
    #3 /home/x28vfrmrm/public_html/cris/app/code/core/Mage/Core/Model/Layout.php(214): Mage_Core_Model_Layout->_generateAction(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
    #4 /home/x28vfrmrm/public_html/cris/app/code/core/Mage/Core/Model/Layout.php(210): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
    #5 /home/x28vfrmrm/public_html/cris/app/code/core/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks()
   #6 /home/x28vfrmrm/public_html/cris/app/code/core/Mage/Core/Controller/Varien/Action.php(269): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
   #7 /home/x28vfrmrm/public_html/cris/app/code/core/Mage/Customer/controllers/AccountController.php(107): Mage_Core_Controller_Varien_Action->loadLayout()
   #8 /home/x28vfrmrm/public_html/cris/app/code/core/Mage/Core/Controller/Varien/Action.php(419): Mage_Customer_AccountController->indexAction()
   #9 /home/x28vfrmrm/public_html/cris/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index')
   #10 /home/x28vfrmrm/public_html/cris/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
   #11 /home/x28vfrmrm/public_html/cris/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
   #12 /home/x28vfrmrm/public_html/cris/app/Mage.php(683): Mage_Core_Model_App->run(Array)
   #13 /home/x28vfrmrm/public_html/cris/index.php(87): Mage::run('', 'store')
   #14 {main}

我需要在哪里复制模块的其他两个文件(modman和composer.json) 谢谢你提前帮助我

1 个答案:

答案 0 :(得分:1)

在这里,我建议您从客户帐户信息中心删除工作代码链接

您可以在local.xml

中使用相同的代码

<customer_account>

         <reference name="left">

            <!--Unset the whole block then add back later-->
            <action method="unsetChild"><name>customer_account_navigation</name></action>

            <block type="customer/account_navigation" name="customer_account_navigation" before="-" template="customer/account/navigation.phtml"> 
            <action method="addLink" translate="label" module="customer"><name>account</name><path>customer/account/</path><label>Account Dashboard</label></action>
              <action method="addLink" translate="label" module="customer"><name>account_edit</name><path>customer/account/edit/</path><label>Account Information</label></action>
            <action method="addLink" translate="label" module="customer"><name>address_book</name><path>customer/address/</path><label>Address Book</label></action>            
                <action method="addLink" translate="label" module="sales"><name>orders</name><path>sales/order/history/</path><label>My Orders</label></action>
                <action method="addLink" translate="label" module="review"><name>reviews</name><path>review/customer</path><label>My Product Reviews</label></action>
                <action method="addLink" translate="label" module="wishlist" ifconfig="wishlist/general/active"><name>wishlist</name><path>wishlist/</path><label>My Favorite</label></action>            

               <action method="addLink" translate="label" module="newsletter"><name>newsletter</name><path>newsletter/manage/</path><label>Newsletter Subscriptions</label></action>

            </block>
        </reference>
</customer_account>

</layout>

修改

<action method="addLink" translate="label" module="newsletter"><name>newsletter</name><path>newsletter/manage/</path><label>Newsletter Subscriptions</label></action>

希望这对您有用。

请告诉我是否可以为您提供更多帮助。