Home » Archive

Articles tagged with: product

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 | 11 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 | 20 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]

Products can be of different types in Magento. The different product types are Simple Product, Configurable Product, Bundle Product, Grouped Product, Downloadable Product, and Virtual Product. For example: Chair can be a Simple Product. Shoes can be of different color and size. So, shoes falls under Configurable product. A downloadable mp3 music file will fall under Downloadable product.
The following code shows how to fetch product collection by particular product type, i.e. fetching all products which falls under a particular product type. If I want to fetch all Configurable …

Magento »

[7 Jan 2010 | 2 Comments]

Suppose, you have the product data, i.e. you have a loaded product information stored in a variable named ‘$_product‘. Now, when you type $_product->getManufacturer() , you will get the manufacturer ID. To get the manufacturer name, you have to use the following: $_product->getAttributeText(‘manufacturer’). Below is the complete code:
Get Manufacturer Name and ID from Product

Magento, MySQL »

[31 Dec 2009 | 20 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 comma separated way. So, to filter product collection by more than one category, you have to use:
addAttributeToFilter(‘category_ids’,array(‘finset’=>$categoryIds));

Magento »

[21 Dec 2009 | 17 Comments]

This article shows how to get sub categories of a particular category and the number of products (product count) present in the sub categories.
Suppose, you have a category named Furniture. The sub categories under Furniture are Living Room and Bedroom. Now, you want to show the sub categories under Funiture and the products associated with the sub categories (Living Room and Bedroom).

Magento »

[21 Dec 2009 | 9 Comments]

Difference between backorder and pre-order
A backorder is for an item that was in stock previously but is temporarily out of stock.
A pre-order is for an item that has not been released yet.
Scenario for backorder:

Magento »

[9 Dec 2009 | 9 Comments]

Scenario:
While editing product programatically from frontend. I was trying to change the status of the product with the following code. I was trying to disable the product. Status value 2 = Disabled.

Magento »

[7 Dec 2009 | 14 Comments]

This article shows how you can fetch all the categories related/associated with a particular product.
$product->getCategoryIds() function gives array of category ids with which the product is associated to. We can loop through this array and load each category to get the category name and url.

Magento »

[23 Nov 2009 | 4 Comments]

Different stores can be set in Magento. A product can be made visible in selected stores.

Hope it helps. Thanks.

Magento »

[23 Nov 2009 | 16 Comments]

Scenario:
A simple product is associated with a configurable product. You have the id of the simple product. Now, you need the id of the configurable product with which the simple product is associated.
Get parent product id, i.e. get id of configurable product from a simple product.

Zen-cart »

[27 Jul 2008 | 3 Comments]

Almost one year back, I had problem with the product display in Zen-cart. I searched for help in zen-cart forum. I started a topic over there. But at last, I myself had to post the solution on that thread.. coz, I found the solution. ;) I just wanted to include that problem and solution in this post.
My problem was:-