- Unzip the attached zip file and upload the folder to your websites plugin directly.
- Make sure you have myCRED installed and setup.
- Enable the myCRED Lottery plugin.
- Once enabled, a new menu will be available under “myCRED” in your admin area called “Lotteries”.
- Before creating a lottery, make sure your websites Timezone is setup and correct! Otherwise the schedule will be firing according to your server time which might not be the same as your local time! You can find your timezone settings on the “Settings” > “General” page.
- This add-on will check your time format and if you use AM/PM the lottery will also use AM/PM. Otherwise it will default to the 24 hour system. (optional)
- Login to your myCRED account here on mycred.me
- Click “Your Licenses” and enter the domain name of the website where this add-on is used. Save. (If you do not do this, your plugin will never update it self when a new version is available).
How to setup a lottery
- Visit the “Lotteries” page under the “myCRED” menu.
- Click “Create Lottery” in the top of the page.
- Just as with posts, start by giving your lottery a title and select your lottery “Type”. Before updating, also select your schedule. Choose either to run this lottery once, daily or weekly.
- Once you have entered in your dates and times, click “Save Draft”. Note that each state (start, close, draw and pay) must have a unique time. You can not draw winners and payout the same hour. This is so you can correct mistakes (if they happen) before each state change.
- When the lottery draft has been saved, 4 new meta boxes will be loaded.
- Start by setting up your lottery (The Setup Meta Box). By default, mycred will draw 5 winners / winning numbers. You can change this, but if you do, you must click “Update” for the Winnings section to update! myCRED will save your lottery settings each time the edit page is re-loaded.
- Set your requirements for participating in this lottery.
- Set exclusions for this lottery.
- Adjust the templates used by the lottery.
- Once you have all the settings according to your liking, you can publish the lottery though the “Activate Lottery” button.
How to show lotteries
Lotteries are shown on your website via the mycred_lottery or mycred_lotteries shortcodes. The mycred_lottery shows a specific lottery while the mycred_lotteries shortcode shows all published lotteries. You can find more information on how to use these shortcodes in the myCRED Codex.
How to edit lotteries
You can edit lotteries just like any other custom post type in WordPress via your admin area. NOTE In the current version of the lottery add-on, you can not make changes to a lottery that is active! I will add this feature to the next version of the lottery add-on.
- Visit the myCRED > Lotteries page.
- Select the lottery you want to edit and click on the lottery title.
- Edit the lottery and save your changes.
By default you can set a fixed number of points to award winners. As of version 1.2, you can also use formulas to give points based on specific metrics. For example you could set to payout a percentage of the total amount of points user has paid to enter the lottery. The following keywords are available in formulas:
|Represents the total amount of points paid to play this lottery.
||Pay 10 points plus 10% of the total amount paid into this lottery:
10 + ( PAYMENTS * 0.1 )
|Represents the total number of entries in the lottery.
||Pay 2 points per entry in the lottery as payout:
2 * ENTRIES
|Represents the total amount of points paid out in refunds for this lottery.
||Pay 10% of the total amount paid into this lottery minus any refunds there might have been:
( PAYMENTS * 0.1 ) - REFUNDS
Formulas are not mandatory, if you prefer to pay out a given amount you can do so.
Note about formulas and testing
When testing, make sure you have enough entries / payments in the lottery for the payout to work. If your for example use whole numbers for your points and the formula results in a value smaller then 1, the result will be interpreted as zero and no payout will occur. I recommend you set a high price or enter enough entries when testing to prevent this from occurring.
Demos are played using Chips, which is a demo currency and has no monetary value. When you register, you receive Chips automatically that in turn will allow you to play demos. Scratch Cards can not be played by visitors! You must be logged in to play.
Frequently Asked Questions
No questions found for this add-on.
Only logged in customers who have purchased this product may leave a review.