Currently the discount could be restricted only by date, customer related restrictions, coupon code and minimum/maximum subtotal.
We are considering this as a feature request and it will be done in some of our future releases.
There is no way to plug into this functionality even if you create some custom fields on the discounts and use relations to the products or product types the class which is responsible for applying the discounts is not inside IoC container and none of his methods is virtual so it is not easy replaceable(possible only via some CLR Injection).
I will log the following feature requests in our system:
- make the DiscountCalculator more easy replaceable by making the method CalculateAndApplyOrderDiscounts virtual.
- put it in Unity IoC with some IDiscountCalculator interface so it is even easier replacable without the need to also replace the EcommerceOrderCalculator which is using the DiscountCalculator.
Hopefully for the next version it will be possible to re-implement the DiscountCalculator method apply your logic there which takes all discounts and then based on a custom field or external data finds the applicable discounts and reduces the order total based on them.
Yes I will do my best the DiscountCalculator methods to become virtual for Sitefinity 6.2 and the whole class implementation to be replaceable so everyone can implement its own logic about applying discounts.
I am very interested in know if we can now do individual Discounts per Product, particularly I need to do two things.
First, I need to apply a discount - triggered by a coupon code, and have it apply to a product - such that if they add a product to the cart it may be discounted with a coupon code or even free.
Next, as a co-worker of mine asked years ago about pricing per role, we are still very interested in this out of the box.
We do have custom code in place to make it happen but would much rather have it out of the box. What is the status of custom pricing-per-role?