Adam92
Adam92

Reputation: 436

Magento: Add Extra Page to Customer Section

I'm trying to implement a simple page which will be part of the customer section on my test website, I want the page to appear on the following link:

domain.com/customer/requests

Just like other examples already in place by default:

domain.com/customer/account
domain.com/customer/forgotpassword
domain.com/customer/account/create

I've have tried so many different suggestions but I'm not getting anywhere and just receiving 404 errors.

I know how to control the page content, but I'm struggling to actually link my template page to a real URL.

<reference name="content">
            <block type="customer/requests" name="requests" template="customer/requests/index.phtml" />
</reference>

Any help would be greatly appreciated.

Upvotes: 0

Views: 29

Answers (1)

Joe
Joe

Reputation: 1340

There are two options for this:

  1. For developers: create a custom module that overrides the customer controller and adds requestsAction().

    • If this is what you are doing, then I need to see some more information, specifically your config.xml file and controller file, to help you further. If you don't know how to do this, then I'd recommend reading up on some tutorials for creating modules and overriding controllers. Though, if you're not savy with PHP, or you don't want to do all that programming, then I'd recommend #2.
  2. For admins: create a CMS page and add a redirect to it:

    • Create a CMS page, name it "customer-requests". Add your content. Save.
    • Go to Catalog -> URL Rewrite Management.
    • Click Add Url Rewrite
    • Select custom.
    • Set these values in the fields:

      Request path: customer/requests
      Target path: customer-requests
      ID path: customer-customer-requests-redirect (or whatever you want, just has to be unique) 
    • Click Save and clear your cache.

Upvotes: 0

Related Questions