How to add customer dashboard tab at fronside?


first of all create one phtml file that contain your content at customer/account/dashboard/product.phtml

then in customer.xml add below code

<customer_account_myproduct translate="label">
 <label>Customer Payment Edit Form</label>
 <update handle="customer_account"/>
 <reference name="content">
 <block type="core/template" name="payment_info" as="payment_info" output="" template="customer/account/dashboard/product.phtml"/>
 </reference>
 </customer_account_myproduct>
Then add link for that page
<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>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="customer"><name>my_product</name><path>customer/account/myproduct/</path><label>My Product</label></action></code></code></block>
 <remove name="tags_popular"/>
 <remove name="leftnav" />
 <remove name="left.permanent.callout" />
 </reference>
and then in Accountcontroller give Action for render layout
public function myproductAction()
 {$this->loadLayout();
 $this->getLayout()->getBlock('head')->setTitle($this->__('My Product'));
 $this->renderLayout();
 }
Happy Codding 🙂
Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s