cancel
Showing results for 
Search instead for 
Did you mean: 

Best way to add phtml to customer dashboard

SOLVED
   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

Best way to add phtml to customer dashboard

Hi,

 

I want to add a custom phtml to the customer account dashboard.

I find a solution by copying the dashboard.phtml to my own template and adding a my custom phtml.

 

Is there another solution?

Whats the best way to do that?

 

Regards

Marco

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Best way to add phtml to customer dashboard

Hello,

 

In my opinion, I think the best way to this is that we will copy exist dashboard.phtml from base/default or rwd/default theme to your current theme.

There is another solution: you create new template, you change xml layout to your custom template. For example: assume that your current theme is rwd/default:

You create customdashboard.phtml template and put it under customer/account folder. Go to customer.xml, find customer_account_index, change:

<block type="customer/account_dashboard" name="customer_account_dashboard" template="customer/account/dashboard.phtml">

 

to your custom dashboard:

 <block type="customer/account_dashboard" name="customer_account_dashboard" template="customer/account/customdashboard.phtml">

 

Problem solved? Click Accept as Solution!

View solution in original post

2 REPLIES 2

Re: Best way to add phtml to customer dashboard

Hello,

 

In my opinion, I think the best way to this is that we will copy exist dashboard.phtml from base/default or rwd/default theme to your current theme.

There is another solution: you create new template, you change xml layout to your custom template. For example: assume that your current theme is rwd/default:

You create customdashboard.phtml template and put it under customer/account folder. Go to customer.xml, find customer_account_index, change:

<block type="customer/account_dashboard" name="customer_account_dashboard" template="customer/account/dashboard.phtml">

 

to your custom dashboard:

 <block type="customer/account_dashboard" name="customer_account_dashboard" template="customer/account/customdashboard.phtml">

 

Problem solved? Click Accept as Solution!

Re: Best way to add phtml to customer dashboard

Thanks for your suggestions.

I decided to create a copy of dashboard.phtml to make my changes, because this better for updates.