How to add product labels on Crafts 2.0 theme

Labeling is much of help for your customers to highlight your hot, sales, free gift, online only, featured or new items. You can even create tags as your wish like “best voted”, “recommended” and so on.

This documentation will instruct how to add product labels on our (Magento 2) Crafts 2.0 theme. Check it out to grab this handy function to attract customers attention to hottest products on your eCommerce Magento 2 site!

II. Add labels products with Crafts theme

First, you need to install our Crafts 2.0 theme -- Download here
Then, follow all steps below to add product labels:

Step1 : Create a new Product Attribute

Navigate to Stores >> Attributes >> Product:

Then you create a new one by clicking on Add New Attribute button. In Crafts 2.0, we named a sample attribute UB Label as shown in the screenshot below:

Now you will be able to configure the attribute:

  • Catalog Input Type for Store Owner -- Set this option to the type in input control to be used for adding/editing products. It can be Text Field (by default), Text Area, Date, Yes/No, Multiple Select, Dropdown, Price, Media Image, Fixed Product Tax. In Crafts 2.0 theme, please select Dropdown option.
  • Values Required -- To require that the customer has to choose an option before the product can be purchased, set Values Required to “Yes.”

In the Manage Options (values of your attribute), we will add and configure “Labels” attribute which will be displayed in the Catalog Input Type. Below you can find sample values used in Crafts 2.0 theme:

Now, we move to the Advanced Attribute Properties, you can setup as follows:

Advanced Attribute Properties

  • Attribute Code – This refers to a unique Attribute Code of the attribute that will be used by the system. It must be in lowercase characters, and without spaces. The the Attribute code in Crafts 2.0 theme was “ub_label“.
  • Scope – Set Scope to indicate where in your store hierarchy (Store, Website or Global) the attribute can be used
  • Unique Value – Set this to Yes, if you want the data saved in this attribute to be unique for each product. If you have different products made of the same material or having the same feature, leave this to No
  • Input Validation for Store Owner – If you want to validate the data entered into a text field, set Input Validation for Store Owner to the type of data that the field should contain, select Yes (This field is not available for input types with value that are selected).
  • Add to Column Options – To add this attribute to the list of column options, please select Yes
  • Use in Filter Options – If you set this to Yes the attribute will be added to the list of filter options

Once done, please click on the Storefront Properties tab (from the menu on the left) to configure the frontend behavior of the attribute as shown below. Then click on the Save Attribute button on the top right corner of your screen to save your new attribute. This will bring you back to the attributes list page on which you should see your new attribute.

Step 2: Enable Product Label

In your admin dashboard, click Products | (Inventory) Catalog | Add product, and set Label as follows:

Front-end Appearance (as per Crafts 2.0 theme)