dongpi3237 2014-08-22 21:03
浏览 59

我如何使用下载的magento模块

I am trying to use the following magento module https://github.com/netz98/N98_LayoutHelper to remove account dashboard links. I copied the content of app over app on my ftp and updated the local.xml file with

<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>

but I get this error when accesing the my account page

  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}

Where do i need to copy the other two files of the module (modman and composer.json) thank you in advance for helping me

  • 写回答

1条回答 默认 最新

  • dongyun3897 2014-08-23 04:31
    关注

    Here i can suggest you to remove link from customer account dashboard a working code

    you can same code in 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>
    

    EDIT

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

    hope this will sure work for you.

    let me know if i can help you more.

    评论

报告相同问题?

悬赏问题

  • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
  • ¥20 怎么用dlib库的算法识别小麦病虫害
  • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
  • ¥15 java写代码遇到问题,求帮助
  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?