{"id":709,"date":"2016-05-20T21:50:09","date_gmt":"2016-05-20T16:20:09","guid":{"rendered":"http:\/\/www.magewallet.com\/?p=709"},"modified":"2020-03-13T16:07:36","modified_gmt":"2020-03-13T10:37:36","slug":"create-product-attributes-magento-2","status":"publish","type":"post","link":"https:\/\/www.hiddentechies.com\/blog\/magento-2\/create-product-attributes-magento-2\/","title":{"rendered":"How to Create Product Attributes in Magento 2"},"content":{"rendered":"<p>agento 2 provides you with a flexible functionality to set properties to each product in a catalog. Attributes and attribute sets are one of the most powerful features in Magento. Using Magento product attributes you can set such product features as color, size, shape, etc. You can essentially customize the product attribute in Magento 2 to do everything you want. This post is meant to help Magento 2 beginners or anyone new to Magento become familiar with attributes so they can better manage their product data.<\/p>\n<p>Lets walk through setting up an attribute on a default attribute set and see how it interacts with the product fields injected on the product display.<\/p>\n<p>To create a new attribute, You will need login to your admin part and navigate to the <strong>Stores -&gt; Attributes -&gt; Product<\/strong> section of Store.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4177\" src=\"https:\/\/www.hiddentechies.com\/blog\/wp-content\/uploads\/2016\/05\/magento2-product-attribute-menu.png\" alt=\"\" width=\"624\" height=\"634\" srcset=\"https:\/\/www.hiddentechies.com\/blog\/wp-content\/uploads\/2016\/05\/magento2-product-attribute-menu.png 624w, https:\/\/www.hiddentechies.com\/blog\/wp-content\/uploads\/2016\/05\/magento2-product-attribute-menu-295x300.png 295w\" sizes=\"(max-width: 624px) 100vw, 624px\" \/><\/p>\n<p>Now you will see the list of product attributes that comes with Magento 2 or created by you. In order to add new attribute click on <strong>Add New Attribute<\/strong> button.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4178\" src=\"https:\/\/www.hiddentechies.com\/blog\/wp-content\/uploads\/2016\/05\/magento2-product-attribute-list.png\" alt=\"\" width=\"1022\" height=\"645\" srcset=\"https:\/\/www.hiddentechies.com\/blog\/wp-content\/uploads\/2016\/05\/magento2-product-attribute-list.png 1022w, https:\/\/www.hiddentechies.com\/blog\/wp-content\/uploads\/2016\/05\/magento2-product-attribute-list-300x189.png 300w, https:\/\/www.hiddentechies.com\/blog\/wp-content\/uploads\/2016\/05\/magento2-product-attribute-list-768x485.png 768w, https:\/\/www.hiddentechies.com\/blog\/wp-content\/uploads\/2016\/05\/magento2-product-attribute-list-676x427.png 676w\" sizes=\"(max-width: 1022px) 100vw, 1022px\" \/><\/p>\n<p>It will open configuration panel for new attribute. so you can configure the attribute as per your requirement.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4179\" src=\"https:\/\/www.hiddentechies.com\/blog\/wp-content\/uploads\/2016\/05\/magento2-product-attribute-configure2.png\" alt=\"\" width=\"889\" height=\"689\" srcset=\"https:\/\/www.hiddentechies.com\/blog\/wp-content\/uploads\/2016\/05\/magento2-product-attribute-configure2.png 889w, https:\/\/www.hiddentechies.com\/blog\/wp-content\/uploads\/2016\/05\/magento2-product-attribute-configure2-300x233.png 300w, https:\/\/www.hiddentechies.com\/blog\/wp-content\/uploads\/2016\/05\/magento2-product-attribute-configure2-768x595.png 768w, https:\/\/www.hiddentechies.com\/blog\/wp-content\/uploads\/2016\/05\/magento2-product-attribute-configure2-676x524.png 676w\" sizes=\"(max-width: 889px) 100vw, 889px\" \/><\/p>\n<p>Here you will need to configure the Attribute Properties,<\/p>\n<p><strong>Default label<\/strong> &#8211; Name of the attribute used by the system. e.g: T-Shirt Color<br \/>\n<strong>Catalog Input Type for Store Owner<\/strong> &#8211; Define what kind of data the attribute will store<br \/>\n<strong>Values Required<\/strong> &#8211; Need to set as require or not<\/p>\n<p>In this example we have selected <strong>dropdown<\/strong> input type. so now we can define the attribute Options (values of your attribute).<\/p>\n<p>In the <strong>Advanced Attribute Properties<\/strong> you can setup.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4180\" src=\"https:\/\/www.hiddentechies.com\/blog\/wp-content\/uploads\/2016\/05\/magento2-product-attribute-configure3.png\" alt=\"\" width=\"633\" height=\"631\" srcset=\"https:\/\/www.hiddentechies.com\/blog\/wp-content\/uploads\/2016\/05\/magento2-product-attribute-configure3.png 633w, https:\/\/www.hiddentechies.com\/blog\/wp-content\/uploads\/2016\/05\/magento2-product-attribute-configure3-150x150.png 150w, https:\/\/www.hiddentechies.com\/blog\/wp-content\/uploads\/2016\/05\/magento2-product-attribute-configure3-300x300.png 300w\" sizes=\"(max-width: 633px) 100vw, 633px\" \/><\/p>\n<p><strong>Attribute Code<\/strong> &#8211; This is used internally. Make sure you don&#8217;t use spaces or more than 30 symbols.<br \/>\n<strong>Scope<\/strong> &#8211; Declare attribute value saving scope<br \/>\n<strong>Unique Value<\/strong> &#8211; Set this to Yes, if you want the data saved in this attribute to be unique for each product. Not shared with other products<br \/>\n<strong>Input Validation for Store Owner<\/strong> &#8211; Validate the data before applying changes to the attribute<br \/>\n<strong>Add to Column Options<\/strong> &#8211; Select &#8220;Yes&#8221; to add this attribute to the list of column options in the product grid.<br \/>\n<strong>Use in Filter Options<\/strong> &#8211; Select &#8220;Yes&#8221; to add this attribute to the list of filter options in the product grid.<\/p>\n<p>Now you will need to click on the <strong>Storefront Properties<\/strong> tab from left panel to configure the frontend properties of the attribute.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4181\" src=\"https:\/\/www.hiddentechies.com\/blog\/wp-content\/uploads\/2016\/05\/magento2-product-attribute-configure4.png\" alt=\"\" width=\"564\" height=\"935\" srcset=\"https:\/\/www.hiddentechies.com\/blog\/wp-content\/uploads\/2016\/05\/magento2-product-attribute-configure4.png 564w, https:\/\/www.hiddentechies.com\/blog\/wp-content\/uploads\/2016\/05\/magento2-product-attribute-configure4-181x300.png 181w\" sizes=\"(max-width: 564px) 100vw, 564px\" \/><\/p>\n<p>In the <strong>Storefront Properties<\/strong> you can setup.<\/p>\n<p>Use in Search<br \/>\nComparable on Storefront<br \/>\nUse in Layered Navigation<br \/>\nUse in Search Results Layered Navigation<br \/>\nPosition<br \/>\nUse for Promo Rule Conditions<br \/>\nAllow HTML Tags on Storefront<br \/>\nVisible on Catalog Pages on Storefront<br \/>\nUsed in Product Listing<br \/>\nUsed for Sorting in Product Listing<\/p>\n<p>Now click on <strong>Save Attribute<\/strong> button to save your configuration for new product attribute. Clear cache from cache management.<\/p>\n<p>You will need to assign recently created attribute to attribute set. so you will need to navigate to the <strong>Stores -&gt; Attributes -&gt; Attribute Set<\/strong> section. Now you will get list of attribute set available in your store and select as per your requirement.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4182\" src=\"https:\/\/www.hiddentechies.com\/blog\/wp-content\/uploads\/2016\/05\/magento2-product-attribute-set-assign.png\" alt=\"\" width=\"958\" height=\"431\" srcset=\"https:\/\/www.hiddentechies.com\/blog\/wp-content\/uploads\/2016\/05\/magento2-product-attribute-set-assign.png 958w, https:\/\/www.hiddentechies.com\/blog\/wp-content\/uploads\/2016\/05\/magento2-product-attribute-set-assign-300x135.png 300w, https:\/\/www.hiddentechies.com\/blog\/wp-content\/uploads\/2016\/05\/magento2-product-attribute-set-assign-768x346.png 768w, https:\/\/www.hiddentechies.com\/blog\/wp-content\/uploads\/2016\/05\/magento2-product-attribute-set-assign-676x304.png 676w\" sizes=\"(max-width: 958px) 100vw, 958px\" \/><\/p>\n<p>Now you need to drag &amp; drop attribute e.g: t-shirt-color from <strong>Unassigned Attributes<\/strong> to <strong>Groups<\/strong> section.<\/p>\n<p>Once you have configured the set the way you would like it, Click Save <strong>Attribute Set<\/strong> in the top right.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>agento 2 provides you with a flexible functionality to set properties to each product in a catalog. Attributes and attribute sets are one of the most powerful features in Magento. Using Magento product attributes you can set such product features as color, size, shape, etc. You can essentially customize the product attribute in Magento 2&#8230; <\/p>\n<div class=\"actions\"><a href=\"https:\/\/www.hiddentechies.com\/blog\/magento-2\/create-product-attributes-magento-2\/\">Continue Reading<\/a><\/div>\n","protected":false},"author":1,"featured_media":4872,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[59],"tags":[10,45,126],"_links":{"self":[{"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/posts\/709"}],"collection":[{"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/comments?post=709"}],"version-history":[{"count":5,"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/posts\/709\/revisions"}],"predecessor-version":[{"id":10515,"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/posts\/709\/revisions\/10515"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/media\/4872"}],"wp:attachment":[{"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/media?parent=709"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/categories?post=709"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/tags?post=709"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}