Home » Archive

Articles tagged with: product

Magento »

[15 Apr 2013 | No Comment]

Problem: I had added a new product attribute. Suppose the attribute code is ‘test’. I have been trying to fetch/select that newly added product attribute. Here is my Magento collection code:- I don’t see the attribute ‘test’ when I print the collection data.

Magento »

[3 Jul 2012 | No Comment]

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:

Magento »

[26 Jun 2012 | No Comment]

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:

Magento »

[12 Jun 2012 | No Comment]

Here is a quick code to get product information with SKU value. Get product information by sku

Magento »

[10 May 2012 | No Comment]

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:-

Magento »

[1 Feb 2012 | 7 Comments]

Here is a quick code to get any product’s stock information like quantity (qty), minimum quantity (min_qty), stock availability (is_in_stock), minimum and maximum sale quantity (min_sale_qty and max_sale_qty), etc. First load the product. Product can be loaded in different ways. Here are the two different ways to load any product in Magento:-

Magento »

[12 Dec 2011 | 2 Comments]

Here is a quick and useful code on getting actual price and special price of any product in Magento. The actual price is the real price assigned to the product and special price is the price after any discount is applied to the product. Loading Product

Magento »

[7 Jun 2011 | 7 Comments]

Here is a quick tip to sort/order latest product by both created date and new from date. Created At date is automatically added when you add a new product. However, you have to set New from Date manually while adding or editing product. You may have product with same new from date. And, then you [...]

Magento »

[6 Dec 2010 | No Comment]

Scenario: I have changed my product’s Visibility to ‘Nowhere‘. But still the product is visible in both catalog and search. I have refreshed cache but the problem is still there. Cause:

Magento »

[22 Jul 2010 | 9 Comments]

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.“.

Magento »

[26 Apr 2010 | 13 Comments]

Here, I will show you the code to get the most viewed products in Magento. The function addViewsCount() filters the products with their views count. Here is the code:-

Magento »

[20 Apr 2010 | 5 Comments]

Here, I will be showing how you can get product collection from product type i.e. simple, configurable, bundle, grouped, and virtual. Here is the code:-

Magento »

[7 Jan 2010 | 2 Comments]

Suppose, you have the product data. You can get product from either of the following way:- $_product = $this->getProduct(); OR,

Magento, MySQL »

[31 Dec 2009 | 18 Comments]

Suppose, you have a product collection and you want to filter it by category. Suppose, you want to filter it by more than one category. You can use addCategoryFilter if you have only one category. But, what if you want to filter by more than one category? Category ids are stored for product in a [...]

Magento »

[21 Dec 2009 | 16 Comments]

Here, I will be showing you the code to get sub categories of a particular category and the number of products (product count) present in the sub categories. Like, I have a category named Furniture. The sub categories under Furniture are Living Room and Bedroom. Now, I want to show the sub categories under Funiture [...]