Magento: Solution of Invalid method Mage_Catalog_Block_Product_List_Toolbar :: isLastPage

While upgrading Magento, I got this error when I go to product list page. It says: Invalid method Mage_Catalog_Block_Product_List_Toolbar::isLastPage(Array()) Solution: I found 4 kinds of solution. This first one works & is easy. #1. – Open /app/code/core/Mage/Catalog/Block/Product/List/Toolbar.php – Replace the parent class name From: class Mage_Catalog_Block_Product_List_Toolbar extends Mage_Core_Block_Template To: class Mage_Catalog_Block_Product_List_Toolbar extends Mage_Page_Block_Html_Pager This second … Read more

Magento: Solution of Warning: Invalid argument supplied for foreach() in …list.phtml

While upgrading Magento, I am getting this error when I go to product list page. Error: Warning: Invalid argument supplied for foreach() in …/template/catalog/product/list/toolbar.phtml Solution: Open layout/catalog.xml Find this: <block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml"> Just below the above code, add the code below: <block type="page/html_pager" name="product_list_toolbar_pager" /> Open template/catalog/product/list/toolbar.phtml Comment out some lines of code and … Read more

Magento: Helper Data not found error

I created a module, let’s say, ‘MyModule’. When I go to the Admin -> System -> Configuration section of this module, I get this weird error. Fatal error: Class ‘Mage_MyModule_Helper_Data’ not found – My Module is enabled. – I have helper class in ‘Helper’ folder of my module. – I have deleted/refreshed all cache and … Read more

Magento: Fatal error: Call to a member function setSaveParametersInSession() on a non-object

Scenario I was creating a module. I already had one Grid displayed in admin. The Grid was being displayed by a Block class, for example: MyNamespace_MyModule_Block_Adminhtml_MyModule Now, I had to display another Grid using a new Block class. Let’s say, I created a new Block class: MyNamespace_MyModule_Block_Adminhtml_MyNewGrid I just copied code from MyNamespace_MyModule_Block_Adminhtml_MyModule and copied … Read more

Magento 1.4: No products displayed in category listing

Scenario: I have a fresh installation of Magento 1.4. I already have installed the sample data for Magento. Now, when I go to the category listing page, no products are displayed. It says “There are no products matching the selection.“. By category listing page, I mean the product listing page displayed when any category is … Read more

Magento Error – Notice: Undefined index: 0 app/code/core/Mage/Core/Model/Mysql4/Config.php on line 92

I got this error message when migrating my Magento files and database from one server to another. Notice: Undefined index: 0 in app/code/core/Mage/Core/Model/Mysql4/Config.php on line 92 Solution: – Open PhpMyAdmin – Go to your database – Click SQL – Run the following SQL Query: SET FOREIGN_KEY_CHECKS=0; UPDATE `core_store` SET store_id = 0 WHERE code='admin'; UPDATE … Read more

W3C Validation: IFrame Error with XHTML 1.0 Strict Doctype

IFrames are not supported with XHTML 1.0 Strict Doctype. When you use IFrame and your doctype is XHTML 1.0 Strict, then you cannot pass the W3C Markup Validation test. You always get errors. The errors are like:- there is no attribute “src” there is no attribute “scrolling” there is no attribute “frameborder” there is no … Read more

Magento: There has been an error processing your request. Exception printing is disabled by default for security reasons

Problem: I am using Magento 1.4. Homepage loads fine. When I go to category (product listing) page, it works fine. But when I go to any product detail page, I get the following error:- There has been an error processing your request Exception printing is disabled by default for security reasons. I don’t get the … Read more

Magento: Access denied in admin of custom module

I was building a custom module in Magento. I had created a system.xml file for storing configuration data from admin. From the below system.xml file, you can see that I have created a section named ‘My Module Name‘ which can be accessed from Admin –> System –> Configuration. In the file below, I have just … Read more