Is there a way to upload multiple discount counts into CiviDiscount?Is there a way to find contacts who have multiple active or expired memberships?Need to change membership inheritanceApply Multiple Discount Codes to a Event RegistrationHow can I limit CiviDiscount codes to be used for a maximum number of participants rather than amount of times?CiviDiscount - Manual Event Registration Issue with Automatic DiscountCivi Event: Price Set, Additional Registrants ( Hiding the price set for the additional registrant)Unable to use discount codes when registering in admin areaCiviDiscount: How do I disable the automatic member discount for additional participants?Discounts for multiple price field selections (e.g. select all five options and get $X off)CiviDiscount automatic discount lost after clicking cancel on Paypal Standard
How to approach protecting my code as a research assistant? Should I be worried in the first place?
Can chords be inferred from melody alone?
Does the length of a password for Wi-Fi affect speed?
What prevents ads from reading my password as I type it?
Can a Hogwarts student refuse the Sorting Hat's decision?
What does the ISO setting for mechanical 35mm film cameras actually do?
Why is the Vasa Museum in Stockholm so Popular?
If the interviewer says "We have other interviews to conduct and then back to you in few days", is it a bad sign to not get the job?
Is the first page of a novel really that important?
Why does putting a dot after the URL remove login information?
Premier League simulation
Should I take out a personal loan to pay off credit card debt?
How to switch an 80286 from protected to real mode?
Where to pee in London?
Why private jets such as GulfStream ones fly higher than other civil jets?
Why do cheap flights with a layover get more expensive when you split them up into separate flights?
How to realistically deal with a shield user?
Does the spell "Silence" affect the caster?
Is DC heating faster than AC heating?
What is the probability of a biased coin coming up heads given that a liar is claiming that the coin came up heads?
Find a text string in a file and output only the rest of the text that follows it?
Write The Shortest Program To Check If A Binary Tree Is Balanced
Is an "are" omitted in this sentence
Probably terminated or laid off soon; confront or not?
Is there a way to upload multiple discount counts into CiviDiscount?
Is there a way to find contacts who have multiple active or expired memberships?Need to change membership inheritanceApply Multiple Discount Codes to a Event RegistrationHow can I limit CiviDiscount codes to be used for a maximum number of participants rather than amount of times?CiviDiscount - Manual Event Registration Issue with Automatic DiscountCivi Event: Price Set, Additional Registrants ( Hiding the price set for the additional registrant)Unable to use discount codes when registering in admin areaCiviDiscount: How do I disable the automatic member discount for additional participants?Discounts for multiple price field selections (e.g. select all five options and get $X off)CiviDiscount automatic discount lost after clicking cancel on Paypal Standard
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
We are getting ready to do a Groupon promotion that will discount memberships. Groupon has generated individual "voucher codes" for each person who purchases. I need to enter each of these voucher codes as a single-use discount code. I'd like to be able to enter up to 200 codes at once, all with the same usage limits and rules, but so far, I can't figure out how to do this except to enter each code manually and set all the rules each time. When I try to just copy one code to avoid having to set all the rules each time, the copy shows a randomly-generated code that can't be edited. Has anyone figured this out?
civimember cividiscount
New contributor
add a comment |
We are getting ready to do a Groupon promotion that will discount memberships. Groupon has generated individual "voucher codes" for each person who purchases. I need to enter each of these voucher codes as a single-use discount code. I'd like to be able to enter up to 200 codes at once, all with the same usage limits and rules, but so far, I can't figure out how to do this except to enter each code manually and set all the rules each time. When I try to just copy one code to avoid having to set all the rules each time, the copy shows a randomly-generated code that can't be edited. Has anyone figured this out?
civimember cividiscount
New contributor
add a comment |
We are getting ready to do a Groupon promotion that will discount memberships. Groupon has generated individual "voucher codes" for each person who purchases. I need to enter each of these voucher codes as a single-use discount code. I'd like to be able to enter up to 200 codes at once, all with the same usage limits and rules, but so far, I can't figure out how to do this except to enter each code manually and set all the rules each time. When I try to just copy one code to avoid having to set all the rules each time, the copy shows a randomly-generated code that can't be edited. Has anyone figured this out?
civimember cividiscount
New contributor
We are getting ready to do a Groupon promotion that will discount memberships. Groupon has generated individual "voucher codes" for each person who purchases. I need to enter each of these voucher codes as a single-use discount code. I'd like to be able to enter up to 200 codes at once, all with the same usage limits and rules, but so far, I can't figure out how to do this except to enter each code manually and set all the rules each time. When I try to just copy one code to avoid having to set all the rules each time, the copy shows a randomly-generated code that can't be edited. Has anyone figured this out?
civimember cividiscount
civimember cividiscount
New contributor
New contributor
New contributor
asked 9 hours ago
DDChicagoDDChicago
112 bronze badges
112 bronze badges
New contributor
New contributor
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
It might be possible to import the codes directly into the database using a tool like PHPMyAdmin with the proper formatting.
The table which contains your codes is 'cividiscount_item'. It contains 18 fields. If you were able to generate a code in CiviDiscount which defined the same usage limits/rules, you could essentially use that as a 'template' for the other codes you imported - assuming it was the same for all of the codes you needed to bring in.
There are various ways to import or create the codes in mySQL, either using some insert/update statements, or import from CSV. The fields in the database which contain the codes rules/logic are serialized, but I am assuming you could use a statement to update the codes you imported fields from the original one without losing any data integrity.
You could also just copy the code 199 times (ouch) and then use PHPMyAdmin to go and update the codes to your liking in the 'Code' field, but I can't see how that would be more efficient. Also, have to be careful about changing things in the database once they have gone into actual use on your site.
The API CSV Import GUI extension also seems to be able to import Discount Codes but you would face the same issues above - might be useful to you: https://civicrm.org/extensions/api-csv-import-gui
Edit, this is also Really Ugly and not preferred, but you can go to CiviDiscount, right-click and edit the code in question in a new tab. Use Chrome Developer Tools (Etc.) by right clicking and "inspecting element" on the discount code field which is uneditable. Change the value to the new code, and then save. I verified this reflected the change in the database. The part you change will look like below. I think this also means developing an extension to change it or even some jquery might be possible - however, there are good reasons to not change a live code. Perhaps the copy function should be overridden to allow code definition?
<span class="crm-form-text big">TESTCHANGING2<input type="hidden" name="code" value="TESTCHANGING2" id="code"></span>
add a comment |
I upvoted Zachary's answer, but I felt conflicted. I do NOT recommend importing directly to MySQL, because you end up bypassing validation logic and could create corrupt discounts. However, their suggestion of the API CSV Import GUI is a good one, and the one I'd recommend.
If you're not sure what the values should be for your various columns, go to Support menu » Developer » API Explorer. Set your entity to DiscountCode and action to Get and press Execute. You'll get something much like you're seeing below. In the "Results" screen you can see the values, which you can copy/paste. If you already had discount codes, you may need to scroll down to find one that matches the ones you want to enter. You can click "Add Option" to set Limit to 0 if you can't see the full list.
thanks, i learned something here!
– Zachary
2 hours ago
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "605"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
DDChicago is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcivicrm.stackexchange.com%2fquestions%2f31624%2fis-there-a-way-to-upload-multiple-discount-counts-into-cividiscount%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
It might be possible to import the codes directly into the database using a tool like PHPMyAdmin with the proper formatting.
The table which contains your codes is 'cividiscount_item'. It contains 18 fields. If you were able to generate a code in CiviDiscount which defined the same usage limits/rules, you could essentially use that as a 'template' for the other codes you imported - assuming it was the same for all of the codes you needed to bring in.
There are various ways to import or create the codes in mySQL, either using some insert/update statements, or import from CSV. The fields in the database which contain the codes rules/logic are serialized, but I am assuming you could use a statement to update the codes you imported fields from the original one without losing any data integrity.
You could also just copy the code 199 times (ouch) and then use PHPMyAdmin to go and update the codes to your liking in the 'Code' field, but I can't see how that would be more efficient. Also, have to be careful about changing things in the database once they have gone into actual use on your site.
The API CSV Import GUI extension also seems to be able to import Discount Codes but you would face the same issues above - might be useful to you: https://civicrm.org/extensions/api-csv-import-gui
Edit, this is also Really Ugly and not preferred, but you can go to CiviDiscount, right-click and edit the code in question in a new tab. Use Chrome Developer Tools (Etc.) by right clicking and "inspecting element" on the discount code field which is uneditable. Change the value to the new code, and then save. I verified this reflected the change in the database. The part you change will look like below. I think this also means developing an extension to change it or even some jquery might be possible - however, there are good reasons to not change a live code. Perhaps the copy function should be overridden to allow code definition?
<span class="crm-form-text big">TESTCHANGING2<input type="hidden" name="code" value="TESTCHANGING2" id="code"></span>
add a comment |
It might be possible to import the codes directly into the database using a tool like PHPMyAdmin with the proper formatting.
The table which contains your codes is 'cividiscount_item'. It contains 18 fields. If you were able to generate a code in CiviDiscount which defined the same usage limits/rules, you could essentially use that as a 'template' for the other codes you imported - assuming it was the same for all of the codes you needed to bring in.
There are various ways to import or create the codes in mySQL, either using some insert/update statements, or import from CSV. The fields in the database which contain the codes rules/logic are serialized, but I am assuming you could use a statement to update the codes you imported fields from the original one without losing any data integrity.
You could also just copy the code 199 times (ouch) and then use PHPMyAdmin to go and update the codes to your liking in the 'Code' field, but I can't see how that would be more efficient. Also, have to be careful about changing things in the database once they have gone into actual use on your site.
The API CSV Import GUI extension also seems to be able to import Discount Codes but you would face the same issues above - might be useful to you: https://civicrm.org/extensions/api-csv-import-gui
Edit, this is also Really Ugly and not preferred, but you can go to CiviDiscount, right-click and edit the code in question in a new tab. Use Chrome Developer Tools (Etc.) by right clicking and "inspecting element" on the discount code field which is uneditable. Change the value to the new code, and then save. I verified this reflected the change in the database. The part you change will look like below. I think this also means developing an extension to change it or even some jquery might be possible - however, there are good reasons to not change a live code. Perhaps the copy function should be overridden to allow code definition?
<span class="crm-form-text big">TESTCHANGING2<input type="hidden" name="code" value="TESTCHANGING2" id="code"></span>
add a comment |
It might be possible to import the codes directly into the database using a tool like PHPMyAdmin with the proper formatting.
The table which contains your codes is 'cividiscount_item'. It contains 18 fields. If you were able to generate a code in CiviDiscount which defined the same usage limits/rules, you could essentially use that as a 'template' for the other codes you imported - assuming it was the same for all of the codes you needed to bring in.
There are various ways to import or create the codes in mySQL, either using some insert/update statements, or import from CSV. The fields in the database which contain the codes rules/logic are serialized, but I am assuming you could use a statement to update the codes you imported fields from the original one without losing any data integrity.
You could also just copy the code 199 times (ouch) and then use PHPMyAdmin to go and update the codes to your liking in the 'Code' field, but I can't see how that would be more efficient. Also, have to be careful about changing things in the database once they have gone into actual use on your site.
The API CSV Import GUI extension also seems to be able to import Discount Codes but you would face the same issues above - might be useful to you: https://civicrm.org/extensions/api-csv-import-gui
Edit, this is also Really Ugly and not preferred, but you can go to CiviDiscount, right-click and edit the code in question in a new tab. Use Chrome Developer Tools (Etc.) by right clicking and "inspecting element" on the discount code field which is uneditable. Change the value to the new code, and then save. I verified this reflected the change in the database. The part you change will look like below. I think this also means developing an extension to change it or even some jquery might be possible - however, there are good reasons to not change a live code. Perhaps the copy function should be overridden to allow code definition?
<span class="crm-form-text big">TESTCHANGING2<input type="hidden" name="code" value="TESTCHANGING2" id="code"></span>
It might be possible to import the codes directly into the database using a tool like PHPMyAdmin with the proper formatting.
The table which contains your codes is 'cividiscount_item'. It contains 18 fields. If you were able to generate a code in CiviDiscount which defined the same usage limits/rules, you could essentially use that as a 'template' for the other codes you imported - assuming it was the same for all of the codes you needed to bring in.
There are various ways to import or create the codes in mySQL, either using some insert/update statements, or import from CSV. The fields in the database which contain the codes rules/logic are serialized, but I am assuming you could use a statement to update the codes you imported fields from the original one without losing any data integrity.
You could also just copy the code 199 times (ouch) and then use PHPMyAdmin to go and update the codes to your liking in the 'Code' field, but I can't see how that would be more efficient. Also, have to be careful about changing things in the database once they have gone into actual use on your site.
The API CSV Import GUI extension also seems to be able to import Discount Codes but you would face the same issues above - might be useful to you: https://civicrm.org/extensions/api-csv-import-gui
Edit, this is also Really Ugly and not preferred, but you can go to CiviDiscount, right-click and edit the code in question in a new tab. Use Chrome Developer Tools (Etc.) by right clicking and "inspecting element" on the discount code field which is uneditable. Change the value to the new code, and then save. I verified this reflected the change in the database. The part you change will look like below. I think this also means developing an extension to change it or even some jquery might be possible - however, there are good reasons to not change a live code. Perhaps the copy function should be overridden to allow code definition?
<span class="crm-form-text big">TESTCHANGING2<input type="hidden" name="code" value="TESTCHANGING2" id="code"></span>
edited 6 hours ago
answered 7 hours ago
ZacharyZachary
7864 silver badges11 bronze badges
7864 silver badges11 bronze badges
add a comment |
add a comment |
I upvoted Zachary's answer, but I felt conflicted. I do NOT recommend importing directly to MySQL, because you end up bypassing validation logic and could create corrupt discounts. However, their suggestion of the API CSV Import GUI is a good one, and the one I'd recommend.
If you're not sure what the values should be for your various columns, go to Support menu » Developer » API Explorer. Set your entity to DiscountCode and action to Get and press Execute. You'll get something much like you're seeing below. In the "Results" screen you can see the values, which you can copy/paste. If you already had discount codes, you may need to scroll down to find one that matches the ones you want to enter. You can click "Add Option" to set Limit to 0 if you can't see the full list.
thanks, i learned something here!
– Zachary
2 hours ago
add a comment |
I upvoted Zachary's answer, but I felt conflicted. I do NOT recommend importing directly to MySQL, because you end up bypassing validation logic and could create corrupt discounts. However, their suggestion of the API CSV Import GUI is a good one, and the one I'd recommend.
If you're not sure what the values should be for your various columns, go to Support menu » Developer » API Explorer. Set your entity to DiscountCode and action to Get and press Execute. You'll get something much like you're seeing below. In the "Results" screen you can see the values, which you can copy/paste. If you already had discount codes, you may need to scroll down to find one that matches the ones you want to enter. You can click "Add Option" to set Limit to 0 if you can't see the full list.
thanks, i learned something here!
– Zachary
2 hours ago
add a comment |
I upvoted Zachary's answer, but I felt conflicted. I do NOT recommend importing directly to MySQL, because you end up bypassing validation logic and could create corrupt discounts. However, their suggestion of the API CSV Import GUI is a good one, and the one I'd recommend.
If you're not sure what the values should be for your various columns, go to Support menu » Developer » API Explorer. Set your entity to DiscountCode and action to Get and press Execute. You'll get something much like you're seeing below. In the "Results" screen you can see the values, which you can copy/paste. If you already had discount codes, you may need to scroll down to find one that matches the ones you want to enter. You can click "Add Option" to set Limit to 0 if you can't see the full list.
I upvoted Zachary's answer, but I felt conflicted. I do NOT recommend importing directly to MySQL, because you end up bypassing validation logic and could create corrupt discounts. However, their suggestion of the API CSV Import GUI is a good one, and the one I'd recommend.
If you're not sure what the values should be for your various columns, go to Support menu » Developer » API Explorer. Set your entity to DiscountCode and action to Get and press Execute. You'll get something much like you're seeing below. In the "Results" screen you can see the values, which you can copy/paste. If you already had discount codes, you may need to scroll down to find one that matches the ones you want to enter. You can click "Add Option" to set Limit to 0 if you can't see the full list.
answered 3 hours ago
Jon G - Megaphone TechJon G - Megaphone Tech
28.4k1 gold badge21 silver badges78 bronze badges
28.4k1 gold badge21 silver badges78 bronze badges
thanks, i learned something here!
– Zachary
2 hours ago
add a comment |
thanks, i learned something here!
– Zachary
2 hours ago
thanks, i learned something here!
– Zachary
2 hours ago
thanks, i learned something here!
– Zachary
2 hours ago
add a comment |
DDChicago is a new contributor. Be nice, and check out our Code of Conduct.
DDChicago is a new contributor. Be nice, and check out our Code of Conduct.
DDChicago is a new contributor. Be nice, and check out our Code of Conduct.
DDChicago is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to CiviCRM Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcivicrm.stackexchange.com%2fquestions%2f31624%2fis-there-a-way-to-upload-multiple-discount-counts-into-cividiscount%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown