
Variants in order
When editing a MiniShop3 order you can select and change product variants.
Displaying variants
In the order products table, variants are shown:
- In the Options column — variant option combination
- Product price — selected variant price
- SKU — variant SKU (if set)
Selecting a variant when adding a product
When adding a product with variants to an order:
- Select the product in the search window
- If the product has variants, a selector appears
- Choose the variant from the list
- Click Apply
Variant information
The selector shows:
- Option combination (color, size, etc.)
- Variant price
- Available stock
Changing the variant
To change the variant of an already added product:
- Find the product in the order table
- Click the Variant button in the product row
- Select the new variant
- Click Apply
Cost recalculation
When the variant is changed, the following are recalculated:
- Line price
- Line total (price × quantity)
- Order total
Resetting the variant
To revert to the base product (no variant):
- Click the Variant button in the product row
- Select Base product
- Click Apply
The product will use the price from the product card.
Options in the order
The selected variant's options are stored in the order line's options field:
{
"_variant_id": 5,
"color": "red",
"size": "XL"
}This allows:
- Showing options in email notifications
- Showing options in customer order history
- Using them in print forms
Stock control
Variant stock is respected when working with orders:
When adding
- Cannot add more than in stock
- Available quantity is shown
When changing quantity
- Available stock is checked
- Warning is shown if exceeded
Stock deduction
Stock is deducted when the order reaches the status set in ms3variants_deduct_stock_status.
Example:
- Order created with a variant (stock: 10)
- Order moved to "Paid" status (ID: 2)
- If
ms3variants_deduct_stock_status = 2, stock is decreased - New stock: 10 − quantity in order
Order cancellation
When an order is cancelled, stock is not restored automatically. To return stock, edit the variant manually or use a dedicated plugin.
