Programmatically remove order in Magento
-
admin
-
September 19, 2016
-
Magento
-
2 Comments
<?php require_once ‘app/Mage.php’; umask(0); Mage::app(); Mage::register(‘isSecureArea’, true); $orders = Mage::getModel(‘sales/order’)->getCollection(); foreach ($orders as $order) { $order->delete(); }
Continue Reading
After compilation magento site is broken
-
admin
-
September 8, 2016
-
Magento
-
0 Comments
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
-
zendnwar
-
July 24, 2016
-
Magento
-
1 Comment
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
-
zendnwar
-
June 20, 2016
-
Magento
-
0 Comments
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
-
zendnwar
-
May 30, 2016
-
Magento
-
254 Comments
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
Magento: Automatic Related Products Extension free download
-
zendnwar
-
May 16, 2016
-
Magento
-
215 Comments
Automatic Related Products Extension free download
Continue Reading
Changes to login.phtml or register.phtml don’t reflect
-
zendnwar
-
May 12, 2016
-
Magento
-
9 Comments
Please to edit template/persistent/customer/form/register.phtml. Use the template hints. Also, with any phtml changes you make, make sure that you have caching disabled, and flush all caches (System -> Cache Management).
Continue Reading
Magento admin panel gives 404 when trying to enter CMS pages
-
zendnwar
-
April 9, 2016
-
Magento
-
227 Comments
You are getting a 404 on CMS pages because of the remains of old store views still hanging around in the database after deleting store views from Magento admin, to clean up ( delete ) old unused CMS pages for store views you have deleted run this MySQL query. DELETE FROM cms_page_store WHERE store_id NOT IN (SELECT store_id FROM core_store)
Continue Reading
Magento2 admin menu panel doesn’t work
-
zendnwar
-
March 18, 2016
-
Magento
-
214 Comments
It’s very simple solution : line 574 in Magento2.2 remove <item name=”view_preprocessed” xsi:type=”object”>Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink</item> refresh, hope it will work.
Continue Reading
dbModel read resource does not implement Zend_Db_Adapter_Abstract in Magento
-
zendnwar
-
March 7, 2016
-
Magento
-
0 Comments
It’s very simple solution: just clear /var/cache it’s not yet solved, just make /var/cache & /var/sessions permission 777
Continue Reading