Knowledgebase

How to add a variable product (sizes and colours) in WooCommerce

When one product comes in several sizes or colours, you do not need a separate product for each one. A variable product lets the customer choose the size and colour on one page, and each combination (a variation) can have its own price, stock, SKU and photo. This guide shows you how to add a variable product in WooCommerce step by step, with an EgWeb T-shirt in sizes S to XL and three colours.

New to WooCommerce products? Start with How to add a new product in WooCommerce (step by step): the name, description, images, category and Publish work the same way.

1) Choose Variable product

Go to Products → Add new product, write the product name (1) and description, then in the Product data box choose Variable product (2).

Product name and Variable product type

2) Add the first attribute (Size)

Open the Attributes tab (1). In Name (2) write Size, and in Value(s) (3) write the options separated by a vertical bar: S | M | L | XL. Make sure Used for variations (4) is ticked, then click Save attributes (5).

Attributes tab: Size with values S, M, L, XL

3) Add the second attribute (Color)

Click Add new (1), then fill the new attribute (2): Name Color, values Navy | White | Orange, with Used for variations ticked. Click Save attributes (3).

Add a second attribute: Color

Use the same attribute on many products? Create it once in Products → Attributes (a global attribute), then choose it from Add global. Customers can then filter the shop by size or colour.

4) Generate the variations

Open the Variations tab (1) and click Generate variations (2), then confirm. WooCommerce creates one variation for every combination: 4 sizes × 3 colours = 12 variations.

Variations tab and Generate variations

5) Set the price for all variations at once

Open Bulk actions (1) and choose Set regular prices, type the price and confirm. All variations in the list (2) get the same price; you can then change the price of a single variation if it is different (for example XL).

Bulk actions and the list of variations

6) Edit one variation

Click a variation to open it:

  1. Variation gallery: the photo shown when the customer chooses this colour.
  2. SKU: your code for this exact variation, for example EGW-TS-S-NAVY.
  3. Regular price (and Sale price for a discount).
  4. Tick Manage stock? to track the quantity of this variation…
  5. …and write the Stock quantity.

Variation details: gallery, SKU, price, stock

Click Save changes (1) under the variations list, then Publish (or Update) the product.

Save changes for the variations

7) What the customer sees

On the product page the customer chooses the size and colour (1); WooCommerce shows the price, photo and stock of that variation (2), then they click Add to cart (3).

Variable product page in the store

Common problems

  • "This product is currently out of stock and unavailable" → the chosen variation has no price, or its stock is 0. Every variation needs a price.
  • The Variations tab is empty → at least one attribute must have Used for variations ticked and be saved.
  • The price shows a range (for example 300–350 EGP) → this is normal when variations have different prices.
  • Too many variations → delete combinations you do not sell, or use Add manually instead of generating all of them.

Frequently asked questions

Can each colour have its own photo?

Yes, set the photo in each variation. Customers see it when they choose the colour.

Can I add many variable products from Excel?

Yes, with the CSV importer: How to add and edit WooCommerce products in bulk (CSV / Excel).

Does shipping change by size?

Only if you set a weight for each variation and use weight-based shipping. For prices by governorate see How to set shipping prices by governorate.

Need help? Open a support ticket or message us on WhatsApp +20 127 113 3655.

  • WooCommerce, variable product, variations

Was this answer helpful?

0 Users Found This Useful