Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Getting desparate on trying to add a new page to the “My Account” section
 
rteague612
Member
 
Avatar
Total Posts:  48
Joined:  2008-07-29
 

Make the link that I added to the customer account navigation(on the left) work?

I have sucessfully added the link to the navigation, but I do not know what path to give it or waht parameters to send or how the hell to make it rewrite to go to the page that I need it to go to.  Do I make a new controller, overide an existing one.  Argh!!!!! I am getting so frustrated.

any help is appreciated. 

Thanks-Richard

 
Magento Community Magento Community
Magento Community
Magento Community
 
nikefido
Guru
 
Avatar
Total Posts:  481
Joined:  2008-07-11
New Haven, CT
 

I think we need a bit more information to help you. What is your intention in the link? Is it some new functionality or building on existing?

Chances are that fiddling with (or creating) a controller will be involved. You might be creating a new module, overriding an existing controller, or all of the above.

 
Magento Community Magento Community
Magento Community
Magento Community
 
rteague612
Member
 
Avatar
Total Posts:  48
Joined:  2008-07-29
 

Well, I added an “Upload CSV File” link to the left account navigation menu.  When they click it, I want it to load and upload form in the content block.

 
Magento Community Magento Community
Magento Community
Magento Community
 
MageParts
Guru
 
Avatar
Total Posts:  415
Joined:  2007-11-18
 

Question: So you already have the form?
If so: Make sure that the forms action argument is correct and then submit the form using a javascript (javascrip:$(’your_form’).submit();).

You’ll need a custom controller for this, this file should serve as a pretty good example: app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php. Check out the saveAction function. This tutorial could also be helpful http://www.tizag.com/phpT/fileupload.php.

Hope it helps smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
rteague612
Member
 
Avatar
Total Posts:  48
Joined:  2008-07-29
 

Thank you, I will check it out!!

 
Magento Community Magento Community
Magento Community
Magento Community
 
rteague612
Member
 
Avatar
Total Posts:  48
Joined:  2008-07-29
 

Okay, so I have my controller pointing to the new page and the new page loads.  However, I want that new page to have all of the same my account information as the standard my account pages.

my config.xml for my module is this.

<?xml version="1.0"?>
<config>
    <
modules>
        <
Company_CompanyUpload>
            <
version>1.0.0</version>
            <
depends><!-- no dependencies --></depends>
        </
Company_CompanyUpload>
    </
modules>
    <global>
        <
blocks>
            <
customer>
                <
rewrite>
                    <
account_navigation>Company_CompanyUpload_Block_Navigation</account_navigation>
                </
rewrite>              
            </
customer>
        </
blocks>
    </global>   
    <
frontend>
        <
routers>
            <
company_companyupload>
                <use>
standard</use>
                <
args>
                <
module>Company_CompanyUpload</module>
                <
frontName>companyupload</frontName>
                </
args>
            </
company_companyupload>
        </
routers>
        <
layout>
            <
updates>
                <
companyupload>
                    <
file>companyupload.xml</file>
                </
companyupload>
            </
updates>
        </
layout>
    </
frontend>
</
config>

what needs to be in the companyupload.xml and what needs to be referencend in the indexAction() method of the controller in order to load those elements?

 
Magento Community Magento Community
Magento Community
Magento Community
 
rteague612
Member
 
Avatar
Total Posts:  48
Joined:  2008-07-29
 

basically, I want my page to look like a my account page but with an upload form in the content are.

 
Magento Community Magento Community
Magento Community
Magento Community
 
nikefido
Guru
 
Avatar
Total Posts:  481
Joined:  2008-07-11
New Haven, CT
 

I believe in that case, rather than making a new controller, you should override the existing controller via a new module and add your formSubmitAction into it.

Within your new module, you can also create a block / template file - this is where you can put your form.

You can then add your new module to the “my account” page via the layout xml files. (most likely app\design\frontend\default\default\layout\customer.xml)

This thread:  http://www.magentocommerce.com/boards/viewthread/17484/ might help you along with overriding a controller.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top