Plugin Directory

Changeset 3218710


Ignore:
Timestamp:
01/08/2025 06:49:02 AM (15 months ago)
Author:
arture
Message:

Version 1.7.7

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

Legend:

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

    r3199335 r3218710  
    457457                echo '</br>';
    458458                echo 'BATCH: ' . $batch_id;
     459            }
     460
     461            $ordernote = get_post_meta($order_id, 'ordernote', true);
     462            if (isset($ordernote) && !empty($ordernote)) {
     463                echo '</br>';
     464                echo 'Note: ' . $ordernote;
    459465            }
    460466        }
  • order-picking-app/trunk/admin/partials/orderpickingapp-settings-page.php

    r3206778 r3218710  
    233233                        <?php endforeach; ?>
    234234                        <br/>
    235                         <div class="form-check">
    236                             <strong  style="font-size: 12px; margin-top:10px;"><?php echo __( 'Order assigning', 'orderpickingapp' ); ?></strong>
    237                             <br/>
     235                        <h5><?php echo __( 'Order handling', 'orderpickingapp' ); ?></h5>
     236                        <div class="form-check">
    238237                            <input type="checkbox" class="form-check-input" name="manual_order_assigning" value="yes" <?php echo (isset($app_settings['manual_order_assigning']) && $app_settings['manual_order_assigning'] == 'yes')? 'checked' : ''; ?>>
    239238                            <label  class="form-check-label" for="manual_order_assigning"><?php echo __( 'Enable manual order assigning to pickers', 'orderpickingapp' ); ?></label>
    240239                        </div>
    241240                        <div class="form-check">
    242                             <strong  style="font-size: 12px; margin-top:10px;"><?php echo __( 'Order handling', 'orderpickingapp' ); ?></strong>
    243                             <br/>
    244241                            <input type="checkbox" class="form-check-input" name="auto_completed_order" value="yes" <?php echo (isset($app_settings['auto_completed_order']) && $app_settings['auto_completed_order'] == 'yes')? 'checked' : ''; ?>>
    245242                            <label  class="form-check-label" for="auto_completed_order"><?php echo __( 'Enable auto completed order after picking and packing', 'orderpickingapp' ); ?></label>
    246243                        </div>
    247244                        <div class="form-check">
    248                             <strong  style="font-size: 12px; margin-top:10px;"><?php echo __( 'Product combining', 'orderpickingapp' ); ?></strong>
    249                             <br/>
     245                            <input type="checkbox" class="form-check-input" name="skip_packing" value="yes" <?php echo (isset($app_settings['skip_packing']) && $app_settings['skip_packing'] == 'yes')? 'checked' : ''; ?>>
     246                            <label  class="form-check-label" for="skip_packing"><?php echo __( 'Skip packing and change fully picked order after picking to completed', 'orderpickingapp' ); ?></label>
     247                        </div>
     248                        <div class="form-check">
    250249                            <input type="checkbox" class="form-check-input" name="disable_product_combining" value="yes" <?php echo (isset($app_settings['disable_product_combining']) && $app_settings['disable_product_combining'] == 'yes')? 'checked' : ''; ?>>
    251250                            <label  class="form-check-label" for="disable_product_combining"><?php echo __( 'Disable product combining by SKU/ID and process each order product as individual', 'orderpickingapp' ); ?></label>
    252251                        </div>
     252
     253                        <br/>
     254
    253255                        <div class="form-group">
    254256                            <strong  style="font-size: 12px; margin-top:10px;">Order prefix</strong>
  • order-picking-app/trunk/includes/class-feedback.php

    r3160659 r3218710  
    11<?php
    2 class OPA_Uninstall_Feedback
    3 {
    4 
    5     public function __construct()
    6     {
     2class OPA_Uninstall_Feedback {
     3
     4    public function __construct() {
    75        add_action('admin_footer', array($this, 'deactivate_scripts'));
    86        add_action('wp_ajax_opa_submit_uninstall_reason', array($this, "send_uninstall_reason"));
    97    }
    108
    11     public function deactivate_scripts()
    12     {
     9    public function deactivate_scripts() {
    1310
    1411        global $pagenow;
     
    2623                    <ul class="reasons">
    2724                        <?php foreach ($reasons as $reason) { ?>
    28                             <li data-type="<?php echo esc_attr($reason['type']); ?>"
    29                                 data-placeholder="<?php echo esc_attr($reason['placeholder']); ?>">
    30                                 <label><input type="radio" name="selected-reason"
    31                                               value="<?php echo $reason['id']; ?>"> <?php echo $reason['text']; ?>
    32                                 </label>
     25                            <li data-type="<?php echo esc_attr($reason['type']); ?>" data-placeholder="<?php echo esc_attr($reason['placeholder']); ?>">
     26                                <label><input type="radio" name="selected-reason" value="<?php echo $reason['id']; ?>"> <?php echo $reason['text']; ?></label>
    3327                            </li>
    3428                        <?php } ?>
     
    5347                bottom: 0;
    5448                left: 0;
    55                 background: rgba(0, 0, 0, 0.5);
     49                background: rgba(0,0,0,0.5);
    5650                display: none;
    5751            }
    58 
    59             .opa-modal.modal-active {
    60                 display: block;
    61             }
    62 
     52            .opa-modal.modal-active {display: block;}
    6353            .opa-modal-wrap {
    6454                width: 50%;
     
    6757                background: #fff;
    6858            }
    69 
    7059            .opa-modal-header {
    7160                border-bottom: 1px solid #eee;
    7261                padding: 8px 20px;
    7362            }
    74 
    7563            .opa-modal-header h3 {
    7664                line-height: 150%;
    7765                margin: 0;
    7866            }
    79 
    80             .opa-modal-body {
    81                 padding: 5px 20px 20px 20px;
    82             }
    83 
    84             .opa-modal-body .input-text, .opa-modal-body textarea {
    85                 width: 75%;
    86             }
    87 
     67            .opa-modal-body {padding: 5px 20px 20px 20px;}
     68            .opa-modal-body .input-text,.opa-modal-body textarea {width:75%;}
    8869            .opa-modal-body .reason-input {
    8970                margin-top: 5px;
    9071                margin-left: 20px;
    9172            }
    92 
    9373            .opa-modal-footer {
    9474                border-top: 1px solid #eee;
     
    9676                text-align: right;
    9777            }
    98 
    99             .reviewlink, .supportlink {
    100                 padding: 10px 0px 0px 35px !important;
     78            .reviewlink, .supportlink{
     79                padding:10px 0px 0px 35px !important;
    10180                font-size: 14px;
    10281            }
    103 
    104             .review-and-deactivate {
    105                 padding: 5px;
    106             }
    107 
     82            .review-and-deactivate{
     83                padding:5px;
     84            }
    10885            .wt-uninstall-feedback-privacy-policy {
    10986                text-align: left;
     
    158135                        var reasonInputHtml = '';
    159136                        if ('reviewhtml' === inputType) {
    160                             if ($('.reviewlink').length == 0) {
     137                            if($('.reviewlink').length == 0){
    161138                                reasonInputHtml = '<div class="reviewlink"><a href="#" target="_blank" class="review-and-deactivate"><?php _e('Deactivate and leave a review', 'orderpickingapp'); ?> <span class="xa-opa-rating-link"> &#9733;&#9733;&#9733;&#9733;&#9733; </span></a></div>';
    162139                            }
    163                         } else if ('supportlink' === inputType) {
    164                             if ($('.supportlink').length == 0) {
     140                        }else if('supportlink' === inputType){
     141                            if($('.supportlink').length == 0){
    165142                                reasonInputHtml = '<div class="supportlink"><?php _e('Please go through the', 'orderpickingapp'); ?><a href="#" target="_blank" class="doc-and-support-doc"> <?php _e('documentation', 'orderpickingapp'); ?></a> <?php _e('or contact us via', 'orderpickingapp'); ?><a href="#" target="_blank" class="doc-and-support-forum"> <?php _e('support', 'orderpickingapp'); ?></a></div>';
    166143                            }
    167                         } else {
    168                             if ($('.reviewlink').length) {
    169                                 $('.reviewlink').remove();
    170                             }
    171                             if ($('.supportlink').length) {
    172                                 $('.supportlink').remove();
     144                        }else {
     145                            if($('.reviewlink').length){
     146                                $('.reviewlink'). remove();
     147                            }
     148                            if($('.supportlink').length){
     149                                $('.supportlink'). remove();
    173150                            }
    174151                            reasonInputHtml = '<div class="reason-input">' + (('text' === inputType) ? '<input type="text" class="input-text" size="40" />' : '<textarea rows="5" cols="45"></textarea>') + '</div>';
     
    213190    }
    214191
    215     public function send_uninstall_reason()
    216     {
     192    public function send_uninstall_reason() {
    217193
    218194        if (!isset($_POST['reason_id'])) {
     
    222198        $body = '<table>';
    223199        $body .= '<tr>';
    224         $body .= '<td>Site:</td><td>' . home_url() . '</td>';
    225         $body .= '<td>Reden:</td><td>' . $_POST['reason_id'] . '</td>';
    226         $body .= '<td>Aanvullende informatie:</td><td>' . $_POST['reason_info'] . '</td>';
     200        $body .= '<td>Site:</td><td>'.home_url().'</td>';
     201        $body .= '<td>Reden:</td><td>'.$_POST['reason_id'].'</td>';
     202        $body .= '<td>Aanvullende informatie:</td><td>'.$_POST['reason_info'].'</td>';
    227203        $body .= '</tr>';
    228204        $body .= '</table>';
     
    231207        $subject = 'Woocommerce deactivatie feedback';
    232208        $headers = array('Content-Type: text/html; charset=UTF-8');
    233         wp_mail($to, $subject, $body, $headers);
    234     }
    235 
    236     private function get_uninstall_reasons()
    237     {
     209        wp_mail( $to, $subject, $body, $headers );
     210    }
     211
     212    private function get_uninstall_reasons() {
    238213
    239214        $reasons = array(
  • order-picking-app/trunk/includes/class-orderpickingapp-loader.php

    r3160659 r3218710  
    11<?php
    2 class OrderPickingApp_Loader
    3 {
    42
    5     protected $actions;
     3class OrderPickingApp_Loader {
    64
    7     protected $filters;
     5    protected $actions;
    86
    9     public function __construct()
    10     {
     7    protected $filters;
    118
    12         $this->actions = array();
    13         $this->filters = array();
     9    public function __construct() {
    1410
    15     }
     11        $this->actions = array();
     12        $this->filters = array();
     13       
     14    }
    1615
    17     public function add_action($hook, $component, $callback)
    18     {
    19         $this->actions = $this->add($this->actions, $hook, $component, $callback);
    20     }
     16    public function add_action( $hook, $component, $callback ) {
     17        $this->actions = $this->add( $this->actions, $hook, $component, $callback );
     18    }
    2119
    22     public function add_filter($hook, $component, $callback)
    23     {
    24         $this->filters = $this->add($this->filters, $hook, $component, $callback);
    25     }
     20    public function add_filter( $hook, $component, $callback ) {
     21        $this->filters = $this->add( $this->filters, $hook, $component, $callback );
     22    }
    2623
    27     private function add($hooks, $hook, $component, $callback)
    28     {
     24    private function add( $hooks, $hook, $component, $callback ) {
    2925
    30         $hooks[] = array(
    31             'hook' => $hook,
    32             'component' => $component,
    33             'callback' => $callback
    34         );
     26        $hooks[] = array(
     27            'hook'      => $hook,
     28            'component' => $component,
     29            'callback' => $callback
     30        );
    3531
    36         return $hooks;
     32        return $hooks;
     33       
     34    }
    3735
    38     }
     36    public function run() {
    3937
    40     public function run()
    41     {
     38         foreach ( $this->filters as $hook ) {
     39             add_filter( $hook['hook'], array( $hook['component'], $hook['callback'] ) );
     40         }
     41         
     42         foreach ( $this->actions as $hook ) {
     43             add_action( $hook['hook'], array( $hook['component'], $hook['callback'] ) );
     44         }
    4245
    43         foreach ($this->filters as $hook) {
    44             add_filter($hook['hook'], array($hook['component'], $hook['callback']));
    45         }
    46 
    47         foreach ($this->actions as $hook) {
    48             add_action($hook['hook'], array($hook['component'], $hook['callback']));
    49         }
    50 
    51     }
     46    }
    5247
    5348}
  • order-picking-app/trunk/includes/class-orderpickingapp.php

    r3209148 r3218710  
    5454                $wp_query_args['meta_query'] = array_merge($meta_query, $query_vars['meta_query']);
    5555            }
    56 
     56            return $wp_query_args;
     57        }, 10, 2);
     58
     59        add_filter('woocommerce_order_data_store_cpt_get_orders_query', function ($wp_query_args, $query_vars) {
     60            if (isset($query_vars['meta_query'])) {
     61                $meta_query = isset($wp_query_args['meta_query']) ? $wp_query_args['meta_query'] : [];
     62                $wp_query_args['meta_query'] = array_merge($meta_query, $query_vars['meta_query']);
     63            }
    5764            return $wp_query_args;
    5865        }, 10, 2);
     
    274281                    $pickingDate = get_option('pickingDate');
    275282                    if (isset($pickingDate) && !empty($pickingDate)) {
    276                         $args['date_query'] = array(
    277                             array(
    278                                 'after' => $pickingDate,
    279                             ),
    280                         );
     283                        $datetime = DateTime::createFromFormat('Y-m-d', $pickingDate);
     284                        if ($datetime) {
     285                            $args['date_query'] = array(
     286                                array(
     287                                    'after' => $pickingDate,
     288                                ),
     289                            );
     290                        }
    281291                    }
    282292
     
    399409                                    $Order->add_order_note('Order Picking App | Order picking completed by ' . $data['appuser'] . '. Order now available for packing.');
    400410                                    $Order->update_meta_data('picking_status', $data['status']);
     411                                    $Order->update_meta_data('ordernote', $data['ordernote']);
    401412                                    $this->log('Order picking completed for order:  ' . $order['orderid'] . ' by ' . $data['appuser'], 'Info');
    402413                                    $Order->save();
     
    488499                    $pickingDate = get_option('pickingDate');
    489500                    if (isset($pickingDate) && !empty($pickingDate)) {
    490                         $args['date_query'] = array(
    491                             array(
    492                                 'after' => $pickingDate,
    493                             ),
    494                         );
     501                        $datetime = DateTime::createFromFormat('Y-m-d', $pickingDate);
     502                        if ($datetime) {
     503                            $args['date_query'] = array(
     504                                array(
     505                                    'after' => $pickingDate,
     506                                ),
     507                            );
     508                        }
    495509                    }
    496510
     
    645659                    $pickingDate = get_option('pickingDate');
    646660                    if (isset($pickingDate) && !empty($pickingDate)) {
    647                         $args['date_query'] = array(
    648                             array(
    649                                 'after' => $pickingDate,
    650                             ),
    651                         );
     661                        $datetime = DateTime::createFromFormat('Y-m-d', $pickingDate);
     662                        if ($datetime) {
     663                            $args['date_query'] = array(
     664                                array(
     665                                    'after' => $pickingDate,
     666                                ),
     667                            );
     668                        }
    652669                    }
    653670
     
    750767                    $pickingDate = get_option('pickingDate');
    751768                    if (isset($pickingDate) && !empty($pickingDate)) {
    752                         $args['date_query'] = array(
    753                             array(
    754                                 'after' => $pickingDate,
    755                             ),
    756                         );
     769                        $datetime = DateTime::createFromFormat('Y-m-d', $pickingDate);
     770                        if ($datetime) {
     771                            $args['date_query'] = array(
     772                                array(
     773                                    'after' => $pickingDate,
     774                                ),
     775                            );
     776                        }
    757777                    }
    758778
     
    934954                            $pickingDate = get_option('pickingDate');
    935955                            if (isset($pickingDate) && !empty($pickingDate)) {
    936                                 $args['date_query'] = array(
    937                                     array(
    938                                         'after' => $pickingDate,
    939                                     ),
    940                                 );
     956                                $datetime = DateTime::createFromFormat('Y-m-d', $pickingDate);
     957                                if ($datetime) {
     958                                    $args['date_query'] = array(
     959                                        array(
     960                                            'after' => $pickingDate,
     961                                        ),
     962                                    );
     963                                }
    941964                            }
    942965
     
    12941317                    $pickingDate = get_option('pickingDate');
    12951318                    if (isset($pickingDate) && !empty($pickingDate)) {
    1296                         $args['date_query'] = array(
    1297                             array(
    1298                                 'after' => $pickingDate,
    1299                             ),
    1300                         );
     1319                        $datetime = DateTime::createFromFormat('Y-m-d', $pickingDate);
     1320                        if ($datetime) {
     1321                            $args['date_query'] = array(
     1322                                array(
     1323                                    'after' => $pickingDate,
     1324                                ),
     1325                            );
     1326                        }
    13011327                    }
    13021328
     
    19301956                    $pickingDate = get_option('pickingDate');
    19311957                    if (isset($pickingDate) && !empty($pickingDate)) {
    1932                         $args['date_query'] = array(
    1933                             array(
    1934                                 'after' => $pickingDate,
    1935                             ),
    1936                         );
     1958                        $datetime = DateTime::createFromFormat('Y-m-d', $pickingDate);
     1959                        if ($datetime) {
     1960                            $args['date_query'] = array(
     1961                                array(
     1962                                    'after' => $pickingDate,
     1963                                ),
     1964                            );
     1965                        }
    19371966                    }
    19381967
     
    22402269        $pickingDate = get_option('pickingDate');
    22412270        if (isset($pickingDate) && !empty($pickingDate)) {
    2242             $args['date_query'] = array(
    2243                 array(
    2244                     'after' => $pickingDate,
    2245                 ),
    2246             );
    2247         }
     2271            $datetime = DateTime::createFromFormat('Y-m-d', $pickingDate);
     2272            if ($datetime) {
     2273                $args['date_query'] = array(
     2274                    array(
     2275                        'after' => $pickingDate,
     2276                    ),
     2277                );
     2278            }
     2279        }
     2280
    22482281        $query = new WC_Order_Query($args);
    22492282        $picking_orders = $query->get_orders();
  • order-picking-app/trunk/orderpickingapp.php

    r3209148 r3218710  
    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:           1.7.6
     5 * Version:           1.7.7
    66 * Author:            Arture | PHP Professionals
    77 * Author URI:        http://arture.nl
  • order-picking-app/trunk/readme.txt

    r3209148 r3218710  
    55Requires at least: 6.0
    66Tested up to: 6.6.2
    7 Stable tag: 1.7.6
     7Stable tag: 1.7.7
    88Requires PHP: 7.4
    99License: GPLv2 or later
     
    3737== Changelog ==
    3838
     39= 1.7.7 =
     40* New field for ordernote
     41* Packing skip setting
     42
    3943= 1.7.6 =
    4044* New POS feature for creating guest orders
Note: See TracChangeset for help on using the changeset viewer.