I would like to change the shopping cart URL from /checkout/cart/ to /checkout/bag/. Is it possible to modify the default URL, and if so, how?
Asked
Active
Viewed 1,491 times
1
skovy
- 111
- 3
-
can you refer to this page to check the solution... http://stackoverflow.com/questions/12722841/custom-url-for-magentos-basket-page – Kishor Mar 03 '15 at 04:10
1 Answers
0
Skovy,it possible but it not good for health,You need override of CartController.php with Your Controller Bagcontroller.php.Also need change the helper class from where cart url id define .
config.xml
<?xml version="1.0"?>
<config>
<modules>
<Amit_Customcontacts>
<version>1.0.0</version>
</Amit_Customcontacts>
</modules>
<frontend>
<routers>
<contacts>
<args>
<modules>
<customcontacts before="Mage_Checkout">Amit_Customcontacts</customcontacts>
</modules>
</args>
</contacts>
</routers>
</frontend>
<global>
<!-- This rewrite rule could be added to the database instead -->
<rewrite>
<!-- This is an identifier for your rewrite that should be unique -->
<!-- THIS IS THE CLASSNAME IN YOUR OWN CONTROLLER -->
<customcontactsunique>
<from><![CDATA[#^/checkout/cart/#]]></from>
<!--
- mymodule matches the router frontname below
- matches the path to your controller
Considering the router below, "/customcontacts/cart/" will be
"translated" to "app/code/local/Amit/Customcontacts/controllers/BagController.php" (?)
-->
<to>/checkkout/bag/</to>
</customcontactsunique>
</rewrite>
</global>
</config>
Amit Bera
- 77,456
- 20
- 123
- 237