WooCommerce Lottery – Give ticket for free when client purchase another item

We had couple of inquries for WooCommerce Lottery if it is possible to give ticket for free and allow clients to participate in prize draw when they purchase regular items sold on websites. This is possible and relatively easy to setup using our plugin. If you want to give users ticket number you will need Pick Number Mod addon for WooCommerce Lottery.

Easiest and fastest solution, would be that you create new lottery product and treat it as regular simple product so when someone purchase it you will ship actual item, (or give user access for download, etc) but also state that user will participate in lottery and could win a prize after purchase.

It is possible to change text from “Participate now for” via translations to anything you like and thing might be more suitable.

That lottery product was setup like this (here we use only WooCommerce Lottery without Pick Number Mod addon in this example):

If you want more complex solution then you will need 3rd party plugin which implements Buy One, Get One Free option / feature for WooCommerce.

In this tutorial I used PW WooCommerce BOGO Free plugin which is really trivial to setup and use. After installation you need to publish promotion and for each purchase of regular product you can add lottery ticket for free if price is lower or equal to product you purchased. There are plenty of similar plugins which you can use for this purpose – all should work just fine.

Here are couple of screenshots to see how this looks like on website during checkout:

Please note that you need to manually add lottery ticket to cart, plugin does not add it automatically. This implementation is handy if you want to use question / answers.

On last screenshot you can see how sample lottery / prize draw was setup. Please note WooCommerce Lottery and Pick Number Mod addon are enabled in this test setup.

Important thing to setup is minimum number of tickets for draw to be done, max number of tickets can be increased or decreased whole time during lottery active phase but make sure you don’t set max tickets below number of sold tickets since that can result with unexpected behaviour.

Keep on your mind that with this solution users would be able to participate by buying lottery ticket directly since we have not implemented anything that would prevent purchasing ticket directly by going to lottery product single page. If you need lottery to be restricted only for those who purchase something else you might need to get different plugin for “Buy One, Get One Free” or get pro version for this plugin.

Now here you can see screenshots of implementation without Pick Number Mod addon. Key difference is that there is no ticket number and that draw will be automatically done once lottery ends (no manual pick winner option – plugin will do that automatically using mt_rand function from all participants – there will always be 1 winner if there is at least 1 participant).