BIGtheme.net http://bigtheme.net/ecommerce/opencart OpenCart Templates
Tuesday , June 30 2015
Home >> Tag Archives: Magento tutorial

Tag Archives: Magento tutorial

Magento: Direct SQL Queries

Hi friends, After the short tutorial few days ago, I would like to share with you more knowledge in this article. This topic is a little bit tricky so please follow me closely To start with, Magento uses data models which provide a great way to access and modify data. ...

Read More »

Magento delete empty categories and sub-categories

images

Remove all empty categories and sub-categories in Magento. When there are empty categories, the website shows empty page in those categories in frontend. Create a file in the magento root, I will name it rmvEmptyCats.php, with following code: require “app/Mage.php”; umask(0); Mage::app();   $categoryCollection = Mage::getModel(‘catalog/category’)->getCollection()     ->addFieldToFilter(‘level’, array(‘gteq’ => 2)); //greater than root category id   foreach($categoryCollection as $category) {     if ($category->getProductCount() === 0) {         $category->delete();     } } ...

Read More »