The Raffle Ticket Generator (RTG) plugin is an add-on to WooCommerce. You need to first install WooCommerce and have it configured. We also highly recommend a good backup system. For those are who are web developers with experience in shopping carts and eCommerce, things do happen. With having built thousands of eCommerce sites, and supported thousands more that got hacked, a broken or hacked site can be a disaster without regular offsite backups.
NEVER UPDATE THE PLUGIN ON A LIVE SITE without completely testing. You should disable any auto updates for the Raffle Ticket Generator plugin. There are simply too many options that can cause conflicts.
WooCommerce Compatibility FLAG – At the end of 2023, WooCommerce introduces the High Performance Storage option which is very different than the previous post method of storage. The majority of WooCommerce plugins are not compatible with that high performance storage and Versions of our plugin prior to V6 need to have legacy enabled. All our PAID versions from V6.0 forward are compatible with HPOS. The FREE VERSION IS DOES NOT HAVE HPOS ENABLED. If you have a brand new install of WooCommerce, this high performance option is enabled by default. All previous installations keep the legacy option by default. To enable Legacy Mode on a new install, just go to Woocommerce Settings, Advanced, Features, then click WordPress posts storage (legacy) and Save Changes.
RTG uses the WooCommerce product categories to control the options for each raffle. To create a raffle these are the most basic steps:
- Create a WooCommerce Product Category and designate it as a Raffle Category
- Set the options for the raffle in the Raffle Ticket Generator
- Make products for each Ticket Package. We use a separate product for each number of tickets. The Raffle Ticket Generator Plugin is designed for use with a SIMPLE WooCommerce product. It DOES NOT SUPPORT VARIABLE products. For example, if you want 1 ticket for $10 and 3 tickets for $25. You will make 2 products and assign the $10 product to give 1 ticket, and the $25 product to give 3 tickets. Assign the raffle product to a SINGLE CATEGORY and it MUST BE A RAFFLE CATEGORY.
- Raffle Tickets are generated when an order for that designated product is PAID per WooCommerce Order Status.
NOTE: Please do a full test of your settings PRIOR to going live with your raffle. ONCE YOUR RAFFLE IS LIVE – DO NOT CHANGE SETTINGS!!! Some configuration settings like Random or max tickets set other variables and changing them during a raffle can reset those and cause duplicate numbers or undesired results. NOTE: In version 4.5 and above, we have added a safety net. Once you sell tickets for a raffle, you cannot change many settings. This way you cannot create duplicates, etc. so you want to change starting numbers or formats, you have to clear the settings and start over.
Setting Up Raffle Categories: #
With WooCommerce installed and configured and RTG installed and activated, you need to create a WooCommerce Product Category and make it a raffle category. From WooCommerce, Products, Categories, add new. Give the category a name and assign a parent if needed. You will see the option to “Make this Category as Raffle Category”, check that box. This will tell the RTG plugin that this category will have raffle options.
Setting up the Raffle Options: #
When you have added a Raffle Category, you can now see that category as an option in the Raffle Ticket Generator settings. As with any development project, you should work from simple to complicated. The Raffle Ticket Generator plugin is designed to be used by Web Developers. There are many options and some of these require in depth server admin skills if your web server is not configured properly. So, to get started – we recommend that you setup the first raffle as a test and do a simple configuration.
- Set the starting number (numeric)
- Check the Orderid
- Set a prefix (TEXT – up to 6 Char – no spaces, no special characters)
Test to make sure things are generating using the default WooCommerce COD (Cash on Delivery) payment method, then add the other options you need and want. If you add all the features and options from the start and you are not generating tickets, you have a longer path to troubleshoot.
Remember – each raffle can only be assigned to a SINGLE CATEGORY.
From the top or side menu in the dashboard, select the Raffles and you will have a list of WooCommerce Product Categories that have been checked as being raffle categories. It will look like this:
To access the settings and options for each raffle just click on the Category name to display.
Later on we will discuss each option and what it does, but for the quickstart there are only a few things you need to know.
- Starting Ticket Number – This it the beginning ticket number – most people use something like 1001 or 1501.
- Prefix for the raffle ticket – Something to be specific for your raffle. We also recommend the orderID marked as yes as it helps find the order when people are calling about their ticket number.
That is all you need for now.
Setting the WooCommerce SIMPLE Product: #
The final setup is to create the WooCommerce Product. From WooCommerce, Products, Add New. DO NOT MAKE A VARIABLE PRODUCT.
Give the product a title and description and image. Check the raffle product indicator and assign it to a SINGLE raffle category. The product will get it’s setting from the raffle category is it assigned to. Setting multiple categories will confuse the plugin and not assign any tickets.
Set the number of tickets per product #
Down the product info area – click on the raffle tab to display the options for this product. Depending on Gold or Silver, you might see different options there. For now, you only need to be concerned with the Number of Tickets. This is the number of tickets to be given when this product is purchased. For our 1 ticket for $10 example – that will be a 1 for that box. It is NOT the total number of raffle tickets. If you put 1000, it will make 1000 tickets when that item is purchased.
THIS IS THE NUMBER ONE MISTAKE THAT IS MADE!
Click save or update and save your product.
Tiered Pricing: To setup a tiered pricing configuration such at 1 for $10, 3 for $25 and 8 for $50, simply duplicate the woocommerce product you just made and set the price and the number of tickets. If you want to have 3 options, you will make 3 products all getting their settings for the raffle, except the number of tickets for each product, from the category.
Testing the Ticket Generation: #
At this point you have a raffle setup and products. This is a good time to test out the plugin and make sure it is working. Add COD to WooCommerce Payment Options.
Purchase a Raffle Product and checkout using COD. You should get a ticket confirmation and email from WooCommerce.
We recommend not using Ticket Images to start out with until you have your settings configured how you want them. The Ticket Images need the gdImage Libraries on your server and that is the second most common problem people have when on shared hosting. Many of the budget shared hosting plans do not support that. Additionally, various security settings could prevent the display and will need to be adjusted. When you purchase a ticket and the status is “processing” which in WooCommerce means the order is paid, then it should display the tickets you setup in the order confirmation page and the email like above.
Refunding Raffle Ticket Orders in WooCommerce: #
When an order is refunded in WooCommerce that has raffle tickets, the raffle tickets are removed from the order and from the ticket database. The RTG plugin does not support partial refunds. If you have some order items to refund and a raffle ticket item, you have to refund the entire order and then do a replacement order for the correct items. Doing a partial refund with non raffle items and raffle items may remove the raffle ticket from the db or it may not, it depends on cart order position. So if you need to do a partial refund, you need to refund the entire order which will put the raffle ticket back in stock and then do a new order which will assign a new raffle ticket to the customer.