Thursday, July 31, 2014

Attribute Group and Attribute Sets

Attribute Sets:

All the products don't have same fields or properties.

For example, If my product is shoes then possible attributes can be Fabric  (values is cotton/Jersey),Sleeves (value can be Full Sleeve/Half Sleeve),Neck (value can be COLLAR/Henley/Crew Neck).

The another example is if my product is mobile then it can have following attributes:

GENERAL FEATURES
In the BoxHeadset, Charger, Handset, Battery, Data Cable
BrandSamsung
Model NameGalaxy S4
Model IDi9500
FormBar
SIM SizeMicro SIM
SIM TypeSingle SIM, GSM
Touch ScreenYes, Capacitive
Business FeaturesDocument Viewer, Pushmail (Active Sync)
Call FeaturesLoudspeaker
Handset ColorWhite Frost


CAMERA
Primary Camera
Yes, 13 Megapixel
Secondary Camera
Yes, 2 Megapixel
Flash
LED
Video Recording
Yes, 1920 x 1080, 30 fps
HD Recording
HD, Full HD
DIMENSIONS
Size
69.8x136.6x7.9 mm
Weight
130 g
BATTERY
Type
2600 mAh
MEMORY AND STORAGE
Internal
16 GB
Expandable Memory
microSD, upto 64 GB
Memory
2 GB RAM
MULTIMEDIA
Music Player
Yes, Supports MP3, OGG, FLAC, AAC/AAC+/eAAC+, apt-X, AMR-NB/WB, WMA, AC-3
Video Player
Yes, Supports DivX, WMV7/8, Sorenson Spark, HEVC, H.264, MPEG4, DivX3.11, VC-1, VP8, H.263, Full HD
From above example,you will get perfect idea of attributes ,attribute set and attribute group.

AS we can see,different product have different attribute so I will not like to have attributes of shirt in mobile. In this situation, As a solution we have an attribute set.

You can create an attribute set like mobile,television,shoes etc. depends on product.

Now, as shown in above example of mobile, I mention all possible attributes and its values of the attribute in groups.

The possible groups for a mobile can be  general features,camera,dimensions,memory and storage and multimedia etc.

The answer of why I divide attributes in to group is it is easy to search from group when I have so many attributes. For example, if  I want to know about camera details of a mobile then  I don't need to see all the attributes of attribute set.I can easily find out it from camera group.

So,I can say that attribute  set is like a table of database where different attribute group can be divided into children table and attribute represent fields of table.



Now,we will see how to create attribute set:

Step 1:
At Admin side, select Catalog > Attributes> Manage Attribute Sets.

Step 2:
Click the Add New Set button.



Step 3:
Step 4:
Enter the name for the attribute set and select the attribute set  as its base which you want to use as a template for the new attribute set.
After saving attribute set, you can see new attribute with default attributes as we select default as base as following:


Here, There are custom attributes regarding to mobile which i have already created. So now we can assign it to the mobile attribute set.


Before assigning attribute to attribute set, we can more categorize the attributes of the mobile as groups.

For example, here  SIM Size and SIM Type are general attributes where as Primary Camera,Secondary Camera,Flash are regarding camera attributes.

So,first we will create attribute group and then will assign it to attribute set.
Now, you can see the new group name as shown in above screenshot.


Similarly I created another group for camera properties.

After creating groups,now its time to assign attribute this groups.




I hope that from above example, you get the idea how to create attribute group and attribute set,

No comments:

Post a Comment

Fatal error: Class Zend\Stdlib\Parameters contains 1 abstract method... magento 2

Fatal error: Class Zend\Stdlib\Parameters contains 1 abstract method and must therefore be declared abstract or implement the remaining met...