2014-04-08 3 views
1

내 고객 계좌 대시 보드에 password.phtml 인 새로운 고객 계정 탐색 링크를 추가하는 데 문제가 있습니다. 나는 약간의 포스트를 여기에서 본다. 그러나 나는 Magento에서 새로운 I 'm로서 약간 혼란 스럽다. 아래는 제 코드입니다.Magento 새로운 고객 계정 탐색 링크 추가

내 모듈 /customer/account/password.phtml 만든

<config> 
    <modules> 
    <Don_Configs> 
     <active>true</active> 
     <codePool>local</codePool> 
     <version>0.1.0</version> 
    </Don_Configs> 
    </modules> 
</config> 

추가 된

<?php 
    class Don_Configs_Block_Password extends Mage_Core_Block_Template { 
    public function _prepareLayout() 
     { 
      return parent::_prepareLayout(); 
     } 
    } 
?> 

<customer_account translate="label"> 
    <reference name="left"> 
    <block type="customer/account_navigation" name="customer_account_navigation" before="-" template="customer/account/navigation.phtml"> 
     <action method="addLink" translate="label" module="customer"> 
     <name>password</name> 
     <path>customer/password/</path> 
     <label>Password</label> 
     </action> 
    </block> 
    </reference> 
</customer_account> 

내 Password.php을 local.xml하는 Don_Configs.xml

입니다

My Pas swordController.php

<?php 

class Don_Configs_PasswordController extends Mage_Core_Controller_Front_Action { 
    public function indexAction() 
    {   

     if(!Mage::getSingleton('customer/session')->isLoggedIn()) 
     { 
      Mage::app()->getFrontController()->getResponse()->setRedirect(Mage::getUrl('customer/account')); 
      return false; 
     }  
     $this->loadLayout(); 
     $this->_initLayoutMessages('customer/session'); 

     $this->getLayout()->getBlock('head')->setTitle($this->__('Update Password')); 
     $this->renderLayout(); 
    } 

} 

?> 

고마워요!

+0

와 local.xml 업데이트하려고? – Ansyori

답변

1

은 config.xml에 파일을 붙여 넣을 수있는이

<customer_account> 
     <reference name="customer_account_navigation"> 
      <action method="addLink" translate="label"> 
       <name>password</name> 
       <path>customer/password/</path> 
       <label>Password</label> 
      </action> 
     </reference> 
    </customer_account> 
+0

안녕 Ansyori. 답장을 보내 주셔서 감사합니다. 나는 지금 일하는 것이있다. :) – user3364265

+1

@ user3364265, 나는 당신이 대답으로 받아 들여야한다고 믿습니다. 그리고 미래에 magento 질문에 대한 더 나은 곳은 [magento stackexchange site] (http://magento.stackexchange.com)입니다. – Prateek

관련 문제