Note:
Always backup WordPress database and files before updating to latest version, just in case!
Always backup WordPress database and files before updating to latest version, just in case!
If you override default and use custom templates in your_theme/woocommerce/ you need to make sure that templates are updated with those in plugin_dir/templates/ - otherwise some new features might not show up on the site.
** Version 1.1.12 **
- Fix: Translation bug with "You have bought %d tickets for this lottery!" string
- Fix: Shortcode bug when option "Show finished lotteries" is false
- Fix: lang domain fix
** Version 1.1.11 **
- Fix: Relist future lotteries bug
- Fix: plural translation problems in message "you have bought..."
- Add: ability to clear on hold orders that are preventing lottery to end
- Add: Filters woocomerce_lottery_history, woocommerce_lottery_winners, woocommerce_lottery_participants
** Version 1.1.10 **
- Fix: WPML compatibility bug
- Fix: Problem when 3rd party plugin removes product object
- Fix: Plural translation problems
** Version 1.1.9 **
- Fix: removed lottery column from WooCommerce orders view
- Fix: bug with multiple winners
** Version 1.1.8 **
- Fix: shortcodes problem when "do not mix" enabled in settings
** Version 1.1.7 **
- Add: Limit ticket by lottery in the quantity selector
- Fix: Change name of js function from countdown to wc_lottery_countdown
- Fix: Countdown format bug
- Fix: Changed admin dashboard widget
- Fix: Php notice in backend WooCommerce email settings
- Fix: Progress bar on firefox
- Add: Compact countdown option
- Fix: Bug with filtering lotteries from shop page
- Fix: Bug with title on lotteries base page
** Version 1.1.6 **
- Fix: Bugs in admin backend filter product on PHP v7.1.x
- Fix: Future lottery not showing once it starts
** Version 1.1.5 **
- Fix: Sending multiple "no luck" emails to same user
- Fix: Stock status not changing after lottery relist
** Version 1.1.4 **
- Add: Added sale price for lottery products
- Fix: Bug not creating log table on activation
** Version 1.1.3 **
- Fix: Filtering lotteries in admin area
- Fix: Featured lotteries shortcode bug
- Fix: Lotteries shortcode bug
- Fix: WooCommerce Recently Viewed lotteries widget bug
- Fix: Virtual and downloadable chackbox bug
** Version 1.1.2 **
- Fix: Featured widget bug
- Fix: Typos
- Fix: Check for minimal PHP and WordPress versions to avoid fatal errors on activating plugin in unsupported environment
** Version 1.1.1 **
- Fix: query problems with WooCommerce >= 3.0.0
- Fix: WPML bug when using secondary language without main language
** Version 1.1 **
- Fix: WooCommerce >= 3.0.0 compatibility
- Fix: Delete entry when order is cancelled
- Fix: Multiple failed emails to same user
+ Add: manual lottery relist feature
+ Add: Added [vendor] tag for sending mail to group buy author/vendor on lottery_fail, lottery_finished -
useful with multivendor plugins like WC Vendors or if you want to send email to lottery author or owner in case of multivendor site
** Version 1.0.8 **
- Fix: Shortcode lotteries_winners not showing winners when item is out of stock
** Version 1.0.7 **
- Fix: Add to cart button text
** Version 1.0.6 **
- Fix: JS bug in frontend
** Version 1.0.5 **
+ Add: Shortcode for displaying lottery winners [lotteries_winners]
- Fix: Issue with wpml language switcher
** Version 1.0.4 **
- Fix: Bug with Wp_Meta_Query
** Version 1.0.3 **
- Fix: Check if user is logged only for lottery products
- Fix: Small language changes
- Fix: Problem with language data
** Version 1.0.2 **
- Fix: Problem with translating counter labels
+ Add: option to instantly finish lottery when maximum number of tickets was sold
** Version 1.0.1 **
- Fix: Small bugs
+ Add: Refund feature for lotteries that failed due minimum participants limit
** Version 1.0.0 **
- Initial release
WooCommerce Lottery is a extension for popular WooCommerce plugin and extends it with lottery features. We tried to make it easy to use but also to include all lottery features. With this plugin you will get a powerful lottery solution for WordPress which is easily setup and customized.
With WooCommerce Lottery plugin you can setup WordPress lottery website and start lotteries in less than 30 minutes (assuming you have payment processor account ready). WooCommerce Lottery plugin integrates seamlessly with WooCommerce and no special knowledge is needed (same level like for standard WooCommerce usage).
Source: https://codex.wordpress.org/Managing_Plugins#Installing_Plugins
Make sure to install WooCommerce before you activate WooCommerce Lottery plugin.
You can install plugin via WordPress "Add New" plugin - to do that download zip with plugin only (installable WordPress files), click add new and that's it. In case you do not have permissions to upload to plugins/ directory you will need FTP login info and upload plugin via FTP.
Alternative setup. After downloading WooCommerce Group Buy plugin, extract plugin zip and upload it to your plugins directory - wp-content/plugins/ folder of your Wordpress installation. Since this is extension for WooCommerce you need to install WooCommerce before activating the plugin. WooCommerce plugin which can be downloaded here.
If you need help installing Wordpress see the link here
Once you installed and activated WooCommerce go to WooCommerce > System Status and make sure that you don't have red colored errors (specially for WP memory limit). Make sure to enable inventory management in WooCommerce!
WooCommerce Lottery plugin uses cronjobs and you have to setup one cronjob:
Here is screenshot of cronjobs page and setup in DirectAdmin control panel
More details about cronjobs can be found by googling "how to add cronjob in cPanel / DirectAdmin". If you don't know how to add cronjob the best and the easiest way is to email your hosting support to do it for you (purpose of hosting support are tasks like helping you with cronjobs, our support helps you with plugin issues - cronjobs are hosting related task / issue).
If your hosting company does not support one minute cronjobs we suggest that you move your website to more serious hosting company or use service like EasyCron
Our plugin is meant to be used as ecommerce solution which will / should earn money so we suggest you to invest in proper hosting (which at least supports one minute cronjobs).
Source: https://docs.woocommerce.com/document/importing-woocommerce-dummy-data/
WooCommerce comes with sample data which you can import, dummy data file is /wp-content/plugins/woocommerce/dummy_data.xml Sample data does not include group buy products, it provides data to populate Woocommerce store with some demo products, ratings, comments, etc. Steps to import demo data to your WordPress WooCommerce site:
Importing dummy data can take some time, specially on slow Internet connections. Be patient and do not close or refresh browser tab until import operation is completed.
Setting up new lottery is easy:
In Woocommerce Settings -> Group Buy you can set group buy base page where your client will have a list of all group buy deals. Please see note if you want to set your group buy page as home page. If you have group buy only website there is no need to setup group buy base page, you can use Woocommerce shop page.
Make sure that when setting up lottery site your lottery base page is different than your home page. If you need lotteries on home page use shortcodes or widgets to display them on your home page.
After you activate WooCommerce Lottery plugin couple new options will appear:
New WooCommerce product type lottery:
Here are settings that you can turn on and off. Settings are self explainable. You can enable or disable showing past and future lotteries. Another useful setting is whether to mix regular products with lotteries or just show lotteries on separate page (defined via lotteries Base Page dropdown, see screenshot).
On screenshot below you can see how product list with lotteries looks like. Lottery status icon colors: red - active lottery, orange - finished, red - failed.
If lottery has failed, in product / lottery details you will see "Refund" link which enables you to refund all tickets to participants if your lottery rules require that.
Once lottery is finished you can view winners on single lottery page or in wp-admin edit product page. Below are screenshots.Beside that you can create my lotteries page for users where you can use this shortcode: show user's lotteries (active lotteries in which user participates and list of user's won lotteries) -[my_lotteries]
Here is a list of all available plugin shortcodes. Some shortcodes accept optional orderby and order attributes.
[lotteries_winners], [lotteries_winners per_page="12" order="desc"]
[featured_lotteries per_page="12" columns="4" orderby="date" order="desc"]
[ending_soon_lotteries per_page="12" columns="4" order="desc"]
[recent_lotteries per_page="12" columns="4" orderby="date" order="desc"]
[future_lotteries], [future_lotteries per_page="12" columns="4" orderby="date" order="desc"]
[lotteries ids="1,2,3,4,5"]
[my_lotteries]
Please note that there is no paging when you use shortcodes (same as with WooCommerce shortcodes). Per page attribute means how many items will be displayed on that particular page without paging!
Here you can find answers to frequently asked questions. Feel free to contact us if you can't find answer to your question.
Right way to customize plugin's templates is to copy contest of plugin_dir/woocommerce-simple-lotteries/templates/ directory to your_theme/woocommerce/ directory and do modifications there.
When you ask us for support make sure it's not related to tasks we don't do as part of support:
- style or customize your theme to do this or that
- provide support for bugs caused by 3rd party plugins or themes (we can pinpoint that some plugin is problematic)
- send you CSS or HTML code for modifying html elements
add_action( 'woocommerce_after_shop_loop_item_title','wpgenie_show_counter_in_loop',50 );
function wpgenie_show_counter_in_loop(){
global $product;
$time = '';
if(!isset ($product))
return;
if('lottery' != $product->product_type)
return;
$timetext = __('Time left', 'wc_lottery');
if(!$product->is_started()){
$timetext = __('Starting in', 'wc_lottery');
$counter_time = $product->get_seconds_to_lottery();
} else{
$counter_time = $product->get_seconds_remaining();
}
$time = '<span class="time-left">'.$timetext.'</span <div class="lottery-time-countdown"
data-time="'.$counter_time.'" data-lotteryid="'.$product->id.'" data-format="'.get_option(
'simple_lotterys_countdown_format' ).'"></div>'; if($product->is_closed()){ $time = '<span
class="has-finished">'.__('Lottery finished','wc_lottery').'</span>'; } echo $time;
}
_lottery_closed
_lottery_dates_from
_lottery_dates_to
_lottery_multiple_winner_per_user
_lottery_num_winners
_lottery_participants_count
_lottery_price
_lottery_winners
_lottery_fail_reason
_max_tickets
_max_tickets_per_user
_min_tickets
_participant_id
_lottery_wpml_language
In filename wc_lottery-en_GB.po suffix en_GB must match your language settings in WordPress, otherwise language will not be loaded. So for example you can have wc_lottery-en_AU.mo, wc_lottery-af.mo or wc_lottery-en_CA.mo, complete list of available suffixes are here https://make.wordpress.org/polyglots/teams/
<div class="lottery-time" id="countdown"><?php echo apply_filters('time_text', __( 'Time left:',
'wc_lottery' ), $product->get_type()); ?> <div class="main-lottery lottery-time-countdown" data-time="<?php echo
$product->get_seconds_remaining() ?>" data-lotteryid="<?php echo $product->get_id() ?>" data-format="<?php echo
get_option( 'simple_lottery_countdown_format' ) ?>"></div> </div>
This plugin is created by wpgenie. Check out our Envato profile where you can support us by purchasing our plugins, give us feedback and post your ideas and feature requests, ask for support and rate our items. Check out our free stuff.
We do WordPress developing, plugins for WordPress & WooCommerce, eCommerce sites based on WooCommerce, WordPress performance optimization and managed WordPress hosting.