Magento How to debug blank white screen

This is how I got it corrected(Hope will help you guys): Use the following code in your index.php file ini_set(‘error_reporting’, E_ERROR); register_shutdown_function(“fatal_handler”); function fatal_handler() { $error = error_get_last(); echo(“<pre>”); print_r($error); } In my case it tolde me that error/503.php was unavailable. 3.The issue was with testimonial extension I used(http://www.magentocommerce.com/magento-connect/magebuzz-free-testimonial.html) I deleted the testimonial.xml file in … Read more

Understanding Magento Block and Block Type

For understanding more about magento block types following are some built-in block types which are widely used in layout. core/template: This block renders a template defined by its template attribute. The majority of blocks defined in the layout are of type or subtype of core/template. page/html: This is a subtype of core/template and defines the root block. All other blocks … Read more

Magento – Retrieve products with a specific attribute value

Almost all Magento Models have a corresponding Collection object that can be used to fetch multiple instances of a Model. To instantiate a Product collection, do the following $collection = Mage::getModel(‘catalog/product’)->getCollection(); Products are a Magento EAV style Model, so you’ll need to add on any additional attributes that you want to return. $collection = Mage::getModel(‘catalog/product’)->getCollection(); … Read more

How to upgrade magento 1.4 1.1 to 1.7.0.2 [closed]

Database structure has major changes from 1.4.1.1 to 1.4.2 so you need to upgrade first to 1.4.2 then you can upgrade to 1.7.0.2 directly. I like the command line so I usually upgrade the system by command line, this is my procedure: Substitute file downloader/pearlib/php/Archive/Tar.php with the patched version (it has a bug): http://www.mediafire.com/?35no55xuoeek20a Prepare … Read more

Change Magento default status for duplicated products

Try this: Create: app/code/local/MagePal/EnableDuplicateProductStatus/etc/config.xml <?xml version=”1.0″?> <config> <modules> <MagePal_EnableDuplicateProductStatus> <version>1.0.1</version> </MagePal_EnableDuplicateProductStatus> </modules> <global> <models> <enableduplicateproductstatus> <class>MagePal_EnableDuplicateProductStatus_Model</class> </enableduplicateproductstatus> </models> <events> <catalog_model_product_duplicate> <observers> <enableduplicateproductstatus> <type>singleton</type> <class>enableduplicateproductstatus/observer</class> <method>productDuplicate</method> </enableduplicateproductstatus> </observers> </catalog_model_product_duplicate> </events> </global> </config> Create: app/code/local/MagePal/EnableDuplicateProductStatus/Model/Observer.php class MagePal_EnableDuplicateProductStatus_Model_Observer { /** * Prepare product for duplicate action. * * @param Varien_Event_Observer $observer * @return object */ public function productDuplicate(Varien_Event_Observer … Read more

Magento tax rounding issue

In the end I found the solution. I changed System > VAT > Tax Calculation Method Based On from Unit price to Row Total and it works, more details here The issue which I found is in core/store model. I had to rewrite roundPrice method and change rounding precision there. public function roundPrice($price) { return … Read more

Why I can not login to magento backend using google chrome

If you enabled the https for the Magento admin panel, then make sure to set “NO” for the option “Use HTTP Only” under System->configuration->web->Session and Cookie Management.” If you have access to the database then open the table “core_config_data” and search for the Path “web/cookie/cookie_httponly” and set the value to “0”. Make sure to delete … Read more