Quantcast
Channel: Amjath.com
Browsing latest articles
Browse All 14 View Live

Get Category Url from ID in Magento

Use the below code to get the category url from the category ID in magento $category_id = 14; Mage::getModel("catalog/category")->load($category_id)->getUrl(); Cheers! Amjath

View Article


Get Current Category Id in Magento

Use the below code to get the current category id category ID in magento echo Mage::getModel('catalog/layer')->getCurrentCategory()->getId(); Cheers! Amjath

View Article


Get Country name from Country Code in Magento

Use the below code to get the Country Name from Country Code in magento $country = Mage::getModel('directory/country')->loadByCode('country_code'); $countryName = $countryModel->getName();...

View Article

Get Region name from RegionId in Magento

Use the below code to get the Region name from RegionId in Magento in magento $region = Mage::getModel('directory/region')->load('region_id'); $regionName = $regionModel->getName(); Cheers! Amjath

View Article

Image may be NSFW.
Clik here to view.

Unable to send mails in Magento

Some days back, I came across an issue. No mails from Magento are sent successfully and Magento is not throwing any error message in the front end. First I thought its something related to the server...

View Article


Get subtotal and grand total in Magento

Use the below code to subtotal and grand total of cart in Magento $sub_total = Mage::getModel('checkout/cart')->getQuote()->getSubtotal(); $grand_total =...

View Article

Get Cart Items in Magento

Use the below code to get All cart items in Magento $cartHelper = Mage::helper('checkout/cart'); $items = $cartHelper->getCart()->getItems(); foreach ($items as $item) { echo...

View Article

Check whether a module is enabled or not in Magento

Use the below code to check whether a module is enabled or not echo Mage::getConfig()->getModuleConfig('Module_Name')->is('active', 'true'); echo...

View Article


Magento Reindex from shell

Go to the Shell folder cd root_folder/shell To execute full reindex, use the below command php -f indexer.php reindexall Commands for individual reindexes are given below php indexer.php --reindex...

View Article


Unable to Reindex / Indexes stuck at Processing in Magento

Try the following to fix the issue Make sure “/var” and “/var/locks” have 777 directory permission Delete all the files in “/var/locks” Clear cache and try to reindex now from the admin If re-index...

View Article
Browsing latest articles
Browse All 14 View Live