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 catalog_product_attribute php indexer.php

Read More

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 $item->getItemId(); } Cheers! Amjath

Read More

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 = Mage::getModel('checkout/cart')->getQuote()->getGrandTotal(); Cheers! Amjath

Read More

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 and checked if the sendmail is installed

Read More