while writing the reply post i noticed that i forgot to put in the MyModule bit into the class name.. fix it and it works thanks a million!
i am slightly wondering what the direction in the checkout.xml are for now though (update handle), hence it works for me w/a any change pointing to my custom class in the checkout.xml at the moment… do you know why that is, or in what case i actually do need to update the handle?
since i am talking to the expert. do you also know in from top of your head how i would need to define the etc/local.xml file in order to achieve exactly this by not creating a custom module but simply overriding it?
I know that this is a month old thread but I can’t find any other newer threads relating to overloading controllers.
I followed the directions in the tutorial Jonathan posted using my install of Magento, version 1.0.19870.1, and it was not working. This started driving me crazy, and then I tried adding the url rewrite directly to the database versus having it in the XML config file. I used the following code, taken from zburnham’s post earlier in this topic:
Is there something outdated in the code used in Jonathan’s tutorial for editing the file /app/code/local/MyNameSpace/MyModule/etc/config.xml which would cause this not to work?
Also, when editing the file /app/etc/modules/MyNameSpace_All.xml where do the following code additions need to be placed within that file?
The tutorial does not mention specifically where this code should be entered in the file? I simply stuck it inside the <layout> and </layout> tags on it’s own and not nested inside any other tags. Is this correct? (it’s working for me this way but I just want to be sure)
Show us an example of your code and i will see if i can help.
For me it worked like this in 1.1.2.
in my config.xml file in the GLOBAL section i had this
<global> <!-- Front - controllers --> <rewrite> <!-- This is an identifier for your rewrite that should be unique --> <twg_delivery_checkout_multishipping> <from> <![CDATA[#^/checkout/multishipping/shippingPost/$#]]> </from> <!-- - mymodule matches the router frontname below - checkout_cart matches the path to your controller Considering the router below, "/mymodule/checkout_cart/" will be "translated" to "/MyNameSpace/MyModule/controllers/Checkout/CartController.php" (?) --> <to>/delivery/checkout_multishipping/shippingPost/</to> </twg_delivery_checkout_multishipping> </rewrite> </global>
Notice how the exact ‘action’ [shippingPost] has been overridden not the whole controller, for me when i tried to do it at the controller level it did not work well, but overriding a single action worked fine.
but it does not seem to work. I do not know if it take the second [removed]index method) or none cause the link is “http://magento.dev/index.php/checkout/cart/add/uenc/aHR0cDovL2xhdXJhc2ltLmRldi9pbmRleC5waHAvY2FydGUtc2ltLWxhdXJhc2ltLTNnLmh0bWw,/product/1/”
I followed the directions in the tutorial Jonathan posted using my install of Magento, version 1.0.19870.1, and it was not working. This started driving me crazy, and then I tried adding the url rewrite directly to the database versus having it in the XML config file. I used the following code, taken from zburnham’s post earlier in this topic:
I added rewrite straight to admin panel Url Rewrite Management (worked, yay), but noticed that I can enable one rewrite just for one store view. Is there a way to make it concern all store views with one rewrite rule since I have several views now?