Plugin Directory

Changeset 3335928


Ignore:
Timestamp:
07/29/2025 12:04:47 PM (6 months ago)
Author:
dan009
Message:

2025-07-29

  • Added premium tab "Restrict Order per Customer per Raffle"
  • Fixed datetime picker error in Raffle page
  • Tested with latest version of Wordpress & Woocommerce
Location:
raffle-play-woo/trunk
Files:
5 added
6 edited

Legend:

Unmodified
Added
Removed
  • raffle-play-woo/trunk/includes/w/W_RafflePlayWoo_MainPage.php

    r3185249 r3335928  
    194194                                    role="tab" aria-controls="v-pills-userpickstab" aria-selected="false">
    195195                                    <?php esc_html_e('User Picks Tickets at Checkout',  'raffle-play-woo' ); ?>                                                                 
     196                                </a>
     197
     198                                <a class="nav-link" id="v-pills-restrictorder-tab" data-toggle="pill" href="#v-pills-restrictordertab"                               
     199                                    role="tab" aria-controls="v-pills-restrictordertab" aria-selected="false">
     200                                    <?php esc_html_e('Restrict One Order Per Customer Per Raffle',  'raffle-play-woo' ); ?>                                                             
    196201                                </a>
    197202
     
    21812186                        <!-- end of User Picks tickets at checkout -->
    21822187
     2188                        <!-- Restrict Order -->
     2189                        <?php include_once( 'main/W_RafflePlayWoo_Main_RestrictOrder.php'); ?>
     2190                        <!-- end of Restrict Order-->
    21832191
    21842192                            </div>
  • raffle-play-woo/trunk/includes/w/W_RafflePlayWoo_Raffles.php

    r3148896 r3335928  
    4343            var rpwoo_data = [];
    4444        </script>
     45
     46        <style>
     47            .navbar-light .navbar-nav .nav-link, .navbar-light .navbar-nav .show>.nav-link {
     48                color: rgba(0, 0, 0, .9);
     49                border: 1px solid black;
     50                padding: 10px !important;
     51                border-radius: 10px !important;
     52                margin: 5px !important;
     53            }
     54        </style>
    4555       
    4656
    4757          <!-- Modal -->
    4858        <div class="modal" id="modalSaveEdit"  tabindex="-1" role="dialog" >
    49            
    50             <div class="modal-dialog modal-lg" style='margin-top: 80px !important;'>
     59            <div class="modal-dialog modal-xl" style='margin-top: 80px !important;'>
    5160            <div class="modal-content ">
    5261                <div class='modal-headline'></div>
    5362
    5463                <div class="modal-header">
    55                     <?php RafflePlayWoo_Includes:: rpwoo_premium_image(); ?>
    56                     <h4 class="modal-title" style='text-align: center'>
    57                         <?php esc_html_e('Raffle Action', 'raffle-play-woo');?>
    58                        
    59                     </h4>
    60                    
    61                     <button type="button" class="close modal-close-btn" id='modal_close_btn' data-dismiss="modal" aria-label="Close">
    62                         <span aria-hidden="true">&times;</span>
    63                     </button>
    64                    
     64                    <h4 class="modal-title"><?php esc_html_e('Raffle Action', 'raffle-play-woo');?> </h4>
     65                        <button type="button" class="close modal-close-btn" id='modal_close_btn' data-dismiss="modal" aria-label="Close">
     66                            <span aria-hidden="true">&times;</span>
     67                        </button>
    6568                </div>
    66                
     69                
    6770
    6871                <div class="modal-body">
     
    7780                    </div>
    7881
    79                     <p></p>
     82         
    8083
    8184                    <div class="row bmp-set-row">
     
    8689                            <input type="number" min='1' name="" id="start_ticket">                           
    8790                        </div>
    88                     </div>
    89 
    90                     <p></p>
     91                    </div>           
    9192
    9293                    <div class="row bmp-set-row">
     
    9798                            <input type="checkbox" checked  name="" data-toggle='toggle'
    9899                             data-on="<?php esc_html_e('Yes', 'raffle-play-woo');?>"
    99                              data-off="<?php esc_html_e('No', 'raffle-play-woo');?>" id="is_live">                           
    100                         </div>
    101                     </div>
    102 
    103                     <p></p>
     100                             data-off="<?php esc_html_e('No', 'raffle-play-woo');?>" id="is_live"
     101                             data-size='small'
     102                             />                           
     103                        </div>
     104                    </div>           
    104105
    105106                    <div class="row bmp-set-row">
     
    110111                            <input type="checkbox"  name="" data-toggle='toggle'
    111112                            data-on="<?php esc_html_e('Yes', 'raffle-play-woo');?>"
    112                             data-off="<?php esc_html_e('No', 'raffle-play-woo');?>" id="is_terminated">                           
    113                         </div>
    114                     </div>
    115 
    116                     <p></p>
     113                            data-off="<?php esc_html_e('No', 'raffle-play-woo');?>" id="is_terminated"
     114                            data-size='small'
     115                            />                           
     116                        </div>
     117                    </div>
     118
     119                    <div class='row bmp-set-row' >
     120                        <div class="col-sm-5 " style='display: inline-block'>
     121                            <b>
     122                                <?php esc_html_e('Ticket Number Leading Zeros', 'raffle-play-woo' );?>
     123                            </b>
     124                            <span data-toggle='tooltip' data-container="#modalSaveEdit"
     125                                title="<?php esc_html_e('Put leading zeros to the number, the prefix will be included', 'raffle-play-woo' ); ?>">
     126                            <i class="fa fa-info-circle text-info"></i> </span>
     127                        </div>
     128                   
     129                        <div class="col-sm-7"
     130                            style='display: inline-block'>                               
     131                            <input type="number"
     132                                min='0'
     133                                max='20'
     134                                placeholder="0" 
     135                                id="leading_zeros"
     136                                value="<?php ?>"
     137                            /> 
     138
     139                            <p style='display: inline'>
     140                                <i>                                                                                 
     141                                    <?php
     142                                        esc_html_e('Eg: Leading zero set to 5, prefix T-, ticket is 12 => result: T-00012', 'raffle-play-woo');
     143                                    ?>
     144                                </i>
     145                            </p>
     146                        </div>
     147                    </div>
     148
     149             
    117150
    118151                    <div class="row bmp-set-row">
     
    125158                    </div>
    126159
    127                     <p></p>
     160               
    128161
    129162                    <div class="row bmp-set-row">
     
    134167                            <?php esc_html_e('Yes', 'raffle-play-woo');?> <input type="radio"  name="is_limited" id="is_limited_yes">   
    135168                            <input type="number" name="" min='1' id="limit_no">
     169                           
     170                            <span data-toggle='tooltip' data-container="#modalSaveEdit"
     171                                title="<?php esc_html_e('Generate Random Tickets within the range created by start ticket plus number of tickets. ***IMPORTANT*** Do not change the raffle ticket system from random to inline after tickets have been purchased***', 'raffle-play-woo' ); ?>" >
     172                                <i class="fa fa-info-circle text-info"></i>
     173                            </span>
     174
     175                            <input type="checkbox"  data-toggle="toggle" data-size='small' id='gen_random_tickets'
     176                                data-on="<?php esc_html_e('Yes', 'raffle-play-woo');?>" 
     177                                data-off="<?php esc_html_e('No', 'raffle-play-woo');?>"                               
     178                                data-size='small'
     179                            /> 
     180
     181                            <?php esc_html_e('Generate Random Tickets ', 'raffle-play-woo' ); ?>     
     182
     183
    136184                            <br />
    137185                            <?php esc_html_e('No', 'raffle-play-woo');?> <input checked type="radio"  name="is_limited" id="is_limited_no">                         
     
    139187                    </div>
    140188                   
    141                     <p></p>
     189                    <div class='row bmp-set-row border border-success' style='background-color: rgba(144, 238, 144, 0.4);' >
     190                        <div class="col-sm-5 " style='display: inline-block'>
     191                                <?php esc_html_e('Generate and Show Raffle tickets at checkout', 'raffle-play-woo' );?>
     192                            <span data-toggle='tooltip'
     193                                title="<?php esc_html_e('The tickets will be generated and shown at checkout page', 'raffle-play-woo' ); ?>" >
     194                                <i class="fa fa-info-circle text-info"></i>
     195
     196                            </span>
     197                            <p class='text-success badge badge-primary'>
     198                                <?php esc_html_e('New feature', 'raffle-play-woo' );?>
     199                            </p>
     200                        </div>
     201                   
     202                        <div class="col-sm-7" style=''>                               
     203                            <input type="checkbox"  data-toggle="toggle" data-size='small'
     204                                id='rdp_gen_checkout'
     205                                data-on="<?php esc_html_e('Yes', 'raffle-play-woo');?>" 
     206                                data-off="<?php esc_html_e('No', 'raffle-play-woo');?>"                             
     207                            />       
     208                        </div>
     209                    </div>
     210
     211                    <div class='row bmp-set-row border border-success' style='background-color: rgba(144, 238, 144, 0.4);' >
     212                        <div class="col-sm-5 " style='display: inline-block'>
     213                                <?php esc_html_e('Let customers pick tickets at checkout', 'raffle-play-woo' );?>
     214                            <span data-toggle='tooltip'
     215                                title="<?php esc_html_e('This feature only works if tickets are generated at checkout. The customer can change the raffle tickets to the desired ones', 'raffle-play-woo' ); ?>" >
     216                                <i class="fa fa-info-circle text-info"></i>
     217
     218                            </span>
     219                            <span class='text-success badge badge-primary'>
     220                                <?php esc_html_e('Enable Generate and Display tickets at checkout and add background image for ticket', 'raffle-play-woo' );?>
     221                            </span>
     222                        </div>
     223                   
     224                        <div class="col-sm-7" style=''>                               
     225                            <input type="checkbox"  data-toggle="toggle" data-size='small'
     226                                id='rdp_user_pick_tickets'
     227                                data-on="<?php esc_html_e('Yes', 'raffle-play-woo');?>" 
     228                                data-off="<?php esc_html_e('No', 'raffle-play-woo');?>"                             
     229                                />       
     230                        </div>
     231                    </div>
     232             
    142233
    143234                    <div class="row bmp-set-row">
     
    163254                    </div>
    164255
    165                     <p></p>
     256             
    166257
    167258                    <div class="row bmp-set-row">
     
    189280                    </div>
    190281
    191                     <p></p>
    192 
    193                     <div class='row bmp-set-row border border-success'  >
    194                         <div class="col-sm-5 " style='display: inline-block'>
    195                                 <?php esc_html_e('Let customers pick tickets at checkout', 'raffle-play-woo' );?>
    196                             <span data-toggle='tooltip'
    197                                 title="<?php esc_html_e('This feature only works if tickets are generated at checkout. The customer can change the raffle tickets to the desired ones', 'raffle-play-woo' ); ?>" >
    198                                 <i class="fa fa-info-circle text-info"></i>
    199 
    200                             </span>
    201                             <span class='text-success badge badge-primary'>
    202                                 <?php esc_html_e('Enable Generate and Display tickets at checkout and add background image for ticket', 'raffle-play-woo' );?>
    203                             </span>
    204                             <br/>
    205                             <span>
    206                                 <i>
    207                                     <a href="https://youtu.be/34FZ7mUxUy0" target='_blank'>
    208                                         <?php esc_html_e('Watch setup video here', 'raffle-play-woo'); ?>
    209                                     </a>
    210                                 </i>
    211                             </span>
     282             
     283
     284                    <div class='row bmp-set-row' >
     285                        <div class="col-sm-5 " style='display: inline-block'>
     286                            <b> <?php esc_html_e('Terminate Raffle on Buy Out Product', 'raffle-play-woo' );?>  </b>
     287                            <span data-toggle='tooltip' data-container="#modalSaveEdit"
     288                                                title="<?php esc_html_e('The raffle will be set to terminated if the "Buyout Product" is out of stock.', 'raffle-play-woo' ); ?>">
     289                                            <i class="fa fa-info-circle text-info"></i> </span>
    212290                        </div>
    213291                   
    214292                        <div class="col-sm-7" style=''>                               
    215                             <input type="checkbox"  data-toggle="toggle" data-size='small'
    216                                 id='rdp_user_pick_tickets'
    217                                 data-on="<?php esc_html_e('Yes', 'raffle-play-woo');?>"
    218                                 data-off="<?php esc_html_e('No', 'raffle-play-woo');?>"                                               
    219                             />  
    220                             <?php RafflePlayWoo_Includes::rpwoo_premium_image(); ?>     
    221                         </div>
    222                     </div>
    223 
    224                     <p></p>
     293                            <input type="checkbox"  data-toggle="toggle" data-size='small' id='rdp_enable_buy_product'
     294                                data-on="<?php esc_html_e('Yes', 'raffle-play-woo');?>"
     295                                data-off="<?php esc_html_e('No', 'raffle-play-woo');?>"
     296                                data-size='small'
     297                            />
     298                        </div>
     299                    </div>
     300
     301           
     302
    225303               
    226304                    <div class="row bmp-set-row">
     
    233311                    </div>
    234312               
    235                     <p></p>
     313           
    236314                 
    237315
     
    243321                            <input type="checkbox" checked disabled  name="" data-toggle='toggle'
    244322                            data-on="<?php esc_html_e('Yes', 'raffle-play-woo');?>"
    245                             data-off="<?php esc_html_e('No', 'raffle-play-woo');?>" id="is_live">                           
    246                         </div>
    247                     </div>
    248 
    249                     <p></p>
     323                            data-off="<?php esc_html_e('No', 'raffle-play-woo');?>"
     324                            data-size='small' id='one_raffle_inherit'
     325                            />                           
     326                        </div>
     327                    </div>
     328
     329                 
    250330
    251331                    <div class="row bmp-set-row">
     
    256336                            <input type="checkbox" checked disabled  name="" data-toggle='toggle'
    257337                            data-on="<?php esc_html_e('Yes', 'raffle-play-woo');?>"
    258                             data-off="<?php esc_html_e('No', 'raffle-play-woo');?>" id="is_live">                           
    259                         </div>
    260                     </div>
    261 
    262                     <div class='row bmp-set-row' >
    263                         <div class="col-sm-5 " >
    264                             <b>  <?php esc_html_e('Show Tickets Number with Raffle image in background (Thank you Page / Email )', 'raffle-play-woo' );?>  </b>
    265                             <span data-toggle='tooltip'
    266                                 title="<?php esc_html_e('Raffle image will be placed in the background of the ticket number. Custom images can be used, or customized in the template', 'raffle-play-woo' ); ?>" >
    267                                 <i class="fa fa-info-circle text-info"></i>
    268 
    269                             </span>
    270                         </div>
    271                                                            
    272                         <div class="col-sm-7" >                               
    273                             <input type="checkbox" id="show_ticket_image" data-toggle='toggle' data-on="<?php esc_html_e('Yes', 'raffle-play-woo');?>"
    274                             data-off="<?php esc_html_e('No', 'raffle-play-woo');?>" data-size='small'/>
    275                         </div>
    276 
    277                     </div>
    278 
    279                     <div class='row bmp-set-row' >
    280                         <div class="col-sm-5 " style='display: inline-block'>
    281                             <b>
    282                                 <?php esc_html_e('Raffle Tickets Images', 'raffle-play-woo' );?>
    283                             </b>
    284                         </div>                                   
    285                    
    286                         <div class="col-sm-7" style='display: inline-block; padding-left: 40px;'> 
    287                             <select name="select_ticket_image" id="select_ticket_image">
    288                                 <option value="blue" ><?php esc_html_e('Blue', 'raffle-play-woo' ); ?> </option>
    289                                 <option value="gold-one"  ><?php esc_html_e('Gold', 'raffle-play-woo' ); ?> </option>
    290                                 <option value="gold-two" ><?php esc_html_e('Gold Lines', 'raffle-play-woo' ); ?> </option>
    291                                 <option value="gray" ><?php esc_html_e('Gray', 'raffle-play-woo' ); ?> </option>
    292                                 <option value="orange"  ><?php esc_html_e('Orange', 'raffle-play-woo' ); ?> </option>
    293                                 <option value="purple" ><?php esc_html_e('Purple', 'raffle-play-woo' ); ?> </option>
    294                                 <option value="red"  ><?php esc_html_e('Red', 'raffle-play-woo' ); ?> </option>
    295                                 <option value="custom"  ><?php esc_html_e('Custom', 'raffle-play-woo' ); ?> </option>                                               
    296                             </select>
    297                             <img id='ticket_img_show' data-src="<?php echo esc_url( RAFFLE_PLAY_WOO_URL . '/' );?>"
    298                                 src="" style='width: 80px;' alt="">
    299 
    300                             <div class='row bmp-set-row' style='margin-top: 12px' >
     338                            data-off="<?php esc_html_e('No', 'raffle-play-woo');?>"
     339                            data-size='small' id='two_raffle_inherit'
     340                            />                           
     341                        </div>
     342                    </div>
     343
     344                    <div class='bmp-set-row'>
     345                        <div class='row'  >
     346                            <div class="col-sm-5 " >
     347                                <b>  <?php esc_html_e('Show Tickets Number with Raffle image in background (Thank you Page / Email )', 'raffle-play-woo' );?>  </b>
     348                                <span data-toggle='tooltip' data-container="#modalSaveEdit"
     349                                    title="<?php esc_html_e('Raffle image will be placed in the background of the ticket number. Custom images can be used, or customized in the template', 'raffle-play-woo' ); ?>" >
     350                                    <i class="fa fa-info-circle text-info"></i>
     351
     352                                </span>
     353                            </div>
     354                                                               
     355                            <div class="col-sm-7" >                               
     356                                <input type="checkbox" id="show_ticket_image" data-toggle='toggle' data-on="<?php esc_html_e('Yes', 'raffle-play-woo');?>"
     357                                data-off="<?php esc_html_e('No', 'raffle-play-woo');?>" data-size='small'/>
     358                            </div>
     359
     360                        </div>
     361
     362                        <div class='row' >
     363                            <div class="col-sm-5 " style='display: inline-block'>   
     364                            </div>                                   
    301365                           
    302                                 <div class="col-sm-12 div-custom-ticket-img" style='display: none' > 
    303                                     <button class='button button-primary' id='load_ticket_img' style='display: inline; height: 34px;' >
    304                                     <?php esc_html_e('Library', 'raffle-play-woo' ); ?></button>                             
    305                                     <div style='display: inline;'>
    306                                         <input type="text" id="ticket_image_url"  style='width:80%' style='display: inline;'
    307                                         placeholder="https://yourdomain.com/images/raffle-ticket-image.png"
    308                                         value="" />
     366                            <div class="col-sm-7" style='display: inline-block;'> 
     367                                <p class='h6'><?php  esc_html_e('Select image for background ticket. (Select custom to add your own)', 'raffle-play-woo' );?> </p>
     368                                <select name="select_ticket_image" id="select_ticket_image">
     369                                    <option value="blue" ><?php esc_html_e('Blue', 'raffle-play-woo' ); ?> </option>
     370                                    <option value="gold-one"  ><?php esc_html_e('Gold', 'raffle-play-woo' ); ?> </option>
     371                                    <option value="gold-two" ><?php esc_html_e('Gold Lines', 'raffle-play-woo' ); ?> </option>
     372                                    <option value="gray" ><?php esc_html_e('Gray', 'raffle-play-woo' ); ?> </option>
     373                                    <option value="orange"  ><?php esc_html_e('Orange', 'raffle-play-woo' ); ?> </option>
     374                                    <option value="purple" ><?php esc_html_e('Purple', 'raffle-play-woo' ); ?> </option>
     375                                    <option value="red"  ><?php esc_html_e('Red', 'raffle-play-woo' ); ?> </option>
     376                                    <option value="custom"  ><?php esc_html_e('Custom', 'raffle-play-woo' ); ?> </option>                                               
     377                                </select>
     378                                <img id='ticket_img_show' data-src="<?php echo RAFFLE_PLAY_WOO_URL . '/';?>" src="" style='width: 80px;' alt="">
     379
     380                                <div class='row' style='margin-top: 12px' >
     381                               
     382                                    <div class="col-sm-12 div-custom-ticket-img" style='display: none' > 
     383                                        <button class='button button-primary' id='load_ticket_img' style='display: inline; height: 34px;' >
     384                                        <?php esc_html_e('Library', 'raffle-play-woo' ); ?></button>                             
     385                                        <div style='display: inline;'>
     386                                            <input type="text" id="ticket_image_url"  style='width:80%' style='display: inline;'
     387                                            placeholder="https://yourdomain.com/images/raffle-ticket-image.png"
     388                                            value="<?php //echo esc_url_raw( $settings['ticket_image_raffles']['0']->ticket_image_url ); ?>" />
     389                                        </div>
    309390                                    </div>
    310391                                </div>
    311                             </div>
    312 
    313                         </div>
    314                     </div>
    315 
     392
     393                            </div>
     394                        </div>
     395                    </div>
    316396
    317397                    <div class='row bmp-set-row' >
     
    343423                    </div>
    344424
     425                    <div class='row bmp-set-row' >
     426                        <div class="col-sm-5 " style='display: inline-block'>
     427                            <b>
     428                                <?php esc_html_e('Show Countdown on Card Product', 'raffle-play-woo' );?>
     429                            </b>
     430
     431                            <span data-toggle='tooltip' data-container="#modalSaveEdit"
     432                                title='<?php esc_html_e('Show Countdown if Raffle has start date or end date set for the products linked to this raffle', 'raffle-play-woo' ); ?>'>
     433                                <i class="fa fa-info-circle text-info"></i>
     434                            </span>
     435                        </div>
     436                       
     437                        <div class="col-sm-7" >                               
     438                            <input type="checkbox"  data-toggle="toggle" data-size='small'                               
     439                                    id='rdp_show_countdown_card'
     440                                    data-on="<?php esc_html_e('Yes', 'raffle-play-woo');?>" 
     441                                    data-off="<?php esc_html_e('No', 'raffle-play-woo');?>" /> 
     442                                   
     443                            <span>
     444                                <img width='120' style='max-width: 120px'
     445                                    src="<?php echo esc_url_raw( RAFFLE_PLAY_WOO_URL .'/images/countdown-card-image.png');?>"
     446                                    alt="<?php esc_html_e('Countdown Image', 'raffle-play-woo');?>" />
     447                            </span>
     448                        </div>
     449                    </div>
     450
     451
     452                    <div class='row bmp-set-row' >
     453                        <div class="col-sm-5 " style='display: inline-block'>
     454                            <b>
     455                                <?php esc_html_e('Show Progress Bar on Product Page', 'raffle-play-woo' );?>
     456                            </b>
     457
     458                            <span data-toggle='tooltip' data-container="#modalSaveEdit"
     459                                title='<?php esc_html_e('Show Progress Bar in the product page. Position is set in the Main Settings', 'raffle-play-woo' ); ?>'>
     460                                <i class="fa fa-info-circle text-info"></i>
     461                            </span>
     462                        </div>
     463                       
     464                        <div class="col-sm-7" >                               
     465                            <input type="checkbox"  data-toggle="toggle" data-size='small'                               
     466                                    id='rdp_show_pb'
     467                                    data-on="<?php esc_html_e('Yes', 'raffle-play-woo');?>" 
     468                                    data-off="<?php esc_html_e('No', 'raffle-play-woo');?>" /> 
     469                                   
     470                            <span>
     471                                <img width='200' style='max-width: 200px'
     472                                    src="<?php echo esc_url_raw( RAFFLE_PLAY_WOO_URL .'/images/progress-bar-image.png');?>"
     473                                    alt="<?php esc_html_e('Progress Bar Image', 'raffle-play-woo');?>" />
     474                            </span>
     475                        </div>
     476                    </div>
     477
     478                    <div class='row bmp-set-row' >
     479                        <div class="col-sm-5 " style='display: inline-block'>
     480                            <b>
     481                                <?php esc_html_e('Show Progress Bar on Card Product', 'raffle-play-woo' );?>
     482                            </b>
     483
     484                            <span data-toggle='tooltip' data-container="#modalSaveEdit"
     485                                title='<?php esc_html_e('Show Progress Bar on Loop Card (eg: shop page). Position is set in the Main Settings', 'raffle-play-woo' ); ?>'>
     486                                <i class="fa fa-info-circle text-info"></i>
     487                            </span>
     488                        </div>
     489                       
     490                        <div class="col-sm-7" >                               
     491                            <input type="checkbox"  data-toggle="toggle" data-size='small'                               
     492                                    id='rdp_show_pb_card'
     493                                    data-on="<?php esc_html_e('Yes', 'raffle-play-woo');?>" 
     494                                    data-off="<?php esc_html_e('No', 'raffle-play-woo');?>" /> 
     495                                   
     496                            <span>
     497                                <img width='120' style='max-width: 120px'
     498                                    src="<?php echo esc_url_raw( RAFFLE_PLAY_WOO_URL .'/images/progress-bar-card-image.png');?>"
     499                                    alt="<?php esc_html_e('Progress Bar Image', 'raffle-play-woo');?>" />
     500                            </span>
     501                        </div>
     502                    </div>
     503
     504                    <div class='row bmp-set-row' >
     505                        <div class="col-sm-5 " style='display: inline-block'>
     506                            <b>
     507                                <?php esc_html_e('Enable Restrict One Order for this Raffle', 'raffle-play-woo' );?>
     508                            </b>
     509                        </div>
     510                       
     511                        <div class="col-sm-7" >                               
     512                            <input type="checkbox"  data-toggle="toggle" data-size='small'                               
     513                                    id='restrict_order_raffle'
     514                                    data-on="<?php esc_html_e('Yes', 'raffle-play-woo');?>" 
     515                                    data-off="<?php esc_html_e('No', 'raffle-play-woo');?>" /> 
     516                                   
     517
     518                        </div>
     519                    </div>
     520
     521
    345522                </div>
    346523
    347524                <div class="modal-footer">
     525                    <span>
     526                        <?php RafflePlayWoo_Includes::rpwoo_premium_image(); ?> 
     527                            <?php esc_html_e('Only Available in Premium Version', 'raffle-play-woo'); ?>
     528                        <?php RafflePlayWoo_Includes::rpwoo_premium_image(); ?>
     529                    </span>
    348530                    <input type="hidden" name="" value='-1' id='modal_action'>
    349531                    <?php wp_nonce_field( 'nonce_field_form_rpr', 'nonce_field_form_rpr' ); ?>
     
    357539           
    358540            </div><!-- /.modal-dialog -->
    359         </div><!-- /.modal -->       
     541        </div><!-- /.modal -->         
    360542
    361543
  • raffle-play-woo/trunk/includes/w/W_RafflePlayWoo_Winners.php

    r2974911 r3335928  
    9696                    <input type="hidden" name="" value='-1' id='modal_action'>
    9797                    <?php wp_nonce_field( 'nonce_field_form_rpr', 'nonce_field_form_rpr' ); ?>
     98                    <span>
     99                        <?php RafflePlayWoo_Includes::rpwoo_premium_image(); ?> 
     100                            <?php esc_html_e('Only Available in Premium Version', 'raffle-play-woo'); ?>
     101                        <?php RafflePlayWoo_Includes::rpwoo_premium_image(); ?>
     102                    </span>
    98103                    <button type="button" class="button button-default" data-dismiss="modal" > <?php esc_html_e('Cancel', 'raffle-play-woo');?> </button>
    99104                    <button type="button" class="button button-primary" id="btnSave"><?php esc_html_e('Save', 'raffle-play-woo');?> </button>                                                 
  • raffle-play-woo/trunk/js/drp_raffles.js

    r2536050 r3335928  
    77    $(document).ready(function(){
    88       
    9         Init();
    10 
    11         ShowTable();   
     9        Init();
    1210
    1311    });
     
    5149        });
    5250
    53         $('#datepicker_from, #datepicker_to').datepicker({
    54             yearRange : '2016:' + ( (new Date()).getFullYear() + 4),
    55             dateFormat : 'dd-mm-yy',
    56             changeMonth: true,
    57             changeYear: true
    58         });
    59     }
    60 
    61     function getRaffleInfo( raffle_id ){
    62 
    63         let wrapper = '<div class="min-width-120">';
    64         let raffle_item = null;
    65         for( let i = 0; i<rpwoo_data.length; i++ ){
    66             let item = rpwoo_data[i];
    67             if( item.id == raffle_id ){
    68                 raffle_item = item;
    69                 break;
    70             }
    71         }
    72 
    73         if( raffle_item !== null ){
    74          
    75             wrapper += '<p class="center-text"><b> ' + raffle_item.name  + '</b></p>';
    76             wrapper += '<p> <span class="left-text" > ' + rpwoo_local_lng.last_ticket + '<span> - ' + ( ( raffle_item.extra_info.last_sold == '') ? 'N/A' : raffle_item.extra_info.last_sold ) + '</p>';
    77             wrapper += '<p> <span class="left-text" > ' + rpwoo_local_lng.sold_tickets + '<span> - ' + ( raffle_item.extra_info.sold_no)  + '</p>';
    78         }
    79         wrapper += '</div>';
    80 
    81 
    82         return wrapper;
    83     }
    84 
    85     function ShowTable(){
    86 
    87         $('#raffle_product_table').bootstrapTable('destroy').bootstrapTable({
    88             columns: [
    89                 {
    90                     title : rpwoo_local_lng.id,
    91                     field : 'id',
    92                     align : 'center',                 
    93                     visible : false
    94                 },
    95                 {
    96                     title : rpwoo_local_lng.raffle_name,
    97                     field : 'name',
    98                     sortable : true,
    99                     formatter : function ( value, row ){
    100                         //
    101                         let valid_dates = isValidDates( row.start_datetime, row.end_datetime, row.now_time );
    102 
    103                         if( ! row.is_live )
    104                             value = "<i class='fa fa-tools'></i> " + value;
    105                        
    106 
    107                         if( row.is_terminated || ( ! valid_dates ) )
    108                             return "<div class='ended-raffle'></div> " +  value;
    109                         else
    110                             return "<div class='live-raffle'></div> " +  value;
    111                     }
    112                 },
    113                 {
    114                     title : rpwoo_local_lng.start_ticket,
    115                     field : 'start_ticket',
    116                     sortable : true
    117                 },           
    118 
    119                 {
    120                     title : rpwoo_local_lng.live,
    121                     field : 'is_live',
    122                     sortable : true,
    123                     formatter : function(value, row ){                   
    124                         if( value )
    125                             return rpwoo_local_lng.yes
    126                         else
    127                             return rpwoo_local_lng.test
    128                     }
    129                 },
    130                 {
    131                     title : rpwoo_local_lng.terminated,
    132                     field : 'is_terminated',
    133                     sortable : true,
    134                     formatter : function(value, row ){                   
    135                         if( value )
    136                             return rpwoo_local_lng.yes
    137                         else
    138                             return rpwoo_local_lng.no
    139                     }
    140                 }, 
    141                 {
    142                     title : rpwoo_local_lng.prefix,
    143                     field : 'prefix'
    144                 },
    145 
    146                 {
    147                     title : rpwoo_local_lng.limited,
    148                     field : 'is_limit',
    149                     sortable : true,
    150 
    151                     formatter : function(value, row ){   
    152  
    153                         let limit_no_txt = '';
    154                         if( row.limit_no != 0 ){
    155                             limit_no_txt = ' - ' + row.limit_no;
    156                         }
    157                         if( value )
    158                             return rpwoo_local_lng.yes + limit_no_txt;
    159                         else
    160                             return rpwoo_local_lng.no + limit_no_txt;
    161                     }
    162                 },
    163                 {
    164                     title : rpwoo_local_lng.limit_no,
    165                     field : 'limit_no',
    166                     sortable : true,
    167                     visible : false
    168                 },
    169                 {
    170                     title : rpwoo_local_lng.start_date,
    171                     field : 'start_date_str',
    172                     formatter : function( value, row ){
    173                         return value + ' ' + row.start_timestr;
    174                     }
    175                 },
    176                 {
    177                     title : rpwoo_local_lng.end_date,
    178                     field : 'end_date_str',
    179                     formatter : function( value, row ){                       
    180                         return value + ' ' + row.end_timestr;
    181                     }
    182                 },
    183                 {
    184                     title : rpwoo_local_lng.products,
    185                     field : 'products',
    186                     formatter : function( value, row ){
    187                         let products = [];
    188              
    189                         for( const prod in value ){
    190                             products.push( value[ prod.toString() ] );   
    191                         }
    192                         return products.join(', ');
    193                     }
    194                 },
    195                 {
    196                     title : rpwoo_local_lng.shortcode + ' ' + shortcodeInfo(),
    197                     field : 'shortcode'
    198                 },
    199                 {
    200                     title : rpwoo_local_lng.info,
    201                     field : 'id',
    202                     align : 'center',                   
    203                     formatter : function( value, row ){                                       
    204                         let info = getRaffleInfo( value );                                         
    205                         return "<i data-toggle='tooltip' data-placement='right' title='"+ info.toString() +
    206                                 "' class='fas fa-info-circle text-info' style='cursor: pointer;''></i>";
    207                     }
    208                 },
    209 
    210             ],
    211             data : rpwoo_data,
    212             onPostBody : function(){               
    213                 $('[data-toggle="tooltip"]').tooltip({
    214                     trigger : 'hover',
    215                     placement : 'auto',
    216                     html : true
    217                 });   
    218                
    219                 $('#raffle_product_table tbody tr').on('click', function(){
    220                     $('#raffle_product_table tbody tr').removeClass('active-row');
    221                     $( this ).addClass('active-row');
    222                     selected_row = parseInt( $( this ).attr('data-index') ) + 1;
    223                    
    224                 });
    225                
    226                 if( rpwoo_data.length > 0 ){
    227                     if( selected_row == -1 &&  $('#raffle_product_table tbody tr').length > 0 )
    228                         $('#raffle_product_table tbody tr:first').click();
    229 
    230                     if( selected_row != -1 ){
    231                         $('#raffle_product_table tbody tr:nth-child(' + selected_row +')').click(); 
    232                     }
    233                 }
    234             }
    235 
    236         });
    237 
    238         return false;
    239     }
    240 
    241     function shortcodeInfo(){
    242         let info = rpwoo_local_lng.shortcode_info + "<p>[raffle name=\"msg\" id=\"99\" show_raffle_name=\"1\"]</p>" ;
    243         return "<i data-toggle='tooltip' data-placement='right' title='"+ info.toString() +
    244         "' class='fas fa-info-circle text-info' style='cursor: pointer;''></i>";
    24551    }
    24652
    24753
    248 
    24954})(this.jQuery);
  • raffle-play-woo/trunk/raffle-play-woo.php

    r3277218 r3335928  
    33* Plugin Name: Raffle Play Woo
    44* Plugin URI: https://tuskcode.com
    5 * Version: 2.4.5
     5* Version: 2.4.6
    66* Author: dan009
    77* Description: Raffle Play Woo is the next raffle plugin for your website. It offers a complete workflow of managing raffle tickets from the admin view to the user experience.
     
    1313    die('No Access to this page');
    1414
    15 if( ! defined('RAFFLE_PLAY_WOO_VERSION')) define('RAFFLE_PLAY_WOO_VERSION', '2.4.5');
     15if( ! defined('RAFFLE_PLAY_WOO_VERSION')) define('RAFFLE_PLAY_WOO_VERSION', '2.4.6');
    1616if( ! defined('RAFFLE_PLAY_WOO_WP_TESTED')) define('RAFFLE_PLAY_WOO_WP_TESTED', '6.8');
    1717if( ! defined('RAFFLE_PLAY_WOO_URL')) define( 'RAFFLE_PLAY_WOO_URL', esc_url( plugins_url( '', __FILE__ ) ) );
  • raffle-play-woo/trunk/readme.txt

    r3277218 r3335928  
    55Requires at least: 5.0.1
    66Tested up to: 6.8
    7 Stable tag: 2.4.5
     7Stable tag: 2.4.6
    88Requires PHP: 5.2.4
    99License: GPLv2 or later
     
    3535
    3636== Changelog ==
     37
     38= 2025-07-29
     39* Added premium tab "Restrict Order per Customer per Raffle"
     40* Fixed datetime picker error in Raffle page
     41* Tested with latest version of Wordpress & Woocommerce
    3742
    3843= 2025-04-19
Note: See TracChangeset for help on using the changeset viewer.