Call-back icon  Sales: Call 800.374.8146 (N America)|757.278.0920 (International)

Magento

Open Source eCommerce Evolved

Magento Forum

   
Overriding Onepage
 
bsboard
Jr. Member
 
Total Posts:  15
Joined:  2008-03-18
 

I have successfully modified the onepage checkout to what I need for a unique B2B install (this involved removing steps). Everything works great, but now I need to abstract my changes into the local codebase, so my core files aren’t modified.

I changed the following file in /app/code/core/Mage/:

Checkout/Block/Onepage.php [getSteps method]
Checkout/controllers/OnepageController.php [saveBillingAction and saveShippingAction]
Checkout/Model/Type/Onepage.php [saveBilling and saveShipping]

any attempts to abstract these changes to the /local/ folder have failed, mainly do to outdated and incomplete tutorials in the wiki. Any help you can offer would be GREATLY appreciated.

 
Magento Community Magento Community
Magento Community
Magento Community
 
bsboard
Jr. Member
 
Total Posts:  15
Joined:  2008-03-18
 

Can noone help me at all? Has anyone successfully extended core modules after the v1 release? I tried putting my code in the local directory, then followed this tutorial: http://www.magentocommerce.com/wiki/groups/174/changing_and_customizing_magento_code

and added this to my app/etc/local.xml:

<modules>
            <
recway_checkout>
               <
active>true</active>
               <
codePool>local</codePool>
            </
recway_checkout>
         </
modules>
         <
blocks>
            <
checkout>
               <
rewrite>
                  <
checkout_onepage>Recway_Checkout_Block_Onepage</checkout_onepage>
               </
rewrite>
            </
checkout>
         </
blocks>

However after doing this, the software still wasn’t using my new code. Not real surprising it didn’t work, since the tutorial is .3 versions old. I’m trying to take things one step at a time, so first am just trying to get the Onepage.php Block to work correctly. Please help!

 
Magento Community Magento Community
Magento Community
Magento Community
 
fenix
Jr. Member
 
Total Posts:  16
Joined:  2008-02-18
 

Hi there,
Could you please explain how you managed to change the onepage?

I myself have a simalar problem.

I posted a thread here:
http://www.magentocommerce.com/boards/viewthread/7693/

but no response till now for me either.

So maybe you could help me to remove the:
State/Province
Country

fields from the billing step and add my own fields instead? ( and get them processed)

Or adding a custom step?

I already know about the getSteps() method in :Checkout\Block\Onepage.php
But as you should have discovered, just putting one step between them is not working.

I have no time any more at the moment, but I will look at your problem too because I think that if we could resolve this
we would have learned a lot about customizing Magento.

thanks and by

Fenix

 
Magento Community Magento Community
Magento Community
Magento Community
 
bsboard
Jr. Member
 
Total Posts:  15
Joined:  2008-03-18
 

Sorry for the wait fenix (I only work this job monday-wednesday).

It sounds like my customizations were a little easier then yours. I just needed to remove shipping/payment information completely. What I ended up doing was setting up a “free shipping” and “Pay by Check” options on the backend. Then I edited the magento code directly, so that when you click submit from shipping info, it automatically calls the shipping method and payment method functions with hard-coded values.

Its been a while since I worked on this, so I don’t remember exactly what files I changed. If this seems at all helpful to you I can diff the directories and tell you exactly what I did. Let me know.

 
Magento Community Magento Community
Magento Community
Magento Community
 
laurent
Member
 
Total Posts:  47
Joined:  2007-08-31
Paris, France
 

Here is my code:

<config>
    <global>
        <
blocks>
            <
checkout>
                <
rewrite>
                    <
onepage>PleinAir_Checkout_Block_Onepage</onepage>
                </
rewrite>
            </
checkout>
        </
blocks>
        <
modules>
            <
PleinAir_Checkout>
                <
active>true</active>
                <
codePool>local</codePool>
            </
PleinAir_Checkout>
        </
modules>
        
[....]
    
</global>
</
config>
Note that case must be respected. ‘<PleinAir_Checkout>’ reflects directories names.

 
Magento Community Magento Community
Magento Community
Magento Community
 
RichardWork
Jr. Member
 
Total Posts:  10
Joined:  2008-04-17
 

Hi bsboard,

We are trying to do the same thing as you, remove the shipping method and payment information steps. So if you could outline the method you used. I have got the form to preselet “Free Shipping”, but not to jump through the section.

Cheers

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
 
Sales: Call 800.374.8146 (North America) 757.278.0920 (International)
© Copyright 2008 Varien. Magento is a trademark of Irubin Consulting Inc. DBA Varien
Privacy Policy|Terms of Service
Magento Community Count
33532 users|419 users currently online|74453 forum posts