"Flex Library Not Loaded" Error In Magento

The Problem Image upload not working in Magento backend. Whenever entering product details getting an error alert saying Flex Library Not Loaded The Solution This happens due to improper Magento installation. Just give full permission to the following folder /js/lib That should solve the problem. Njoy 🙂

Magento :: How To Call Static Blocks From PHTML Pages

Magento offers the web master to put static contents where ever he likes in the site with the help of CMS -> Static Blocks. These blocks can be easily edited from the admin panel. To call and show their contents on any phtml file write the following code. echo $this->getLayout()->createBlock(‘cms/block’)->setBlockId(‘identifier’)->toHtml() ; Here identifier should be… Continue reading Magento :: How To Call Static Blocks From PHTML Pages

Opning phtml thtml ctp Files In Dreamweaver

To open and read the .phtml (Zend Framework) .thtml or .ctp (CakePHP) files in Dreamweaver just like the .php files follow these steps – 1. Open the file – C:\Program Files\Macromedia\{Dreamweaver Folder}\Configuration\DocumentTypes\MMDocumentTypes.xml (Replace C: with the drive name where your OS is installed) 2. Search “php,php3,php4,php5” (It will be line # 75). After php5 add… Continue reading Opning phtml thtml ctp Files In Dreamweaver

Get Cart Quantity in Magento

You can get the number of items currently in the cart using the following code. $cart = Mage::getModel(‘checkout/cart’)->getQuote()->getData(); echo (int)$cart[‘items_qty’]; However,if the cart is empty, writing only the above code will show error (Because $cart[‘items_qty’] is only set when there are items on the cart). For that you need to check if the value is… Continue reading Get Cart Quantity in Magento

Write MySQL Database Query in Magento

If you need to execute a MySQL query anywhere in Magento (in the .php code files or .phtml template files), the following steps are required – $conn = Mage::getSingleton(‘core/resource’)->getConnection(‘core_write’); $conn->query(“insert into table name (fields) values (values) “);