RestroFood is built on top of WooCommerce, so it uses WooCommerce’s Attributes and Variations system to create product variants. This lets you sell one menu item, like a coffee or a combo meal, in multiple versions (size, type, flavor, etc.) without creating a separate product for each one.
This guide walks you through the full process: creating an attribute, adding terms to it, assigning it to a product, and generating variations with their own prices, SKUs, and stock settings.
Step 1: Go to Product Attributes
From your WordPress dashboard, go to Products, then click Attributes in the left sidebar.
Step 2: Add a New Attribute
On the Attributes page, enter a Name for your attribute (for example, “Item Type”). WooCommerce will auto-generate a slug for it. Once you’re done, click Add attribute.
Your new attribute now appears in the list on the right, alongside any attributes you’ve already created.
Step 3: Add Terms to the Attribute
An attribute on its own isn’t useful until it has terms – the actual options customers will choose from (for example, “Regular,” “Premium,” “Combo”). Click Configure terms next to the attribute you just created.
On the terms screen, enter a Name for the term and click Add new [Attribute Name].
Repeat this for every option you want the attribute to have. Each term you add shows up in the list on the right with its slug and usage count.
You can do this for as many attributes as you need. Below, a term has been added to a separate attribute (“Test Attributes”) the same way.
Once terms are configured, the Attributes overview page shows the terms under each attribute, confirming they’ve been saved correctly.
Step 4: Set the Product Type to “Variable Product”
Open the product you want to add variants to (or create a new one). In the Product data dropdown, select Variable product. This unlocks the Attributes and Variations tabs needed for setting up variants.
Step 5: Assign the Attribute to the Product
Click the Attributes tab on the product edit screen. From the dropdown (which lists Custom product attribute plus any global attributes you’ve created), select the attribute you want to use, for example, Item Type, then click Add.
Step 6: Select Values and Enable Variations
After adding the attribute, you’ll see its name along with a Value(s) field. Click into it and select the terms you want to make available for this product (for example, Regular, Premium, Combo).
Make sure both checkboxes are set correctly:
- Visible on the product page – shows the attribute to customers on the front end.
- Used for variations – this is required if you want each value to become its own purchasable variation.
Once your values are selected and Used for variations is checked, click Save attributes.
Step 7: Create and Configure Variations
Click the Variations tab. Here you can:
- Set a Default Form Value – the option pre-selected for customers when they land on the product page.
- Use the Add variation dropdown and click Go to generate variations manually, or use “Create variations from all attributes” to generate one variation per value automatically.
- Expand each variation to configure its own SKU, regular price, sale price, and stock status.
Repeat this for each variation until every option (Regular, Premium, Combo, etc.) has its own price and stock settings.
Step 8: Update the Product
Once all variations are configured, click Update (or Publish for a new product) to save your changes. Customers will now see a dropdown on the product page letting them choose their preferred variant before adding it to the cart.