Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I suppose it isn't wrong that this module is attempting to describe in long form the parameters of a coupon, but I believe it's not the best approach for two reasons:
- This module simple can't know how to describe all of the available conditions, especially if a discount rule is updated manually to include additional conditions that this module would never know about. For those sites that use a limited, known set of discount conditions, they could opt into this long form format for describing the parameters by editing the order coupons View and choosing that field handler.
- The bigger concern is usability, though: we lose the direct association between the discount applied via the coupon and its price component in the order total. Granted, if someone wants to figure it out, they can (so long as the long form is correct), but why make the customer think any harder about whether or not they were fairly granted their discount?
Fortunately, the Commerce Discount module already has a component_title property for discounts that is designed to be the name of the discount as displayed to customers. The order coupons View should be updated with the appropriate relationship and use of that field instead of the one that is currently used.
Comments
Comment #2
Frederic wbase CreditAttribution: Frederic wbase commentedAny update about this issue?
Comment #3
dpolant CreditAttribution: dpolant commentedAgreed - I've never really liked the original approach I took for this. I think it would be good to simplify that views field handler and have it just use the discount title. We probably don't even need a custom handler any more, just a relationship to the discount offer.
Comment #4
Frederic wbase CreditAttribution: Frederic wbase commentedI've already tried a lot of things with relationships and then i get duplicate issues. I would love to help with this issue. Maybe we can devide the work load for this? Where to start?
Comment #5
jddeli CreditAttribution: jddeli commentedI will like to see the possibility to do that?
If there is a solution it will be good for this module.