Plugin Directory

Changeset 3305817


Ignore:
Timestamp:
06/03/2025 01:37:33 PM (10 months ago)
Author:
arture
Message:

Version 2.1.5

Location:
order-picking-app/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • order-picking-app/trunk/admin/class-orderpickingapp-admin.php

    r3305014 r3305817  
    6868            <script type="text/javascript">
    6969                jQuery(document).ready(function($) {
    70                     $('#DownloadPicklist').click(function(e) {
     70                    $('.DownloadPicklist').click(function(e) {
    7171                        e.preventDefault();
    7272
    7373                        var ajaxUrl = '<?php echo admin_url("admin-ajax.php"); ?>';
    74                         $('#DownloadPicklist').html("Creating PDF...");
     74                        var buttonText = $(this).html();
     75
     76                        console.log(buttonText);
     77
     78                        $(this).html("In progress...");
    7579
    7680                        $.ajax({
     
    7983                            data: {
    8084                                action: 'download_picklist',
    81                                 status: 'all',
    82                                 type: 'pdf',
    83                                 security: '<?php echo wp_create_nonce("order_picking_nonce"); ?>'
    84                             },
    85                             success: function(response) {
    86                                 window.open(response.link, '_blank');
    87                             },
    88                         });
    89                     });
    90                     $('.DownloadSummary').click(function(e) {
    91                         e.preventDefault();
    92 
    93                         var ajaxUrl = '<?php echo admin_url("admin-ajax.php"); ?>';
    94                         $(this).html("Creating file...");
    95 
    96                         $.ajax({
    97                             type: 'POST',
    98                             url: ajaxUrl,
    99                             data: {
    100                                 action: 'download_picklist',
    101                                 status: 'summary',
     85                                status: $(this).attr('order_status'),
    10286                                type: $(this).attr('file_type'),
    10387                                security: '<?php echo wp_create_nonce("order_picking_nonce"); ?>'
    10488                            },
    10589                            success: function(response) {
     90                                $(this).html(buttonText);
     91                                console.log($(this));
    10692                                window.open(response.link, '_blank');
    10793                            },
     
    151137                </div>
    152138            </div>
    153             <button id="DownloadPicklist" class="button button-primary">PDF picklist</button>
    154             <button file_type="pdf" class="DownloadSummary button button-primary">PDF summary</button>
    155             <button file_type="csv" class="DownloadSummary button button-primary">CSV summary</button>
     139            <button file_type="pdf" order_status="all" class="DownloadPicklist button button-primary">PDF picklist</button>
     140            <button file_type="pdf" order_status="backorders" class="DownloadPicklist button button-primary">PDF backorders</button>
     141            <button file_type="pdf" order_status="summary"  class="DownloadPicklist button button-primary">PDF summary</button>
     142            <button file_type="csv" order_status="summary"  class="DownloadPicklist button button-primary">CSV summary</button>
    156143        <?php endif;
    157144    }
  • order-picking-app/trunk/includes/class-orderpickingapp.php

    r3303480 r3305817  
    22562256                            }
    22572257
    2258                             if( isset($status) && $status == 'backorders' && $picking_status != 'backorders' ){
    2259                                 continue;
     2258                            if( isset($status) && $status == 'backorders' ){
     2259
     2260                                if( $picking_status == 'packing' || $picking_status == 'backorders' ){
     2261
     2262                                    $contains_backorder_products = false;
     2263                                    foreach ($open_order->get_items() as $item_id => $item) {
     2264                                        $backorder = $item->get_meta('backorder');
     2265                                        if ($backorder !== '0' && !empty($backorder)) {
     2266                                            $contains_backorder_products = true;
     2267                                            break;
     2268                                        }
     2269                                    }
     2270
     2271                                    if( !$contains_backorder_products ){
     2272                                        continue;
     2273                                    }
     2274                                }
     2275                                else{
     2276                                    continue;
     2277                                }
    22602278                            }
    22612279                            elseif( $picking_status == 'picking' || $status == 'all' || $status == 'summary' ){
  • order-picking-app/trunk/orderpickingapp.php

    r3305014 r3305817  
    33 * Plugin Name:       Order Picking App
    44 * Description:       Make your life easier by using the Orderpicking App. You'll never be inefficient if the Orderpicking App is installed in your store. We assist you in all aspects of your webshop. From intelligent selecting to order packing, we have you covered. Connecting the Orderpicking App to your Woocommerce webshop is simple and quick. Within an hour, you'll be online with the Orderpicking App. You're able to pick and pack your orders three times faster and with greater accuracy.
    5  * Version:           2.1.4
     5 * Version:           2.1.5
    66 * Author:            Arture | PHP Professionals
    77 * Author URI:        http://arture.nl
  • order-picking-app/trunk/readme.txt

    r3305014 r3305817  
    55Requires at least: 6.0
    66Tested up to: 6.8.1
    7 Stable tag: 2.1.4
     7Stable tag: 2.1.5
    88Requires PHP: 8.0
    99License: GPLv2 or later
     
    3737== Changelog ==
    3838
     39= 2.1.5 =
     40* Dashboard widget with backorder PDF export
     41
    3942= 2.1.4 =
    4043* Dashboard widget with picking summary CSV export
Note: See TracChangeset for help on using the changeset viewer.