How to apply a discount or sale to a variant?
Variants can not be selected when setting up discounts in the UI.

We have variant-based sales/discounts high on the list for the next version of Craft Commerce, but nothing planned to make available in the short term. It will also allow sales and discounts to work with any custom purchasable.

I tried to think of a way around it, and the one way I can came up with in the short term is a little hack:

You could use the description field to limit the discount to specific variant SKU's.

So all discounts would work and be set up as they normally would, but with a condition on the product, but if you got them to put the keyword "ONLY" into the description and then got them to paste the variant SKU into the description. i.e:

ONLY the red tubs (SKU162839) are on discount.


or

Discount ONLY applies to SKU78439 and SKU94300


You could then add the following event listener into a plugin:

// So far this would only be called when the discount has
matched with everything else about the product.
craft()-&gt;on('commerce_discounts.onBeforeMatchLineItem',
function($event){
   $lineItem = $event-&gt;params['lineItem'];
   $discount = $event-&gt;params['discount'];

    if (stripos($discount-&gt;description, 'only') === false) {
        return; // do nothing, and let the discount match as it normally would, because the discount does not have 'only' in the description.
    }else{
        if (stripos($discount-&gt;description, $lineItem-&gt;sku) === false) {
            $event-&gt;performAction = false; // since this SKU is not in the description string, then don't apply this discount 
        }
    }
});


I wrote the above code without testing, but something along those should work.

Alternatively you could place a custom field on the product which list the variants on discount, and have the above event listener check use that information on the product (instead of matching the SKU on the discount description).

Sorry it's a bit of a hack for now, we will get discounts on variants in the next version of Commerce.

Hope that helps.