:: create a new module to add a new link in My Dashboard and then showing some information ::
>> Using 'Magento Module Creator' I just create a new module named 'custommodule'
Now if you want to bring this new module in the customer account dashboard (in the navigation panel) as well
First edit the custommodule.xml file in app/design/frontend/default/default/layout/
Previous content will be like as
<?xml version="1.0"?>
<layout version="0.1.0">
<default>
</default>
<custommodule_index_index>
<reference name="content">
<block type="custommodule/custommodule" name="custommodule" template="custommodule/custommodule.phtml" />
</reference>
</custommodule_index_index>
</layout>
Replace with =================================
<?xml version="1.0"?>
<layout version="0.1.0">
<default>
</default>
<customer_account>
<reference name="customer_account_navigation">
<action method="addLink" translate="label" module="custommodule"><name>custommodule</name><path>custommodule/</path><label>Custom Module</label></action>
</reference>
</customer_account>
<customer_account_index>
<reference name="right">
<action method="unsetChild"><name>custommodule</name></action>
</reference>
</customer_account_index>
<custommodule_index_index>
<update handle="customer_account"/>
<reference name="content">
<block type="custommodule/custommodule" name="custommodule" template="custommodule/custommodule.phtml" />
</reference>
<reference name="right">
<action method="unsetChild"><name>custommodule</name></action>
</reference>
</custommodule_index_index>
</layout>
*********** Good Luck **********
Excellent great tutorial.
ReplyDelete