Hi,
I want to have a page where different divs will have the content of different modules.
Currently modules are navigated to by a left menu, which will be removed.
These are the menu items:
/customer/account/
/customer/account/edit/
/sales/order/history/
/discounts/
/customerdashboard/index/paymentdetails/
/customerdashboard/index/changepassword/
/customerdashboard/deliverydetails/edit/
Now I want just a single page with this kind of presentation:
The intended layout: +------------------+ | ------ | ------- | | module | module | | 1 | 2 | | ----- | ------- | | module | module | | 3 | 4 | | ------ | ------- | +------------------+
How can I achieve this?
Hello,
Have you tried designing a CMS page and then in the layout adding these modules.
Hello Prateek,
Not exactly.
I did create a new .phtml file which will hold all other already created .phtml files.
Some come from the customer folder, some come from the sales folder.
Just to be clear, I created my-new-page.phtml which incorporates customer/dashboard/dashboard.phtml and sales/order/history.phtml.
I've come to realize that I need to add these pages on my local.xml file. I'll give an example:
<customer_account_index>
<reference name="customer_account_dashboard">
<action method="unsetChild"><name>top</name></action>
</reference>
<reference name="my.account.wrapper">
<reference name="customer_account_dashboard">
<block type="core/template" name="customer.calendar" as="customer.calendar" template="customer/account/dashboard/customer.calendar.phtml"/>
<block type="core/template" name="customer.calendar.inactive" as="customer.calendar.inactive" template="customer/account/dashboard/customer.calendar.inactive.phtml"/>
<block type="core/template" name="customer.calendar.switch.link" as="customer.calendar.switch.link" template="customer/account/dashboard/customer.calendar.switch.link.phtml"/>
<block type="core/template" name="customer.calendar.inactive.link" as="customer.calendar.inactive.link" template="customer/account/dashboard/customer.calendar.inactive.link.phtml"/>
</reference>
</reference>
<reference name="my.account.wrapper">
<block type="sales/order_history" name="sales.order.history">
<block type="core/text_list" name="sales.order.history.info" as="info" translate="label">
<label>Order History Info</label>
</block>
</block>
<block type="customer/account_dashboard" name="customer.account.link.back" template="customer/account/link/back.phtml"/>
</reference>
<reference name="my.account.wrapper">
<block type="core/template" name="customer_your_discounts" template="customer/account/dashboard/discounts.phtml">
<block type="enterprise_reward/customer_reward_info" name="customer.reward.info.godt" template="reward/customer/reward/info.phtml"/>
<block type="enterprise_reward/customer_reward_history" name="customer.reward.history.godt" template="reward/customer/reward/history.phtml"/>
<block type="discounts/discounts" name="customer.price.rules" template="reward/pricerules.phtml"/>
<block type="discounts/discounts" name="customer.checkout.cart.coupon" template="customer/account/dashboard/coupon.phtml"/>
</block>
</reference>
</customer_account_index>I then have a sales.xml (on frontend/base/default/) which has, for example this:
<sales_order_history translate="label">
<label>Customer My Account Order History</label>
<update handle="customer_account"/>
<reference name="my.account.wrapper">
<block type="sales/order_history" name="sales.order.history">
<block type="core/text_list" name="sales.order.history.info" as="info" translate="label">
<label>Order History Info</label>
</block>
</block>
<block type="customer/account_dashboard" name="customer.account.link.back" template="customer/account/link/back.phtml"/>
</reference>
</sales_order_history>I tried previously to copy this sales.xml code to my local.xml but that didn't work so I ended up copying (from sales.xml) the part which I pasted in my local.xml example, namely this specific part:
<reference name="my.account.wrapper">
<block type="sales/order_history" name="sales.order.history">
<block type="core/text_list" name="sales.order.history.info" as="info" translate="label">
<label>Order History Info</label>
</block>
</block>
<block type="customer/account_dashboard" name="customer.account.link.back" template="customer/account/link/back.phtml"/>
</reference>This works, however I'm not sure I should be doing this in this way.
Why doesn't my initial approach work but the new one does? Is it because I'm setting my custumer/account to incorporate in the wrapper the orders history instead of having a complete new page?
I do understand that what I'm doing here is setting my 'content' to have all these modules but maybe your approach makes more sense.
Could you elaborate a little on the differences?
Best Regards,