Product variations woocommerce

New Page

  1. Documentation /
  2. Product variable

Product variable

Variable products in WooCommerce allow you to propose a set of variations of a product, with control over prices, stock, image and more for each variation. They can be used for a product like a t-shirt, where you can offer a large, medium and small size and in different colours.

Adding a variable product ↑ Back to top

Establish product type ↑ Volver arriba

To add a variable product, create a new product or edit an existing one.

  1. Vaya has: WooCommerce >  Products .
  2. Select the Add Product button or Edit an existing product. The product data appears.
  3. Select  Variable Product in the Product Data  dropdown menu .

Create-a-variable-product-in-WooCommerce

Add attributes to use in variations ↑ Back to top

In the Attributes section , add attributes before creating variations: use global attributes that are site-wide, or define custom attributes specific to a product.

Global attributes

To use a global attribute in its product:

  1. First create a global attribute.
  2. You can then choose that global attribute from the dropdown menu and select Add .
  3. Choose  Select All  to add all values ​​to the variable product (if applicable).
  4. Most importantly, select the Used for Variations checkbox to use them for variations.
  5. Select Save Attributes .

attribut_global attribut_global_2

Custom attributes

To add a new specific attribute to this product:

  1. Select Custom Product Attribute and click Add .
  2. Name the attribute (for example, Size).
  3. Set values ​​separated by a vertical pipe, | (e.g.  Small | Medium | Large ).
  4. Check the box Used for variants .
  5. Select Save Attributes .

custom_attributeAdding a custom attribute custom_attribute_2Adding custom attribute values

Agregar variaciones ↑ Volver arriba

With attributes created and saved to add a variation, go to the Variations section in the Product data meta box.

Manually Add a Variation

  1. Select Add variation from the dropdown menu, and select Go.
  2. Select attributes for your variation. To change additional data, click the triangle icon to expand the variation.
  3. Edit any available data. The only required field is Regular Price.
  4. Select Save changes.

Creating All Possible Variations

Select Create variations from all attributes to have WooCommerce create every possible combination of variations from your attributes and their values and select Go:

create_all_variations-1

It will create a new variation for each and every possible combination of variation attributes (max 50 per run). If you have more possible combinations you can run it again.

For example, if you have two attributes – color (with values blue and green) and size (with values large and small) it creates the following variations:

  • Large Blue
  • Large Green
  • Small Blue
  • Small Green

Note: If you later add additional attributes, it may require the variables to be redefined for the variation combinations to work correctly. Also, be aware of this selection functionality/behavior when using more than 30 variations.

Editing Many Variations

If you have more than 15 variations, use the buttons to navigate forward and backward through the list. Each time you navigate to a new set of variations, the previous set is saved. This ensures that all changes are saved.

variants_15

Setting Defaults ↑ Back to top

Set defaults you prefer on variations. In the example, no default form values were set, so users can pick any color and size right away from the product page.

default_variations

If you want a certain variation already selected when a user visits the product page, choose the default form values. This also enables the Add to Cart button to appear automatically on variable product pages.

You can only set defaults after at least one variation has been created.

Adición de datos de variación ↑ Volver arriba

Each variation can have the following properties.

General

  • Enabled – Enable or disable the variation.
  • Downloadable – If this a downloadable variation.
  • Virtual – If this product isn’t physical or shipped, shipping settings are removed.
  • Regular Price (required) – Set the price for this variation.
  • Sale Price (optional) – Set a price for this variation when on sale.
  • Tax status – Taxable, shipping only, none.
  • Tax class – Tax class for this variation. Useful if you are offering variations spanning different tax bands.
  • Stock quantity – Shows if Manage stock? is selected. Allows to set the current stock level for the variation.
  • Allow backorders? – Shows if Manage stock? is selected. Allows to set if backorders are allowed for the variation; if enabled, stock can go below zero.
  • Low stock threshold – Shows if Manage stock? is selected. When the stock for the variation reaches this level you will get a notification email. If not set, the product-wide threshold will be used (see Inventory Management below).
  • Downloadable Files – Shows if Downloadable is selected. Add file(s) for customers to download.
  • Download Limit – Shows if Downloadable is selected. Set how many times a customer can download the file(s). Leave blank for unlimited.
  • Download Expiry – Shows if Downloadable is selected. Set the number of days before a download expires after purchase.

variation

Inventory Management

Inventory for variable products can be managed on product and variation level.

Сhoose how to manage stock by toggling Enable stock management at product level on the Inventory tab:

stock_at_product_level

The following settings are available if you choose to manage stock on a product level:

  • SKU – If you use SKUs, set the SKU or leave blank to use the product’s SKU.
  • Manage Stock? – Tick the box to manage stock at the variation level.
  • Stock Quantity – Shows if Manage Stock is selected. Input the quantity. Stock for the specific variation, or left blank to use the product’s stock settings.
  • Allow Backorders – Choose how to handle backorders.
  • Low stock threshold – When the stock for the variation reaches this level you will get a notification email.
  • Sold Individually? – Allow only one to be sold in one order. (This setting is used for the product itself. You cannot set a specific variation to only be sold once per order)

If Low stock threshold isn’t set then the store-wide default will be used. This default can be set in the Products – Inventory tab of WooCommerce settings:

Woo-Low-stock-threshold-setting

Choosing to manage stock for variations individually allows you to edit the same properties for each variation.

Set Stock Status can be applied to all variations at once to In stock or Out of stock. Bulk-update under Variations:

bulk_edition

Shipping

  • Weight – Weight for the variation, or left blank to use the product’s weight.
  • Dimensions – Height, width and length for the variation, or left blank to use the product’s dimensions.
  • Shipping class – Shipping class can affect shipping. Set this if it differs from the product.

Linked Products

  • Upsells
  • Cross-sells
  • Grouped

If the SKU, weight, dimensions, and stock fields are not set, then it inherits values assigned to the variable product. Price fields must be set per variation.

Agregar una imagen a la variación ↑ Volver arriba

  1. Expand the variation.
  2. Click the blue image placeholder (screenshot).
  3. Select the image you wish to use.
  4. Save.

variation_image Bulk Editing ↑ Back to top

You can bulk-edit variations by selecting the specific piece of data you want from the dropdown. In this example, I want to edit prices for all variations:

bundled edition_2 What Customers See ↑ Back to top

On the frontend, when viewing a variable product, the user is presented with dropdown boxes to select variation options. Selecting options will reveal information about the variation, including available stock and price.

exemple_variable

If the user tries to click the greyed out add to cart button before choosing an attribute, a message will appear asking them to select some attributes.

In the product archive page, Add to Cart does not display because a variation must first be chosen before adding to cart on the product page.

archive_page

Functionality / behavior for more than 30 variations ↑ Back to top

If a product has more than 30 possible variations, then the customer will first have to select all available attributes before they can see if a product has stock or is available.

For example, if you have a Hoodie, available in five sizes and three colors, this produces 125 variations (five to the power of three). If you removed five of these variations, the customer would still be able to select that from the front-end but they wouldn’t see this wasn’t available until they selected the Add to cart button.

You can override this by changing the Ajax variation threshold. There are some developer focused details in this documentation article:

Cambiar el límite en el número de variaciones para los menús desplegables de productos de variables dinámicas

×

  1. Documentación /
  2. Producto variable

Variable Product

Variable products in WooCommerce let you offer a set of variations on a product, with control over prices, stock, image and more for each variation. They can be used for a product like a shirt, where you can offer a large, medium and small and in different colors.

Adición de un producto variable ↑ Volver arriba

Set the Product Type ↑ Back to top

To add a variable product, create a new product or edit an existing one.

  1. Go to: WooCommerce > Products.
  2. Select the Add Product button or Edit an existing product. The Product Data displays.
  3. Select Variable product from the Product Data dropdown.

Create-a-variable-product-in-WooCommerce

Agregar atributos para usar en variaciones ↑ Volver arriba

In the Attributes section, add attributes before creating variations — use global attributes that are site-wide or define custom ones specific to a product.

Global Attributes

To use a global attribute on your product:

  1. First create a global attribute.
  2. Then you can choose said global attribute from the dropdown and select Add.
  3. Choose Select all to add all values from to the variable product (if applicable).
  4. Most importantly select the Used for variations checkbox to use these for variations.
  5. Select Save attributes.

attribut_global attribut_global_2

Custom attributes

To add a new attribute specific to this product:

  1. Select Custom Product Attribute and click Add .
  2. Name the attribute (for example, Size).
  3. Set values ​​separated by a vertical pipe, | (e.g.  Small | Medium | Large ).
  4. Check the box Used for variants .
  5. Select Save Attributes .

custom_attributeAdding a custom attribute custom_attribute_2Adding custom attribute values

Add variations ↑ Back to top

Once the attributes have been created and saved to add a variation, navigate to the Variations section in the product data meta box .

Ajouter manuellement une variation

  1. Select Add variation from the dropdown menu, and select Go.
  2. Select attributes for your variation. To change additional data, click the triangle icon to expand the variation.
  3. Edit any available data. The only required field is Regular Price.
  4. Select Save changes.

Creating All Possible Variations

Select Create variations from all attributes to have WooCommerce create every possible combination of variations from your attributes and their values and select Go:

create_all_variations-1

It will create a new variation for each and every possible combination of variation attributes (max 50 per run). If you have more possible combinations you can run it again.

For example, if you have two attributes – color (with values blue and green) and size (with values large and small) it creates the following variations:

  • Large Blue
  • Large Green
  • Small Blue
  • Small Green

Note: If you later add additional attributes, it may require the variables to be redefined for the variation combinations to work correctly. Also, be aware of this selection functionality/behavior when using more than 30 variations.

Editing Many Variations

If you have more than 15 variations, use the buttons to navigate forward and backward through the list. Each time you navigate to a new set of variations, the previous set is saved. This ensures that all changes are saved.

variants_15

Setting Defaults ↑ Back to top

Set defaults you prefer on variations. In the example, no default form values were set, so users can pick any color and size right away from the product page.

default_variations

If you want a certain variation already selected when a user visits the product page, choose the default form values. This also enables the Add to Cart button to appear automatically on variable product pages.

You can only set defaults after at least one variation has been created.

Adición de datos de variación ↑ Volver arriba

Each variation can have the following properties.

General

  • Enabled – Enable or disable the variation.
  • Downloadable – If this a downloadable variation.
  • Virtual – If this product isn’t physical or shipped, shipping settings are removed.
  • Regular Price (required) – Set the price for this variation.
  • Sale Price (optional) – Set a price for this variation when on sale.
  • Tax status – Taxable, shipping only, none.
  • Tax class – Tax class for this variation. Useful if you are offering variations spanning different tax bands.
  • Stock quantity – Shows if Manage stock? is selected. Allows to set the current stock level for the variation.
  • Allow backorders? – Shows if Manage stock? is selected. Allows to set if backorders are allowed for the variation; if enabled, stock can go below zero.
  • Low stock threshold – Shows if Manage stock? is selected. When the stock for the variation reaches this level you will get a notification email. If not set, the product-wide threshold will be used (see Inventory Management below).
  • Downloadable Files – Shows if Downloadable is selected. Add file(s) for customers to download.
  • Download Limit – Shows if Downloadable is selected. Set how many times a customer can download the file(s). Leave blank for unlimited.
  • Download Expiry – Shows if Downloadable is selected. Set the number of days before a download expires after purchase.

variation

Inventory Management

Inventory for variable products can be managed on product and variation level.

Сhoose how to manage stock by toggling Enable stock management at product level on the Inventory tab:

stock_at_product_level

The following settings are available if you choose to manage stock on a product level:

  • SKU – If you use SKUs, set the SKU or leave blank to use the product’s SKU.
  • Manage Stock? – Tick the box to manage stock at the variation level.
  • Stock Quantity – Shows if Manage Stock is selected. Input the quantity. Stock for the specific variation, or left blank to use the product’s stock settings.
  • Allow Backorders – Choose how to handle backorders.
  • Low stock threshold – When the stock for the variation reaches this level you will get a notification email.
  • Sold Individually? – Allow only one to be sold in one order. (This setting is used for the product itself. You cannot set a specific variation to only be sold once per order)

If Low stock threshold isn’t set then the store-wide default will be used. This default can be set in the Products – Inventory tab of WooCommerce settings:

Woo-Low-stock-threshold-setting

Choosing to manage stock for variations individually allows you to edit the same properties for each variation.

Set Stock Status can be applied to all variations at once to In stock or Out of stock. Bulk-update under Variations:

bulk_edition

Shipping

  • Weight – Weight for the variation, or left blank to use the product’s weight.
  • Dimensions – Height, width and length for the variation, or left blank to use the product’s dimensions.
  • Shipping class – Shipping class can affect shipping. Set this if it differs from the product.

Linked Products

  • Upsells
  • Cross-sells
  • Grouped

If the SKU, weight, dimensions, and stock fields are not set, then it inherits values assigned to the variable product. Price fields must be set per variation.

Agregar una imagen a la variación ↑ Volver arriba

  1. Expand the variation.
  2. Click the blue image placeholder (screenshot).
  3. Select the image you wish to use.
  4. Save.

variation_image Bulk Editing ↑ Back to top

You can bulk edit variants by selecting the specific data you want from the drop-down list. In this example, I want to change the prices of all variants:

bundled edition_2 What customers see ↑ Back to top

On the frontend, when viewing a variable product, the user is presented with dropdowns to select variation options. Selecting options will reveal information about the variation, including available stock and price.

exemple_variable

If the user tries to click the grayed out Add to Cart button before choosing an attribute, a message will appear asking them to select some attributes.

In the product archive page, Add to Cart is not displayed because a variant must first be chosen before it is added to cart on the product page.

archive_page

Functionality/Behavior for plus 30 variants ↑ Back to top

If a product contains more than 30 possible variations, the customer tends to select all available attributes before being able to see if a product is in stock or is available.

For example, if you have a hoodie, available in five sizes and three colors, this will produce 125 variations (five to the power of three). If you removed five of these variations, the customer would still be able to select that from the front-end, but wouldn’t see that this wasn’t available until they selected the Add to Cart button.

You can override this by changing the Ajax variation threshold. There are some developer-focused details in the cet documentation article:

Change the limit on the number of variations for dynamic variable product dropdowns

×

Google Google translator

Google Google Translate


Video Product variations woocommerce

Related Posts

Free chat room code for my website

Contents1 How to set up a free chat room on the website.2 3 comentarios2.1 Trackbacks/Pingbacks2.2 Submit a Comment Cancel reply3 How to Create a Chat Room Website…

Background image full screen css

Contents1 Cómo – Full Page Image1.1 Example1.2 Example2 CSS background image tamaño tutorial: how to codify a complete page background image3 Perfect Full Page Background Image3.1 Méthode CSS géniale,…

WordPress leverage browser caching

Contents1 Aproveche el almacenamiento in hidden del navegador1.1 Will it works for my website?1.2 Where are plugin options1.3 Some JavaScript files still display under Leverage Browser Caching1.4…

WordPress post to facebook page

Contents1 How to Automatically Post to Facebook from WordPress1.1 Download Now: How to Launch a WordPress Website [Free Guide + Checklist]1.2 1. Create an IFTTT account.1.3 2….

Download images from wordpress media library

Contents1 How to export your WordPress media library1.1 Download maintenant : How to launch a WordPress website [Free Guide + Checklist]1.2 How to export your WordPress media…

WordPress single post template

Contents1 How to Create Custom Unique Post Templates in WordPress2 Post Template Files2.1 author.php2.2 Fecha.php3 Handbook navigation4 How to Create Custom Single Post Templates in WordPress5 Video…