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

How to rewrite checkout/onepage
 
PavelPolyakov
Sr. Member
 
Total Posts:  98
Joined:  2009-08-17
 

Hi, I’m trying to ovewrite checkout/onepage with my own class. But have a strange problem.

What I do:

1. In my module config.xml I have placed this part of configuration:

<global>
        <
rewrite>
            <
Total_Wsrisk_checkout_onepage>
                    <
from><![CDATA[#^/checkout/onepage/#]]></from>
                    
<to>/fwsrisk/checkout_onepage/</to>
            </
Total_Wsrisk_checkout_onepage>
       </
rewrite>
...
</global>
...
 <
frontend
    <
routers>
        <
fwsrisk>
                <use>
standard</use>
                <
args>
                        <
module>Total_Wsrisk</module>
                        <
frontName>fwsrisk</frontName>
                </
args>
        </
fwsrisk>
       </
routers>   
...
</
frontend>

2. I create my own controller and place it under this path /app/code/local/Total/Wsrisk/controllers/Checkout/OnepageController.php
Here is its code:

<?php
require_once 'Mage/Checkout/controllers/OnepageController.php';

class 
Total_Wsrisk_Checkout_OnepageController extends Mage_Checkout_OnepageController
{

}

After this I’m trying to open checkout/onepage and see my default checkout (because I didn’t write nothing into the child controller yet).
But I get the next (see attachment).

I get the blank content. But what is interesting - the title of the page is correct. So, definetely, controller rewriting is working.
But other things not.

What have I missed?

Thanks. Waiting for your answer.

btw I were doing all of code below with the help of this tutorial: http://www.magentix.fr/modules-magento/inscription-newsletter-enregistrement-onepage-achats.html#comments (I don’t understand french so I have used only code examples).

Image Attachments
checkout_blank.png
 
Magento Community Magento Community
Magento Community
Magento Community
 
Brent W Peterson
Moderator
 
Avatar
Total Posts:  3217
Joined:  2009-02-26
Minneapolis MN
 

You could make your own module and add a helper onto the procedure you want to do. I am not sure what you are trying to accomplish

 
Magento Community Magento Community
Magento Community
Magento Community
 
PavelPolyakov
Sr. Member
 
Total Posts:  98
Joined:  2009-08-17
 

It is the part of what I need to do to add additional field to the billing information step.

http://www.magentocommerce.com/boards/viewthread/176280/

http://www.magentocommerce.com/boards/viewthread/59040/

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