Configuring Multiple Attributes for Products in Magento
As an e-commerce store owner, you may often require products that have multiple attributes like size, color, etc. In Magento, this can be achieved by creating configurable products with associated simple products.
Creating Attribute Sets and Attributes
Firstly, let’s create an attribute set called ‘Apparel’ for our t-shirt product:
- Navigate to
Admin Panel > Stores > Attributes > Manage Attributes. - Click on the “Add New Attribute” button.
- Fill in the required details like Attribute Code (e.g., size), Scope (Global), Input Type (Dropdown) and other fields as needed.
- Save the attribute.
Next, create attributes for Size and Color:
- Follow the same steps as above to create attributes called ‘Size’ and ‘Color’.
- Set appropriate options for each attribute in the ‘Manage Options’ section.
Configuring the Product
Now, let’s configure our t-shirt product with these attributes:
- Go to
Admin Panel > Catalog > Manage Products. - Click on “Add New Product” button.
- Select ‘Apparel’ as the Attribute Set.
- Fill in general details like Name (T-Shirt 1), SKU (TSH-001), Description, etc.
Creating Associated Simple Products
Next, we need to create simple products for each size and color combination:
- In the “Associated Products” tab, click on “Add Product”.
- Select the ‘simple’ product type.
- Fill in details like SKU (TSH-S-M-Yellow), Price ($10), Quantity (10) with Size = Small and Color = Yellow.
- Save this simple product.
Repeat the above steps to create all combinations of sizes and colors.
Managing Inventory
To handle inventory individually for each size and color combination, Magento automatically syncs the stock levels:
- Go to
Admin Panel > Catalog > Manage Products. - Select your t-shirt product (T-Shirt 1).
- In the “Inventory” tab, you’ll see a table listing each associated simple product with its own quantity.
If you set the inventory level for one size-color combination, it won’t affect others.
Displaying Available Options
Finally, to ensure only available options are shown on the frontend:
- Go to
Admin Panel > Stores > Configuration > Catalog. - Set ‘Configurable Products Options’ to ‘Show each attribute as a separate product’.
- Save and refresh the cache.
Now, your t-shirt product will display size and color options based on the available inventory levels of associated simple products.
Remember, managing multiple attributes is crucial for proper stock control in Magento. It ensures accurate tracking of inventory across different variants of the same product.
For further guidance on advanced inventory management techniques in Magento, feel free to explore our Magento Development Services at Laravel Company.