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: Cron Jobs Setup for Custom Module

Cron Job is used to perform any action in a certain interval of time. In a Magento webshop, there are certain tasks that needs cron jobs to be run, i.e. these tasks/actions need to be performed periodically. Here are some of them:- – Refreshing Catalog Price Rules – Sending Newsletters to customers – Generating Google … Read more

Magento: Get Product by SKU

Here is a quick code to get product information with SKU value. Get product information by sku // Get product by sku $sku = "microsoftnatural"; $product = Mage::getModel('catalog/product') ->loadByAttribute('sku', $sku); // print product data echo "<pre>"; print_r($product->getData()); echo "</pre>"; Get product id by sku $productIdBySku = Mage::getModel('catalog/product') ->getIdBySku('microsoftnatural'); echo $productIdBySku; Hope it helps. Thanks.

Magento: Solution for Google Analytics not tracking website

I had an old version of Magento. I had enabled google analytics tracking from Magento admin. But, google analytics was not tracking my webshop. The main reason behind this was that Google had modified its analytics tracking code and the GoogleAnalytics core module of Magento had old tracking code. To fix this issue, do the … Read more

Google Search result has stopped displaying my website/blog [Cause & Solution]

Problem: My website/blog had a good visit per day and it was also ranking good on Alexa. However, recently the per day visit has dropped drastically. And, alexa ranking is also dropping gradually day by day. Cause: There are many reasons for poor ranking in google search result. Some of them are:- – Navigation problem … Read more

Magento: Get all attributes & attribute name value of a product

Here is a quick code to get all attributes and their name and value associated with any particular product. First of all we have to load the product by it’s ID. And then get all it’s attributes. Here is the code:- $productId = 52; $product = Mage::getModel('catalog/product')->load($productId); $attributes = $product->getAttributes(); Get Name and Value of … Read more

Magento: Step-by-Step Moneybookers Payment Method Setup

This article shows step-by-step guide to setup Moneybookers (Skrill) Payment Method on Magento. I will be dealing with the developer perspective (creating and testing with a Test account). 1. Create Test Accounts You have to create two test account. One is Merchant/Business Account and the other is Personal Account. Use two different email address for … Read more