After compilation magento site is broken

It’s very simple. don’t be worry. Just go to includes/config.php and edit with below code. #define(‘COMPILER_INCLUDE_PATH’, dirname(__FILE__).DIRECTORY_SEPARATOR.’src’); #define(‘COMPILER_COLLECT_PATH’, dirname(__FILE__).DIRECTORY_SEPARATOR.’stat’); After edit site will be active.

Continue Reading

Magento get products from category randomly

Just follow the below code $products = Mage::getModel(‘catalog/product’) ->getCollection() ->addAttributeToSort() ->addAttributeToSelect(‘small_image’) ->addCategoryFilter(Mage::getModel(‘catalog/category’)->load()); $products->getSelect()->order(new Zend_Db_Expr(‘RAND()’));

Continue Reading

MySQL 5.7 3x Faster than MySQL 5.6

Magento has the biggest slice from the e-commerce cake and it’s a very cleaver but robust system. Any switch/upgrade can be painful even because these systems are customized strongly. This is why business owners and developers don’t upgrade very slowly. But might be the time is here 🙂 In the last few years we can see a very positive progress …

Continue Reading

How to remove decimal price in magento

just need to edit core file of Magento app\code\core\Mage\Directory\Model\Currency.php or you can create a file in local folder Find the following :  public function format($price, $options=array(), $includeContainer = true, $addBrackets = false)     {         return $this->formatPrecision($price, 2, $options, $includeContainer, $addBrackets);     } Replace with:  public function format($price, $options=array(), $includeContainer = true, $addBrackets = false)     {         return $this->formatPrecision($price, 0, $options, $includeContainer, $addBrackets);     }  

Continue Reading