How to Configure Default Field Values in Magento 2

When creating new products for stores using Magento 2 platform, Product Workspace allows you to save time by providing a number of default field values. These values are referenced from some other fields such as product name, or product description. Magento 2 set the following fields automatically to default values:

  • SKU: Based on Product Name field.
  • Meta Title: Based on Product Name field.
  • Meta Keywords: Based on Product Name field.
  • Meta Description: Based on both Product Name and Product Description fields.

The text that is put in double-curly braces are placeholders and it refers to the value of the base field(s) (Product Name, for example). Any attribute code included in the product attribute set can also be used as a placeholder.

Admin can edit the value of placeholders by the following steps:

Step 1: In the backend mode, go to Admin Sidebar and click Stores.

Step 2: Next, select Configuration under Settings.

Step 3: Expand Catalog on the left panel then choose Catalog.

Step 4: Drop down the Product Fields Auto-Generation section. After that, enter the text that you want to replace the placeholder values. Remember to unmark the Use System Value checkboxes before filling the blanks.Default Field Values

For instance, you want to enclose the word “Magento 2” to the meta descriptions of all products, you just need to enter “Magento 2” in the Mask for Meta Description field. By doing this, the phrase “Magento 2” will be shown up to all of the descriptions.

Step 5: Click Save config on the upper-right corner to confirm your settings.

Below is a list of common placeholders used by many admin:

{{color}}

{{country_of_manufacture}}

{{description}}

{{gender}}

{{material}}

{{name}}

{{short_description}}

{{size}}

{{sku}}

Now you can log in the backend mode and try out setting new values for some placeholders.

In short, here are all the details about Configuring Default Field Values in Magento 2 we want to share with you. For the Magento developers, it’s our pleasure to receive your comment and recommendation on our FAQ extension list. If you want to add or erase any item in this FAQ list, feel free to contact us. Don’t forget to Like, Share, and Subscribe to Magestandard for more informative Magento extension review articles.