<?xml version="1.0" encoding="UTF-8"?> <config> <modules> <Mymodule_Customerpage> <active>true</active> <codePool>community</codePool> </Mymodule_Customerpage> </modules> </config>
Step 2: Define your module config file for all actions like below : app\code\community\Mymodule\Customerpage\etc\config.xml
<?xml version="1.0" encoding="UTF-8"?> <config> <modules> <Mymodule_Customerpage> <version>1.0.0</version> </Mymodule_Customerpage> </modules> <frontend> <layout> <updates> <mymodule_customerpage module="Mymodule_Customerpage"> <file>mymodule_customerpage.xml</file> </mymodule_customerpage> </updates> </layout> <routers> <mymodule_customerpage> <use>standard</use> <args> <module>Mymodule_Customerpage</module> <frontName>mymodule_customerpage</frontName> </args> </mymodule_customerpage> </routers> </frontend> <global> <helpers> <mymodule_customerpage> <class>Mymodule_Customerpage_Helper</class> </mymodule_customerpage> </helpers> </global> </config>
Step 3: Creating the Controller Action Method http://store.example.com/mymodule_customerpage/index/index/ app\code\community\Mymodule\Customerpage\controllers\IndexController.php
<?php class Mymodule_Customerpage_IndexController extends Mage_Core_Controller_Front_Action { public function preDispatch() { parent::preDispatch(); $action = $this->getRequest()->getActionName(); $loginUrl = Mage::helper('customer')->getLoginUrl(); if (!Mage::getSingleton('customer/session')->authenticate($this, $loginUrl)) { $this->setFlag('', self::FLAG_NO_DISPATCH, true); } } public function indexAction() { $this->loadLayout(); $this->renderLayout(); } }
Step 4 : Creating the helper app\code\community\Mymodule\Customerpage\Helper\Data.php
<?php class Mymodule_Customerpage_Helper_Data extends Mage_Core_Helper_Abstract { }
Step 4 : Creating our Page Content a) app\design\frontend\base\default\layout\mymodule_customerpage.xml
<layout> <customer_account> <reference name="customer_account_navigation"> <action method="addLink"> <name>my_module_section</name> <path>mymodule_customerpage/index/index</path> <label>My Module Link</label> </action> </reference> </customer_account> <mymodule_customerpage_index_index> <update handle="customer_account" /> <reference name="my.account.wrapper"> <block type="core/template" name="mymodule_customerpage_content" template="mymodule_customerpage.phtml"/> </reference> </mymodule_customerpage_index_index> </layout>
b) app\design\frontend\base\default\template\mymodule_customerpage.phtml
<div class="dashboard"> <?php echo $this->getMessagesBlock()->getGroupedHtml() ?> <div class="box-account box-info"> <div class="box-head"> <h2><?php echo $this->__('My Module Link') ?></h2> </div> </div> </div>
You can download the complete module for this article here.
[sociallocker]hi adesh[/sociallocker]
Result Window :
Thankfulness to my father who informed me concerning this blog, this website is really awesome.
My brother suggested I might like this web site. He was totally right.
This post actually made my day. You can not imagine simply how much time I had spent for this info!
Thanks!
You’ve done a formidable job and our entire community will
be grateful to you.
I am not sure where you are getting your info, but great topic.
I needs to spend some time learning much more or
understanding more. Thanks for wonderful information I was looking for this
information for my mission.
Appreciate the recommendation. Let me try it out.
Hello! I’m at work browsing your blog from my new iphone
4! Just wanted to say I love reading through your blog and look forward to all your
posts! Keep up the fantastic work!
Sweet blog! I found it while browsing on Yahoo News.
Do you have any suggestions on how to get listed in Yahoo News?
I’ve been trying for a while but I never seem to get there!
Thank you
Pretty section of content. I just stumbled upon your site and in accession capital to assert
that I get actually enjoyed account your blog posts.
Anyway I will be subscribing to your feeds and even I achievement you access consistently fast.
Hello http://www.adeshsuryan.in admin, i see some fresh posts daily.
thanks for nice blog and tech topic.
Nice write-up, thanks.
Thanks for this tutorial Adesh
not working after new patche updated…lol
Hi Dev,
First of all thanks for your view and concern.
Topic account-navigation
is not depends on patch. You can debug your extension via Modules Conflict Detector .
I have created a custom link in customer navigation, now on click of the link, i need to get a action button, which then redirects to a page which should have different fields for the customer to add info in the text box.
Suggest on how to proceed.
on click of this link, i need to get a action button which allows customer to add different entries in text box. please suggest on this
Hi,
Thank you for the nice blog.
Can you please tell me how to add custom link in this module.where are all the places that i should change?
Thank you
Hi Rahul,
You can add multiple links via XMl. But nature of link is depends on requirement.
Test module file path : app\design\frontend\base\default\layout\mymodule_customerpage.xml
Hi Adesh,
Thank you for the help.
Can you please tell me one more thing.
The Custom menu is comming in the default menu.
how to change its location as I’ve a custom menu in the seller dashboard adn i want this custom menu to be displayed in the custom menu section.
Thank you
In my account new tab is visible but the page gives error 404, I followed all the steps but not working, Can anyone please help