Try the Demo

Magento

eCommerce Software for Online Growth

Magento Forum

Our new hosted solution for small & emerging businesses
   
Overriding checkout/cart without copying all code…
 
mrpunkin
Jr. Member
 
Total Posts:  12
Joined:  2008-10-24
 

Can someone please explain in detail the steps I need to take to override the default indexAction method in Mage_Checkout_CartController with my own modules code where I can add the few lines I need and still reference parent::indexAction()? I finally got this working where it functions correctly, but now when it has to redirect to the cart it redirects to simplecheckout/cart/index in the URL instead of checkout/cart. This is unacceptable. It needs to redirect at all times to the right place and URL. Can anyone help me figure out what I am doing wrong here?

<?xml version="1.0"?>
<config>
    <
modules>
        <
Pediment_SimpleCheckout>
            <
version>0.1.0</version>
        </
Pediment_SimpleCheckout>
    </
modules>
    <global>
        <!-- ... -->
        <
rewrite>
            <
simplecheckout>
                <
from><![CDATA[#^/checkout/simple#]]></from>
                
<to>/simplecheckout/checkout</to>
            </
simplecheckout>
            <
simplecheckout_cart>
                <
from><![CDATA[#^/simplecheckout/cart/index#]]></from>
                
<to>/checkout/cart</to>
            </
simplecheckout_cart>
        </
rewrite>
        <
routers>
            <
checkout>
                <
rewrite>
                    <
cart>
                        <
to>Pediment_SimpleCheckout/cart</to>
                    </
cart>
                </
rewrite>
            </
checkout>
        </
routers>
        <!-- ... -->
    </global>
    <
frontend>
        <
secure_url>
            <
simplecheckout>/checkout/simple</simplecheckout>
        </
secure_url>
        <
routers>
            <
simplecheckout>
                <use>
standard</use>
                <
args>
                    <
module>Pediment_SimpleCheckout</module>
                    <
frontName>simplecheckout</frontName>
                </
args>
            </
simplecheckout>
        </
routers>
        <!-- ... -->
    </
frontend>
</
config>

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
 
© Copyright 2012 Magento Inc.
Privacy Policy|Terms of Service
Magento Community Count
697453 users|1888 users currently online|496724 forum posts