Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I use this module a lot but I found a missing feature. What about a checkbox to invert the Filter by role??
This way, I can provide a discount the first time a visitor shops in our site, but then, as they get a assigned the role "shopper", I cannot filter using this role. What we need it to be able to say "apply to users NOT having this role".
What do you think?
Thanks!
Comment | File | Size | Author |
---|---|---|---|
#4 | uc_discounts_alt-role_not-753800.patch | 8.75 KB | stockliasteroid |
Comments
Comment #1
davidburnsAre your first time visitors logged in?
If not, then you can apply the discount to role -> anonymous.
Comment #2
drubage CreditAttribution: drubage commentedI also could use this feature. We have a role for "wholesale" users on our site. Obviously they are also "authenticated users". We'd like a coupon that can only be used by retail customers and NOT wholesale customers. Is there a way to say "NOT" for the "Qualification by Role(s)." filter? In other words, we'd want to say that this coupon applies to all roles EXCEPT "wholesale". Let me know, thanks!
Comment #3
stockliasteroid CreditAttribution: stockliasteroid commentedI second this. I also have the wholesaler situation, and I'd like discounts to only apply to NOT wholesalers.
Comment #4
stockliasteroid CreditAttribution: stockliasteroid commentedHere's an initial stab at this. Please take a look at it and let me know what you all think...
Comment #5
bruiseviolet CreditAttribution: bruiseviolet commentedI agree. We are currently having the same issue. The website this module is on, has many different user accounts. The discount is for all retail customers- however not for customers who get discounts already (like wholesalers). Unfortunately because we have to do the discount for "authenticated users"- since anyone signed up as "wholesale" is by default an authenticated user (and you can't uncheck that) even without having "Wholesale" checked for the discount- wholesale accounts are still able to get the discount.
Obviously in the small print and terms it clearly states wholesale orders are not valid for the discounts- we still get wholesalers who apply the discount, and then we are stuck with the not so fun task of calling them up and informing them that they can only get the discount if they pay full retail for the products. Not fun and turning into a real pain in the butt- as the website is exploding and monthly discounts and promotions for retail customers is a huge driving force behind their marketing.
Would love if there was a reverse- sort of like a conditional action- where even if they are marked "authenticated" as long as they are also checked "wholesale' it WILL NOT allow the discount.
Comment #6
stockliasteroid CreditAttribution: stockliasteroid commentedThe patch above basically provides for that. You can have a discount require some roles, and disallow others. So you can have a discount apply only to those who don't have the wholesale role... Give it a test and let me know how it works for you.
Comment #7
bruiseviolet CreditAttribution: bruiseviolet commentedSorry, completely didn't see your patch. (Pregnancy brain). I will install it tonight and I'll be able to let you know how it's working within 24 hours or less. LOL Thanks!
Comment #8
pfrillingI applied the patch in #4 and it appears to be working correctly for me.
Comment #9
kostajh CreditAttribution: kostajh commentedThis worked great for me. Based on #4 and #8, and my testing I'm going to mark this as RBTC.
Comment #10
hockey2112 CreditAttribution: hockey2112 commentedWhen I apply the patch, I receive this error message:
Any idea how I can fix it?
Comment #11
hockey2112 CreditAttribution: hockey2112 commentedI ended up fixing the issue by manually adding the "role_filter_not" column to the uc_discounts table.