Variable products can be seen as a hierarchy, with the Variable Product as the parent and the Product Variations as the children. Within
WooCommerce each element (i.e. the parent variable product and each child variation) has a SKU and a
number of properties, some of which are shown below. There can be lots of variations, but for simplicity, we have shown only two.
In the above diagram, we are only
showing the stock and price properties and in this article we are ignoring other properties.
Variations can inherit properties
from the parent variable product and this complicates the mapping of products to
Sage, which does not have the notion of variable products.
Generally, the parent is not setup
as a product on Sage and only the variations are required. For example, a
product may come in 2 sizes, Small & Large, and each would be a separate product
on Sage with it’s own Product Code (SKU), stock quantity and price. In this case, the parent variable product would not have stock
management set in the Inventory tab of the product on the website and stock
would be set for each variation individually.
The price of each variation would also be set individually. Woosage will not update the parent and each
variation is regarded as a separate product that will have its stock & price(s) updated according to the Woosage50 settings, provided that Manage Stock is set on the website and the Sage product has the Publish to Web flag set (see
Stock Updates Article)
However, there are exceptions to
this, where there is one product on Sage and it is used to populate multiple
variations that share the same SKU, stock quantity and/or price, but they may have
different value for other attributes, such as shipping classes or weight.
The table below shows the settings
for these situations:
Element
| SKU
| Manage Stock?
| Stock Quantity
| Price
|
Parent
| Set
| Set
| Set
| Can be set |
Variations
| Not Set (inherited)
| Not Set
| N/A
| In herited if set in Parent or Set
|
In these cases, Woosage50 will use a
single product on Sage to update the stock quantity on the parent and the price(s) on the variations. This will result in:
- The
price of each variation being the same if set in parent or it can be set for the variations.
- The
variation will use the same stock pool - see Variation Quantity below if variation have multiple quantities.
- All
items will show the same SKU code.
This is not intended to be an
exhaustive explanation of all the permutations of variable products that WooCommerce
can accommodate.
Stock Updates
In WooCommerce stock can be managed at Variable or Variation level (or not at all, but this does not apply here).
If Stock Management is set at Variable level then the Variations will be ignored and the stock quantity will be updated at Variable level. This means that all Variation stock will be taken from the Variable stock quantity. As the Variations are ignored, their Stock Management setting will have no effect.
If Stock Management is not set at Variable level, but is set for the Variation, then each must have a unique SKU. The stock quantity will then be updated at variation level
If Stock Management is not set at either the Variable or Variation level, then no stock updates will be applied for these products.
Variation Quantity
WooCommerce assumes each variation has a quantity of 1 when sharing the stock pool, but in some cases the variations could be multiples (e.g. a box of 10), In this case, if an order is placed for 2 items the stock is reduced by 2, rather than 20 in the example.
WooCommerce doesn't support this, so in order to support variations as multiples in cartons, boxes, pallets etc, we recommend the following plugin, which has an inventory reduction per item sold feature to accommodate this.
Price Updates
Optionally, the price(s) of an item can be updated at the same time as the stock quantity and price is always set at Variation level for Variable products.
If the Variation SKUs match the Variable (parent) SKU then the price of each Variation will be the same, but if the SKUs for each Variation are different then each will have its price set independently.