-
-
Save srinathweb/1ef9ac3eb019d5d3f9ef6bbb97bfb5e6 to your computer and use it in GitHub Desktop.
checkout/bag url rewrite
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<config> | |
<global> | |
<rewrite> | |
<mynamespace_mymodule_checkout_cart> | |
<from> | |
<![CDATA[ #^/checkout/bag# ]]> | |
</from> | |
<to>/checkout/cart</to> | |
</mynamespace_mymodule_checkout_cart> | |
</rewrite> | |
<models> | |
<getready_rewrite> | |
<class>Getready_Rewrite_Model</class> | |
</getready_rewrite> | |
<core> | |
<rewrite> | |
<url>Getready_Rewrite_Model_Core_Url</url> | |
</rewrite> | |
</core> | |
</models> | |
</global> | |
</config> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Getready_Rewrite_Model_Core_Url extends Mage_Core_Model_Url { | |
/** | |
* Build url by requested path and parameters | |
* | |
* @param string|null $routePath | |
* @param array|null $routeParams | |
* @return string | |
*/ | |
public function getUrl($routePath = null, $routeParams = null) { | |
if ( $routePath == 'checkout/cart' ) { | |
$routePath = 'checkout/bag'; | |
} | |
return parent::getUrl($routePath, $routeParams); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment