Magento Notes – How to modify customer dashboard

After searching high and low to see if I can find anything related to modifying the customer dashboard, I was surprised that nobody had this request in the forum, or that most people are just so satisfied with Magento’s dashboard out of the box…by all means, it’s very very good, but every client has their unique requests….so..

The scenario deals with client wanting a section for registered users to be able to download product catalogs and price sheets, but they don’t want to make it publicly accessible by anyone who browses their web site.  So what better place to put it then in the customer dashboard (attached picture shows the desired outcome, with a “Download” section at the bottom.

To achieve, this i had to modify 2 files: dashboard.phtml under /app/design/frontend/default/yourtemplate/template/customer/account/ and also customer.xml under /app/design/frontend/default/yourtemplate/layout/, and then lastly add a separate file called download_links.phtml and save it in a newly created folder called “downloadlinks” under /app/design/frontend/default/yourtemplate/template/

In the dashboard.phtml, after line 38, simply add:

<div class=”head”>
<h4><?php echo $this->__(‘Download Links’) ?></h4>
</div>
<?php echo $this->getChildHtml(‘downloadlinks’) ?>

this code will sit right after the following code block:

<div class=”account-box ad-account-info”>
<div class=”head”>
<h4><?php echo $this->__(‘Account Information’) ?></h4>
</div>
<?php echo $this->getChildHtml(‘info’) ?>
<?php echo $this->getChildHtml(‘address’) ?>

In customer.xml, simply add:

<block type=”core/template” name=”customer_download_links” as =”downloadlinks” template=”downloadlinks/download_links.phtml”/>

inside the reference block near line 209, the block that starts with “customer_account_index

Lastly in the new file: download_links.phtml, you can put in php code or just simply html, in my case, i simply added some simple URL links for now..so my block looks like:

Your downloadable files:<br/>
<a href=”">2009 Product Catalog</a><br/>
<a href=”">2009 Price Sheet</a><br/>
<a href=”">Credit Application</a><br/>

Hope someone will find this tutorial helpful.

Comments are closed.