Add Additionla link in Customer Page
1. app/design/frontend/default/theam/layout/customer.xml
2. Add below code in <customer_account translate="label"> handle left part
<action method="addLink" translate="label" module="customer"><name>test</name><path>customer/test/</path><label>My Test</label></action>
3. add below code in xml file
<customer_test_index translate="label">
<label>Customer My Test</label>
<update handle="customer_account"/>
</customer_myships_index>
4. craete controller and block file in below location
app/code/core/mage/customer/block/test.php
add code in block file
class Mage_Customer_Block_Test extends Mage_Core_Block_Template
{
public function __construct()
{
parent::__construct();
$this->setTemplate('customer/test.phtml');
}
}
app/code/core/mage/customer/controllers/TestControler.php
add code in testcontroller
class Mage_Customer_TestController extends Mage_Core_Controller_Front_Action
{
public function indexAction()
{
$this->loadLayout();
$this->getLayout()->getBlock('content')->append(
$this->getLayout()->createBlock('customer/test')
);
$this->renderLayout();
}
5. create file test.phtml in app/design/frontent/theme/customer/test.phtml
add code in file
<div class="page-title">
<h1><?php echo $this->__('My Ships'); ?></h1>
</div>
Now login from frontend and you show the test link add in your account page
1. app/design/frontend/default/theam/layout/customer.xml
2. Add below code in <customer_account translate="label"> handle left part
<action method="addLink" translate="label" module="customer"><name>test</name><path>customer/test/</path><label>My Test</label></action>
3. add below code in xml file
<customer_test_index translate="label">
<label>Customer My Test</label>
<update handle="customer_account"/>
</customer_myships_index>
4. craete controller and block file in below location
app/code/core/mage/customer/block/test.php
add code in block file
class Mage_Customer_Block_Test extends Mage_Core_Block_Template
{
public function __construct()
{
parent::__construct();
$this->setTemplate('customer/test.phtml');
}
}
app/code/core/mage/customer/controllers/TestControler.php
add code in testcontroller
class Mage_Customer_TestController extends Mage_Core_Controller_Front_Action
{
public function indexAction()
{
$this->loadLayout();
$this->getLayout()->getBlock('content')->append(
$this->getLayout()->createBlock('customer/test')
);
$this->renderLayout();
}
5. create file test.phtml in app/design/frontent/theme/customer/test.phtml
add code in file
<div class="page-title">
<h1><?php echo $this->__('My Ships'); ?></h1>
</div>
Now login from frontend and you show the test link add in your account page
magento expert developers are the most experienced developers in their respective fields.
ReplyDeleteThis is a great post. I like this topic.This site has lots of advantage. It helps me in many ways.Thanks for posting this again.
ReplyDeletemagento development company in bangalore
Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic. If possible, as you gain expertise, would you mind updating your blog with more information? It is extremely helpful for me.
ReplyDeletenewizze.com