/** * Set URL rewrite instance * * @param array $args */ public function __construct(array $args = array()) { if (empty($args['rewrite'])) { $args['rewrite'] = Mage::getModel('enterprise_urlrewrite/url_rewrite'); } parent::__construct($args); }
protected function _rewriteConfig() { $h = Mage::helper('gomage_checkout'); if ($h->getConfigData('general/enabled')) { $requestPath = trim($this->_request->getPathInfo(), '/'); if ($requestPath == 'checkout/onepage' || $requestPath == 'checkout/onepage/index') { if (in_array(Mage::app()->getStore()->getWebsiteId(), $h->getAvailavelWebsites())) { if (!($h->isMobileDevice() && (bool) $h->getConfigData('general/disable_mobile'))) { $_request->setPathInfo('gomage_checkout/onepage'); return true; } } } } return parent::_rewriteConfig(); }