Need hospital bed for Covid-19 patient ? May 15, 2021 Need hospital bed for Covid-19 patient ? Check availability here for UP.http://dgmhup.gov.in/EN/covid19bedtrack#willfightwillwin Share Get link Facebook X Pinterest Email Other Apps Share Get link Facebook X Pinterest Email Other Apps Comments
Reindex magento programmatically July 06, 2015 <?php for ($i = 1; $i <= 9; $i++) { $reIndexProcess = Mage::getModel('index/process')->load($i); $reIndexProcess->reindexAll(); } } Read more
get directory paths, get Base URLs, get URLs in static block, get secure URL in Magento July 06, 2015 1) Get Directory paths Mage::getBaseDir() //output : /var/www/html/magento Mage::getBaseDir('app') //output : /var/www/html/magento/app Mage::getBaseDir('media') //output : /var/www/html/magento/media Mage::getBaseDir(‘design’) => Get design directory path Mage::getBaseDir(‘code’) => Gives code directory file path Mage::getBaseDir(‘lib’) => Gives lib directory file path Mage::getBaseDir(‘skin’) => Gives skin directory file path Mage::getBaseDir(‘var’) => Gives var directory file path Mage::getBaseDir(‘cache’) => Gives cache directory file path Mage::getBaseDir(‘log’) => Gives log directory file path 2) Get Base URL Mage::getBaseUrl() => Get base url path e.g. http://yourwebsite.com/ Mage::getBaseUrl('media') => Get MEDIA folder path e.g. http://yourwebsite.com/media/ Mage::getBaseUrl('js') => Get JS folder path e.g. http://yourwebsite.com/js/ Mage::getBaseUrl('skin') => Get... Read more
programaticaly Insert and select quary In magento July 06, 2015 INSERT QUERY include('../app/Mage.php'); Mage::app(); $write = Mage::getSingleton('core/resource')->getConnection('core_write'); $sql="INSERT INTO opd_uploads SET extension='$extension', sessionId='$sessionId', ip='$ip', status=1, dateTime=now()"; $write->query($sql); //lastInserted ID $imageId = $write->lastInsertId(); SELECT QUERY $read= Mage::getSingleton('core/resource')->getConnection('core_read'); $value=$read->query("select * from opd_uploads WHERE id='".$imageRowId."'"); $row = $value->fetch(); $orgFilExt=$row['extension']; Read more
Comments
Post a Comment