Home » Archive

Articles tagged with: attribute

Magento »

[11 Mar 2013 | No Comment]

This article contains code snippet to get customer attributes in Magento. Get Customer Collection

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 »

[9 Feb 2011 | 7 Comments]

Suppose you have a multi select attribute and you have displayed it in admin grid. You have displayed the multi select attribute options as selection list. Now, you want to filter/search the grid by the multiselect attribute. The problem here is that the multiselect attribute value is store as comma separated value in database. When [...]

Magento »

[23 Dec 2010 | 2 Comments]

Here, I will show you how you can filter or fetch products related to any particular attribute and value. A simple scenario will be filtering products by manufacturer/brand. Suppose, I want to get all products under ‘Samsung’ manufacturer/brand.

Magento »

[15 Nov 2010 | 11 Comments]

In my previous article (Magento: Very Useful Collection Functions), I had written about database interaction functions present in class Varien_Data_Collection_Db. Here, I am going to explain some database interaction functions present in the class Mage_Eav_Model_Entity_Collection_Abstract. These collection functions are very useful to select data from Magento database. We need them almost all the time for [...]

Magento »

[7 Aug 2010 | 30 Comments]

Here, I will be showing you how you can add attributes for your categories in Magento. From the admin panel, you can only add attributes to product. To add attributes to category, you need to write sql query in your phpmyadmin or a better way would be creating a new custom module and adding attributes [...]

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 »

[9 Dec 2009 | 17 Comments]

You can add attribute from Admin Panel -> Catalog -> Attributes -> Manage Attributes. You can also add attributes from mysql setup file of your module. MySql setup file is present inside “YourModule/sql/yourmodule_setup” directory.

Magento »

[2 Dec 2009 | 42 Comments]

Attribute in Magento is like a property. All Products, Categories, Orders, Customers, etc. have attributes. For example, the attribute of a product is its name, sku, description, image, etc. This article will show you how to get attribute name and value for any product.

Magento »

[27 Nov 2009 | 7 Comments]

Suppose, you want to delete an attribute. But there is no delete option while you edit the attribute. This means that the attribute is system attribute. System attributes cannot be deleted. Only user defined attributes can be deleted. To delete the attribute, you have to make it user defined.