Changeset 3218710
- Timestamp:
- 01/08/2025 06:49:02 AM (15 months ago)
- Location:
- order-picking-app/trunk
- Files:
-
- 7 edited
-
admin/class-orderpickingapp-admin.php (modified) (1 diff)
-
admin/partials/orderpickingapp-settings-page.php (modified) (1 diff)
-
includes/class-feedback.php (modified) (9 diffs)
-
includes/class-orderpickingapp-loader.php (modified) (1 diff)
-
includes/class-orderpickingapp.php (modified) (10 diffs)
-
orderpickingapp.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
order-picking-app/trunk/admin/class-orderpickingapp-admin.php
r3199335 r3218710 457 457 echo '</br>'; 458 458 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; 459 465 } 460 466 } -
order-picking-app/trunk/admin/partials/orderpickingapp-settings-page.php
r3206778 r3218710 233 233 <?php endforeach; ?> 234 234 <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"> 238 237 <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' : ''; ?>> 239 238 <label class="form-check-label" for="manual_order_assigning"><?php echo __( 'Enable manual order assigning to pickers', 'orderpickingapp' ); ?></label> 240 239 </div> 241 240 <div class="form-check"> 242 <strong style="font-size: 12px; margin-top:10px;"><?php echo __( 'Order handling', 'orderpickingapp' ); ?></strong>243 <br/>244 241 <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' : ''; ?>> 245 242 <label class="form-check-label" for="auto_completed_order"><?php echo __( 'Enable auto completed order after picking and packing', 'orderpickingapp' ); ?></label> 246 243 </div> 247 244 <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"> 250 249 <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' : ''; ?>> 251 250 <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> 252 251 </div> 252 253 <br/> 254 253 255 <div class="form-group"> 254 256 <strong style="font-size: 12px; margin-top:10px;">Order prefix</strong> -
order-picking-app/trunk/includes/class-feedback.php
r3160659 r3218710 1 1 <?php 2 class OPA_Uninstall_Feedback 3 { 4 5 public function __construct() 6 { 2 class OPA_Uninstall_Feedback { 3 4 public function __construct() { 7 5 add_action('admin_footer', array($this, 'deactivate_scripts')); 8 6 add_action('wp_ajax_opa_submit_uninstall_reason', array($this, "send_uninstall_reason")); 9 7 } 10 8 11 public function deactivate_scripts() 12 { 9 public function deactivate_scripts() { 13 10 14 11 global $pagenow; … … 26 23 <ul class="reasons"> 27 24 <?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> 33 27 </li> 34 28 <?php } ?> … … 53 47 bottom: 0; 54 48 left: 0; 55 background: rgba(0, 0, 0,0.5);49 background: rgba(0,0,0,0.5); 56 50 display: none; 57 51 } 58 59 .opa-modal.modal-active { 60 display: block; 61 } 62 52 .opa-modal.modal-active {display: block;} 63 53 .opa-modal-wrap { 64 54 width: 50%; … … 67 57 background: #fff; 68 58 } 69 70 59 .opa-modal-header { 71 60 border-bottom: 1px solid #eee; 72 61 padding: 8px 20px; 73 62 } 74 75 63 .opa-modal-header h3 { 76 64 line-height: 150%; 77 65 margin: 0; 78 66 } 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%;} 88 69 .opa-modal-body .reason-input { 89 70 margin-top: 5px; 90 71 margin-left: 20px; 91 72 } 92 93 73 .opa-modal-footer { 94 74 border-top: 1px solid #eee; … … 96 76 text-align: right; 97 77 } 98 99 .reviewlink, .supportlink { 100 padding: 10px 0px 0px 35px !important; 78 .reviewlink, .supportlink{ 79 padding:10px 0px 0px 35px !important; 101 80 font-size: 14px; 102 81 } 103 104 .review-and-deactivate { 105 padding: 5px; 106 } 107 82 .review-and-deactivate{ 83 padding:5px; 84 } 108 85 .wt-uninstall-feedback-privacy-policy { 109 86 text-align: left; … … 158 135 var reasonInputHtml = ''; 159 136 if ('reviewhtml' === inputType) { 160 if ($('.reviewlink').length == 0){137 if($('.reviewlink').length == 0){ 161 138 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"> ★★★★★ </span></a></div>'; 162 139 } 163 } else if ('supportlink' === inputType){164 if ($('.supportlink').length == 0){140 }else if('supportlink' === inputType){ 141 if($('.supportlink').length == 0){ 165 142 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>'; 166 143 } 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(); 173 150 } 174 151 reasonInputHtml = '<div class="reason-input">' + (('text' === inputType) ? '<input type="text" class="input-text" size="40" />' : '<textarea rows="5" cols="45"></textarea>') + '</div>'; … … 213 190 } 214 191 215 public function send_uninstall_reason() 216 { 192 public function send_uninstall_reason() { 217 193 218 194 if (!isset($_POST['reason_id'])) { … … 222 198 $body = '<table>'; 223 199 $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>'; 227 203 $body .= '</tr>'; 228 204 $body .= '</table>'; … … 231 207 $subject = 'Woocommerce deactivatie feedback'; 232 208 $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() { 238 213 239 214 $reasons = array( -
order-picking-app/trunk/includes/class-orderpickingapp-loader.php
r3160659 r3218710 1 1 <?php 2 class OrderPickingApp_Loader3 {4 2 5 protected $actions; 3 class OrderPickingApp_Loader { 6 4 7 protected $filters;5 protected $actions; 8 6 9 public function __construct() 10 { 7 protected $filters; 11 8 12 $this->actions = array(); 13 $this->filters = array(); 9 public function __construct() { 14 10 15 } 11 $this->actions = array(); 12 $this->filters = array(); 13 14 } 16 15 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 } 21 19 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 } 26 23 27 private function add($hooks, $hook, $component, $callback) 28 { 24 private function add( $hooks, $hook, $component, $callback ) { 29 25 30 $hooks[] = array(31 'hook'=> $hook,32 'component' => $component,33 'callback'=> $callback34 );26 $hooks[] = array( 27 'hook' => $hook, 28 'component' => $component, 29 'callback' => $callback 30 ); 35 31 36 return $hooks; 32 return $hooks; 33 34 } 37 35 38 } 36 public function run() { 39 37 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 } 42 45 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 } 52 47 53 48 } -
order-picking-app/trunk/includes/class-orderpickingapp.php
r3209148 r3218710 54 54 $wp_query_args['meta_query'] = array_merge($meta_query, $query_vars['meta_query']); 55 55 } 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 } 57 64 return $wp_query_args; 58 65 }, 10, 2); … … 274 281 $pickingDate = get_option('pickingDate'); 275 282 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 } 281 291 } 282 292 … … 399 409 $Order->add_order_note('Order Picking App | Order picking completed by ' . $data['appuser'] . '. Order now available for packing.'); 400 410 $Order->update_meta_data('picking_status', $data['status']); 411 $Order->update_meta_data('ordernote', $data['ordernote']); 401 412 $this->log('Order picking completed for order: ' . $order['orderid'] . ' by ' . $data['appuser'], 'Info'); 402 413 $Order->save(); … … 488 499 $pickingDate = get_option('pickingDate'); 489 500 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 } 495 509 } 496 510 … … 645 659 $pickingDate = get_option('pickingDate'); 646 660 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 } 652 669 } 653 670 … … 750 767 $pickingDate = get_option('pickingDate'); 751 768 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 } 757 777 } 758 778 … … 934 954 $pickingDate = get_option('pickingDate'); 935 955 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 } 941 964 } 942 965 … … 1294 1317 $pickingDate = get_option('pickingDate'); 1295 1318 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 } 1301 1327 } 1302 1328 … … 1930 1956 $pickingDate = get_option('pickingDate'); 1931 1957 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 } 1937 1966 } 1938 1967 … … 2240 2269 $pickingDate = get_option('pickingDate'); 2241 2270 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 2248 2281 $query = new WC_Order_Query($args); 2249 2282 $picking_orders = $query->get_orders(); -
order-picking-app/trunk/orderpickingapp.php
r3209148 r3218710 3 3 * Plugin Name: Order Picking App 4 4 * 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. 65 * Version: 1.7.7 6 6 * Author: Arture | PHP Professionals 7 7 * Author URI: http://arture.nl -
order-picking-app/trunk/readme.txt
r3209148 r3218710 5 5 Requires at least: 6.0 6 6 Tested up to: 6.6.2 7 Stable tag: 1.7. 67 Stable tag: 1.7.7 8 8 Requires PHP: 7.4 9 9 License: GPLv2 or later … … 37 37 == Changelog == 38 38 39 = 1.7.7 = 40 * New field for ordernote 41 * Packing skip setting 42 39 43 = 1.7.6 = 40 44 * New POS feature for creating guest orders
Note: See TracChangeset
for help on using the changeset viewer.