Archive for June 2018

Get adminhtml url

echo Mage::helper("adminhtml")->getUrl("/vendorname_modulename/controllername/",array("param1" => $value1)); echo Mage::helper("adminhtml")->getUrl("/vendorname_modulename/controllername/");

Get current website id

$website_id = Mage::app()->getWebsite()->getId();

Get current store id

$store_id = Mage::app()->getStore()->getId();

Get the store id from the store code

$store_id = Mage::app()->getStore($storeCode)->getId(); $store_id = Mage::getModel("core/store")->load($storeCode, "code");