• Show all
  • Magento
  • Magento2
How to get cookie domain in magento?

To get cookie domain you have to put this code in your phtml file and this phtml file was called by the page where you want to showing it. <?php echo $cookieDomain = Mage::getModel(‘core/cookie’)->getDomain($cookieName);?> Please leave your comment for asking any question or suggestion. Need Help?

How to get create date of product in magento?

To get create date of product you have to put this code in your phtml file and this phtml file was called by the page where you want to showing it. <?php echo Mage::getModel(‘catalog/product’)->load($_product->getId())->getCreatedAt();?> Please leave your comment for asking any question or suggestion. Need Help?

How to get the product update date in magento?

To get the product update date you have to put this code in your phtml file and this phtml file was called by the page where you want to showing it. <?php Mage::getModel(‘catalog/product’)->load($_product->getId())->getUpdatedAt();?> Please leave your comment for asking any question or suggestion. Need Help?

How to Get table prefix in Magento?

To Get table prefix you have to put this code in your phtml file and this phtml file was called by the page where you want to showing it. <?php echo $prefix = Mage::getConfig()->getTablePrefix();?> Please leave your comment for asking any question or suggestion. Need Help?

How to get database name in magento?

To get database name you have to put this code in your phtml file and this phtml file was called by the page where you want to showing it. <?php echo Mage::getConfig()->getResourceConnectionConfig(‘default_setup’)->dbname;?> Please leave your comment for asking any question or suggestion. Need Help?

How to get your tax amount in magento?

To get your tax amount you have to put this code in your phtml file and this phtml file was called by the page where you want to showing it. Mage::helper(‘checkout’)->getQuote()->getShippingAddress()->getData(‘tax_amount’) Please leave your comment for asking any question or suggestion. Need Help?

How to get current date in magento?

To get current date you have to put this code in your phtml file and this phtml file was called by the page where you want to showing it. <?php echo date(“Y-m-d”, Mage::getModel(‘core/date’)->timestamp(time()));?> Please leave your comment for asking any question or suggestion. Need Help?

How to get current theme in frontend in magento?

To get current theme in frontend you have to put this code in your phtml file and this phtml file was called by the page where you want to showing it. <?php echo Mage::getSingleton(‘core/design_package’)->getTheme(‘frontend’);?> Please leave your comment for asking any question or suggestion. Need Help?

How to get the title of page in magento?

To get the title of page you have to put this code in your phtml file and this phtml file was called by the page where you want to showing it. <?php echo $this->getLayout()->getBlock(‘my_block’)->getTitle();?> Please leave your comment for asking any question or suggestion. Need Help?

How to Get Product options from $item in magento?

To Get Product options from $item you have to put this code in your phtml file and this phtml file was called by the page where you want to showing it. $_item->getProduct()->getTypeInstance(true)->getOrderOptions($_item->getProduct()); Please leave your comment for asking any question or suggestion. Need Help?