Answers.Body: <p>If you specify a discount based on membership type and include a price field, then it should only apply to that specific price field. But using CiviDiscount for Contribution Pages is something that sort of works, but I think mostly unintentionally — it was designed for events and memberships and the fact that it works on price sets in general is sort of a bonus.</p>
  <p>You might want to try changing the field type, maybe a radio or checkbox would work? You could also try entering the code manually to see if that works.</p>
  <p>Not sure on limiting access to a specific contribution page to signed in users only.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-09-05T20:49:15.983Z
Answers.Text: Yeah, tried all the options, doesn't look like this is going to work. Manually entering the code would be one option, but the user experience would be less than ideal so this isn't worth doing over the more "streamlined" way within WooCommerce itself. Oh well. Thanks for the response.
Answers.UserDisplayName: Michael Matthews
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-08-30T22:51:10.623Z
Answers.LastActivityDate: 2023-08-30T23:34:03.370Z
Answers.LastEditDate: 2023-08-30T23:34:03.370Z
Answers.UserDisplayName: Lars SG
Body: <p>Trying something a bit unusual, again. Searched this site and didn't quite find any answers.</p>
  <p>What I have in mind is using a contribution page tied with CiviDiscount to act basically as an online store, where you're buying in this case a physical 3D custom printed item. Could do this in WooCommerce (which we also have on our CiviCRM site, cramming lots of functionality in here) but trying to find a free way to do it (non-profit and all).</p>
  <p>The idea is to set up a donation page for something that has a fixed cost, but gives membership tier discounts (tiers 0 and 1, no discount; 2 and 3 $5 off, tier 4 $10 off). If I specify membership level discounts, it looks like they'd apply to the membership signup page as well (different contribution page, different price set), which is not what I want. The other wrinkle is, they would need to be an existing member to do this (so people who aren't registered members and signed in can't even do this). Haven't seen a way to prevent a contribution page from taking a contribution from someone who isn't signed in to a valid role (you can mark Events as members only with an extension, but not contribution pages as far as I can tell).</p>
  <p>So my idea is to have a couple of defined discount codes that automatically apply to a a specific price set field, one for 'tiers 2 and 3' and one for 'tier 4' above. Attached is a screen shot of what I'm trying to do; just leaving everything blank except the 'members of type' field is what I tried first, but nothing so far has given me the results I'm looking for.
  <a href="https://i.sstatic.net/ncOmt.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/ncOmt.jpg" alt="screen grab of cividiscount config" /></a></p>
  <p>And this:
  <a href="https://i.sstatic.net/opYGr.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/opYGr.png" alt="donation form" /></a></p>
  <p>is what I see on the donation page. Was expecting that to be $15, not $25, as I'm signed in as a Plaid member there.</p>
  <p>To stress, I know this whole thing is trying to force something that isn't an online store to act like an online store, so it's absolutely not a common, or one might argue valid, use case. Just trying to figure out if it's even possible. I've used CiviDiscount on events and member signup pages and it worked there. Not sure if a Donation type vs. Membership type makes a difference here.</p>
  <p>Thanks.</p>
  <p>Michael</p>
  
Tags: <cividiscount>
Title: Using a CiviDiscount codes to give different discounts on one donation page price set depending on logged in role/membership tier
ThreadText: # Using a CiviDiscount codes to give different discounts on one donation page price set depending on logged in role/membership tier
  
  (Asked by: username_0 on 2023-08-30)
  
  Trying something a bit unusual, again. Searched this site and didn't quite find any answers.
  
  What I have in mind is using a contribution page tied with CiviDiscount to act basically as an online store, where you're buying in this case a physical 3D custom printed item. Could do this in WooCommerce (which we also have on our CiviCRM site, cramming lots of functionality in here) but trying to find a free way to do it (non-profit and all).
  
  The idea is to set up a donation page for something that has a fixed cost, but gives membership tier discounts (tiers 0 and 1, no discount; 2 and 3 $5 off, tier 4 $10 off). If I specify membership level discounts, it looks like they'd apply to the membership signup page as well (different contribution page, different price set), which is not what I want. The other wrinkle is, they would need to be an existing member to do this (so people who aren't registered members and signed in can't even do this). Haven't seen a way to prevent a contribution page from taking a contribution from someone who isn't signed in to a valid role (you can mark Events as members only with an extension, but not contribution pages as far as I can tell).
  
  So my idea is to have a couple of defined discount codes that automatically apply to a a specific price set field, one for 'tiers 2 and 3' and one for 'tier 4' above. Attached is a screen shot of what I'm trying to do; just leaving everything blank except the 'members of type' field is what I tried first, but nothing so far has given me the results I'm looking for.
  [![screen grab of cividiscount config](https://i.sstatic.net/ncOmt.jpg)](https://i.sstatic.net/ncOmt.jpg)
  
  And this:
  [![donation form](https://i.sstatic.net/opYGr.png)](https://i.sstatic.net/opYGr.png)
  
  is what I see on the donation page. Was expecting that to be $15, not $25, as I'm signed in as a Plaid member there.
  
  To stress, I know this whole thing is trying to force something that isn't an online store to act like an online store, so it's absolutely not a common, or one might argue valid, use case. Just trying to figure out if it's even possible. I've used CiviDiscount on events and member signup pages and it worked there. Not sure if a Donation type vs. Membership type makes a difference here.
  
  Thanks.
  
  username_0
  
  **Tags:** cividiscount
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-08-30. Score: 0
  
  If you specify a discount based on membership type and include a price field, then it should only apply to that specific price field. But using CiviDiscount for Contribution Pages is something that sort of works, but I think mostly unintentionally — it was designed for events and memberships and the fact that it works on price sets in general is sort of a bonus.
  
  You might want to try changing the field type, maybe a radio or checkbox would work? You could also try entering the code manually to see if that works.
  
  Not sure on limiting access to a specific contribution page to signed in users only.
  
  > **Comments:**
  > **username_0**: Yeah, tried all the options, doesn't look like this is going to work. Manually entering the code would be one option, but the user experience would be less than ideal so this isn't worth doing over the more "streamlined" way within WooCommerce itself. Oh well. Thanks for the response.  
  
  ---
  
  