Craft Commerce - For a discount, can we include all products in the product count but not include the sale items that receive the discount?
Based on some research, I believe a custom Adjuster is the way to solve this problem.

I created an adjuster with the following:

craft/plugins/myplugin/MypluginPlugin.php

public function commerce_registerOrderAdjusters()
{
  return [
    401 =&gt; new \Commerce\Adjusters\Myplugin_TenpercentDiscount
  ];
}


craft/plugins/myplugin/Adjusters/Myplugin_TenPercentDiscount.php

&lt;?php

namespace Commerce\Adjusters;
use Craft\Commerce_LineItemModel;
use Craft\Commerce_OrderAdjustmentModel;
use Craft\Commerce_OrderModel;

class Myplugin_TenPercentDiscount implements Commerce_AdjusterInterface {

public function adjust(Commerce_OrderModel &amp;$order, array $lineItems = []){

    if (empty($lineItems))
    {
        return [];
    }

    if ($order-&gt;totalQty &gt;= 10)
    {
        $adjuster = new Commerce_OrderAdjustmentModel();

        $adjuster-&gt;type        = 'Item Discount';
        $adjuster-&gt;name        = '10% Off Items';
        $adjuster-&gt;description = 'Your order qualifies for a 10% discount on all non sale items because you are purchasing at least 10 products.';
        $adjuster-&gt;orderId     = $order-&gt;id;

        $amountOff = 0;
        foreach ($lineItems as $item)
        {
            if (empty($item-&gt;onSale))
            {
                $amountOff += ($item-&gt;subtotal + $item-&gt;discount) * .1;
            }
        }
        $amountOff = $amountOff * -1;

        $adjuster-&gt;amount      = $amountOff;
        $adjuster-&gt;optionsJson = ['lineItemsAffected' =&gt; null];
        $order-&gt;baseDiscount  += $amountOff;

        $adjuster-&gt;included = false;

        return [$adjuster];
    }
    return[];
}

}


Does anyone see any flaws with this approach?