Magento – Magento2: Create toggle button yes/no in admin product page

categorycustom-buttonproducttoggle

I want to create a toggle button yes/no in the product or category admin side page. also eager to know its description of flow and binding process. I followed many tutorials but don't get the exact solution that I need.
like the below images.
enter image description here

Best Answer

For this 1. You will have to create new product attribute

Admin >> Stores >> Attributes >> Product >> Add Attributes

  1. Select "Yes/No" in Catalog Input Type for Store Owner
  2. Fill all your information and save that attribute.
  3. Got to Admin >> Stores >> Attributes >> Attribute Set and assign that attribute to your attribute set.
  4. Clear cache .

After all these steps this attribute will show on your product page

Related Topic