Aqui un listado de los principales funciones para poder conseguir path relativos en Magento

 

Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS);
Mostraria
//http://magento.demo/js/

Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);
Mostraria
//http://magento.demo/index.php/

Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);
Mostraria
//http://magento.demo/media/

Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN);
Mostraria
//http://magento.demo/skin/

Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
Mostraria
//http://magento.demo/

 

Otro gran aporte

Para conseguir la url sobre la que estamos

$currentUrl = $this->helper('core/url')->getCurrentUrl();


Da la url base del sistema
$baseUrl = Mage::getBaseUrl();

 
Url de la carpeta media
$mediaUrl = Mage::getBaseUrl('media');

Por admin

Deja una respuesta

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.

Powered By
Best Wordpress Adblock Detecting Plugin | CHP Adblock