Magento Forum

Problems overwriting OnepageController.php
 
flipmoe
Jr. Member
 
Total Posts:  1
Joined:  2008-11-28
 

Hi,

I have some problems regarding custom module and overwriting OnepageController.php. It seems that the Controller is overwritten (simple print(’It works!’) is successfull). But if I want to customize the original file (s. attachement) it doesn’t work. There is only an empty 3 column page. Any solutions or ideas?

MyCompany_All.xml:

<?xml version="1.0"?>
<config>
    <
modules>
        <
MyCompany_Test>
            <
active>true</active>
            <
codePool>local</codePool>
        </
MyCompany_Test>
    </
modules>
</
config>

config.xml:

<?xml version="1.0"?>
<config>
    <
modules>
        <
MyCompany_Test>
            <
version>0.1.0</version>
        </
MyCompany_Test>
    </
modules>
    <global>
        <
rewrite>
            <
mycompany_test_onepage>
                <
from><![CDATA[#^/checkout/onepage/#]]></from>
                
<to>/test/onepage/</to>
            </
mycompany_test_onepage>
        </
rewrite>
        <
blocks>
            <
checkout>
                <
rewrite>
                    <
onepage>MyCompany_Test_Block_Onepage</onepage>
                </
rewrite>
            </
checkout>
        </
blocks>
    </global>
    <
frontend>
        <
routers>
            <
mycompany_test>
                <use>
standard</use>
                <
args>
                    <
module>MyCompany_Test</module>
                    <
frontName>test</frontName>
                </
args>
            </
mycompany_test>
        </
routers>
    </
frontend>
</
config>

File / Directory Structure:

MyCompany
   Test
        Block
            Onepage
.php
        controllers
            OnepageController
.php
        etc
            config
.xml

Thank you!

File Attachments
OnepageController.php  (File Size: 15KB - Downloads: 67)
Onepage.php  (File Size: 6KB - Downloads: 50)
 
Magento Community Magento Community
Magento Community
Magento Community
 
mcc
Jr. Member
 
Total Posts:  1
Joined:  2009-01-21
 

I have been doing something similar and had a similar problem and adding the following to checkout.xml worked for me

<namespace_module_checkout_onepage_index>
        <
update handle="checkout_onepage_index"/>
 </
namespace_module_checkout_onepage_index>

The problem is that, while the override worked, my progress block now disappears after first click on the Continue button in the Billing section. Basically when I go to the http://.../magento/index.php/checkout/onepage/progress I get an empty page. Does anyone know what can be the problem ?

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