OrchardCore.Commerce
OrchardCore.Commerce copied to clipboard
Product Promotions (i.e. Coupons / Discounts) Support (OCC-56)
First goal is to differentiate difference between a coupon and a discount - possible they can both just be called Discounts, though likely all could be handled through an IPromotion or IDiscount interface.
Coupons That expression to me is a price adjustment provided to people who have a "code" to enter at time of checkout
Discounts I see these as more of a price adjustment applied to target markets, no checkout "code" required
Coupons or Discounts Both Coupons or Discounts should be able to be a percentage based price adjustment or a unit of currency based adjustment. They could be flagged as single use (globally or per user - per user would require an authenticated user for purchase though). They can be conditioned on products existing in the cart and can only apply to individual products as opposed to the full cart.
Adding in information from @MatteoPiovanelli-Laser:
- Promotion can be on a single product, on a cart "line", or on the whole cart.
- Promotion has a condition that says whether it applies at the time. Some examples: user is authenticated, user belongs to role, user has entered a code, it is a given date, some combination/quantity of products is in the cart, total price on the cart is above a threshold...
- Promotions can also be applied on or have to do with shipping. e.g.: free shipping for orders above X.
- Coupons can expire, be private (to a single user or group).
- Conditions related to prices may be based on the price before tax, after tax, before shipping...
- Promotion may have conditions that relate them to each other. E.g.: a promotion that may be applied only if no other promotion is applied.
- Promotions have a way to sort them, like a priority. I think one should always first do product or line promotions, then cart promotions, but in either group there may be other factors involved. E.g.: how to handle the case where a coupon decreases the price for a single unit of a product, dropping the subtotal under the threshold above which we would apply a cart discount, or free shipping?
As I look at things, I am thinking that the "way to sort" promotions should really be just a workflow.
I have created a separate issue for a smaller scope version of this, for the MVP. It's a rough draft of the minimum what I think we'd need for basic discounts. Could you share your thoughts there? https://github.com/OrchardCMS/OrchardCore.Commerce/issues/136
(this issue remains open for the more general discussion)
Hi, thanks for implementing OrchardCore Commerce!
I have just cloned the actual repo and did some tests. Regarding the discounts: In Nwazet commerce, there has been a content type Discount with a DiscountPart. The concept was having different discounts with "rules" when they apply - see screenshot:
I have used this to apply discount depending on user role.
In the current implemtation, it seems that the DiscountPart is attached to the product. Are the any plans to change that like it previously was in NwazetCommerce? If yes, is there any timeline? If no, how could a role-based discount be integrated in the currenct concept/implemtation?
Thanks, Dieter