Changeset 3404834
- Timestamp:
- 11/28/2025 08:02:25 AM (4 months ago)
- Location:
- order-picking-app/trunk
- Files:
-
- 5 edited
-
admin/class-orderpickingapp-admin.php (modified) (1 diff)
-
admin/partials/orderpickingapp-settings-page.php (modified) (5 diffs)
-
includes/class-orderpickingapp.php (modified) (14 diffs)
-
orderpickingapp.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
order-picking-app/trunk/admin/class-orderpickingapp-admin.php
r3387101 r3404834 1306 1306 $app_users[$app_users_counter]['app_users_picking_amount'] = $item['value']; 1307 1307 } 1308 else {1308 elseif (str_contains($item['name'], 'app_users_type')) { 1309 1309 $app_users[$app_users_counter]['app_users_type'] = $item['value']; 1310 } 1311 else{ 1312 $app_users[$app_users_counter]['app_users_wp_user_id'] = $item['value']; 1310 1313 $app_users_counter++; 1311 1314 } -
order-picking-app/trunk/admin/partials/orderpickingapp-settings-page.php
r3386883 r3404834 540 540 <p style="font-size: 14px; text-align: center; margin: 0 15%;">Add all employees who will use the Order Picking App here. In the app you start by choosing a picker. For picked orders/products, the relevant picker is noted in the order notes.</p> 541 541 <?php 542 543 $wp_users = get_users( array( 544 'fields' => array( 'ID', 'display_name', 'user_email' ), 545 ) ); 546 542 547 $noUsers = true; 543 548 if( isset($app_settings['app_users']) && !empty($app_settings['app_users']) && is_array($app_settings['app_users']) ): 544 549 $i = count($app_settings['app_users']); 550 545 551 foreach( $app_settings['app_users'] as $app_user ): 546 552 … … 552 558 'app_users_type' => '', 553 559 'app_users_start_time' => '', 554 'app_users_end_time' => '' 560 'app_users_end_time' => '', 561 'app_users_wp_user_id' => '' 555 562 ); 556 563 } … … 564 571 $i--; ?> 565 572 <div class="form-group <?php echo ($i == 0)? 'duplicate_row' : ''; ?>" style="width: 100%;margin: 10px 0; min-height: 30px;"> 566 <input style="float: left; width: 20%;margin-right: 10px;" type="text" class="form-control app_users_name" name="app_users[][app_users [][app_users_name]]" value="<?php echo $app_user['app_users_name']; ?>" placeholder="<?php echo $app_user['app_users_name']; ?>"/>573 <input style="float: left; width: 20%;margin-right: 10px;" type="text" class="form-control app_users_name" name="app_users[][app_users_name]]" value="<?php echo $app_user['app_users_name']; ?>" placeholder="<?php echo $app_user['app_users_name']; ?>"/> 567 574 <input style="float: left; width: 20%;margin-right: 10px;" type="text" class="form-control" name="app_users[][app_users_password]" value="<?php echo $app_user['app_users_password']; ?>" placeholder="<?php echo __( 'Enter user password (optional)', 'orderpickingapp' ); ?>"/> 568 575 <input style="float: left; width: 8%;margin-right: 10px;" type="number" min="0" max="23" step="1" class="woocommerce-Input woocommerce-Input--text input-text" name="app_users[][app_users_start_time]" value="<?php echo $app_user['app_users_start_time']; ?>" placeholder="Start"/> … … 588 595 <?php endif; ?> 589 596 </select> 597 598 <select style="float: left; width: 20%;margin-right: 10px;" name="app_users[][app_users_wp_user_id]"> 599 <option value=""><?php _e( '— Not connected —', 'orderpickingapp' ); ?></option> 600 <?php if ( ! empty( $wp_users ) ) : ?> 601 <?php foreach ( $wp_users as $user ) : ?> 602 <option value="<?php echo esc_attr( $user->ID ); ?>" 603 <?php selected( isset($app_user['app_users_wp_user_id']) ? $app_user['app_users_wp_user_id'] : '', $user->ID ); ?>> 604 <?php echo esc_html( $user->display_name . ' (' . $user->user_email . ')' ); ?> 605 </option> 606 <?php endforeach; ?> 607 <?php endif; ?> 608 </select> 590 609 </div> 591 610 <?php … … 612 631 <?php if( $app_settings['subscription']['inventory_addon'] ): ?> 613 632 <option value="inventory">Inventory</option> 633 <?php endif; ?> 634 </select> 635 636 <select style="float: left; width: 20%;margin-right: 10px;" name="app_users[][app_users_wp_user_id]"> 637 <option value=""><?php _e( '— Not connected —', 'orderpickingapp' ); ?></option> 638 <?php if ( ! empty( $wp_users ) ) : ?> 639 <?php foreach ( $wp_users as $user ) : ?> 640 <option value="<?php echo esc_attr( $user->ID ); ?>"> 641 <?php echo esc_html( $user->display_name . ' (' . $user->user_email . ')' ); ?> 642 </option> 643 <?php endforeach; ?> 614 644 <?php endif; ?> 615 645 </select> -
order-picking-app/trunk/includes/class-orderpickingapp.php
r3386883 r3404834 722 722 $order_date = apply_filters('orderpickingapp_order_date', $order_date, $total_picking_order); 723 723 724 $o pen_picking_orders[]= array(724 $order_data = array( 725 725 'orderid' => $total_picking_order_id, 726 726 'order_number' => $order_number, … … 734 734 'custom_field' => $custom_field, 735 735 ); 736 $open_picking_orders[] = apply_filters('orderpickingapp_order_data', $order_data); 736 737 737 738 $total_picking_orders++; … … 1049 1050 } 1050 1051 1051 $o pen_picking_orders[]= array(1052 $order_data = array( 1052 1053 'orderid' => $total_picking_order_id, 1053 1054 'order_number' => $order_number, … … 1061 1062 'custom_field' => $custom_field, 1062 1063 ); 1064 $open_picking_orders[] = apply_filters('orderpickingapp_order_data', $order_data); 1063 1065 1064 1066 $total_picking_orders++; … … 1310 1312 $order_date = apply_filters('orderpickingapp_order_date', $order_date, $total_picking_order); 1311 1313 1312 $o pen_picking_orders[]= array(1313 'orderid' => $total_picking_order_id,1314 $order_data = array( 1315 'orderid' => $total_picking_order_id, 1314 1316 'order_number' => $order_number, 1315 1317 'date' => $order_date, 1316 1318 'items' => $total_items, 1317 'total'=> $currency_symbol . ' ' . $total_picking_order->get_total(),1318 'lastname' => $lastname,1319 'total' => $currency_symbol . ' ' . $total_picking_order->get_total(), 1320 'lastname' => $lastname, 1319 1321 'shipping' => $total_picking_order->get_shipping_method(), 1320 'claimed_by' => $total_picking_order->get_meta('user_claimed'),1321 'custom_field_label' => $custom_field_label,1322 'custom_field' => $custom_field,1322 'claimed_by' => $total_picking_order->get_meta('user_claimed'), 1323 'custom_field_label' => $custom_field_label, 1324 'custom_field' => $custom_field, 1323 1325 ); 1326 $open_picking_orders[] = apply_filters('orderpickingapp_order_data', $order_data); 1324 1327 1325 1328 $total_picking_orders++; … … 1509 1512 $order = wc_create_order(); 1510 1513 $order->set_customer_id($customer_id); 1514 1515 // Haal klantgegevens op 1516 $customer = new WC_Customer($customer_id); 1517 1518 $billing = [ 1519 'first_name' => $customer->get_billing_first_name(), 1520 'last_name' => $customer->get_billing_last_name(), 1521 'company' => $customer->get_billing_company(), 1522 'address_1' => $customer->get_billing_address_1(), 1523 'address_2' => $customer->get_billing_address_2(), 1524 'city' => $customer->get_billing_city(), 1525 'state' => $customer->get_billing_state(), 1526 'postcode' => $customer->get_billing_postcode(), 1527 'country' => $customer->get_billing_country(), 1528 'email' => $customer->get_billing_email(), 1529 'phone' => $customer->get_billing_phone(), 1530 ]; 1531 $order->set_address($billing, 'billing'); 1532 1533 $shipping = [ 1534 'first_name' => $customer->get_shipping_first_name(), 1535 'last_name' => $customer->get_shipping_last_name(), 1536 'company' => $customer->get_shipping_company(), 1537 'address_1' => $customer->get_shipping_address_1(), 1538 'address_2' => $customer->get_shipping_address_2(), 1539 'city' => $customer->get_shipping_city(), 1540 'state' => $customer->get_shipping_state(), 1541 'postcode' => $customer->get_shipping_postcode(), 1542 'country' => $customer->get_shipping_country(), 1543 ]; 1544 $order->set_address($shipping, 'shipping'); 1545 1511 1546 $order->set_status('wc-on-hold', 'Order created by ' . ucfirst($appuser) . ' | Order Picking App | '); 1512 1547 foreach ($data['products'] as $product) { … … 1628 1663 $order_date = apply_filters('orderpickingapp_order_date', $order_date, $order); 1629 1664 1630 wp_send_json(array(1665 $order_data = array( 1631 1666 'orderid' => $order_id, 1632 1667 'order_number' => $order_number, … … 1637 1672 'shipping' => $order->get_shipping_method(), 1638 1673 'order_note' => $customer_note, 1639 )); 1674 ); 1675 $order_data = apply_filters('orderpickingapp_order_data', $order_data); 1676 1677 wp_send_json($order_data); 1640 1678 } else { 1641 1679 $args = array( … … 1993 2031 $order_date = apply_filters('orderpickingapp_order_date', $order_date, $open_order); 1994 2032 1995 $o pen_picking_orders[]= array(2033 $order_data = array( 1996 2034 'orderid' => $picking_order_id, 1997 2035 'order_number' => $order_number, … … 2005 2043 'custom_field' => $custom_field, 2006 2044 ); 2045 $open_picking_orders[] = apply_filters('orderpickingapp_order_data', $order_data); 2007 2046 2008 2047 $total_picking_orders++; … … 2218 2257 $price = $product_info->get_price(); 2219 2258 if (isset($price) && !empty($price)) { 2220 $price = $currency_symbol . ' ' . number_format($product_info->get_price(), 2, ",", "."); 2259 $price = (float)$product_info->get_price(); 2260 $price = $currency_symbol . ' ' . number_format($price, 2, ",", "."); 2221 2261 } else { 2222 2262 $price = '-'; … … 2326 2366 'custom_field' => '', 2327 2367 ); 2328 $product_data = apply_filters('orderpickingapp_product_data', $product_data );2368 $product_data = apply_filters('orderpickingapp_product_data', $product_data, $item); 2329 2369 2330 2370 $custom_product_field_label = apply_filters('opa_custom_product_field_label', $custom_product_field_label, $product_id, $item_id); … … 3342 3382 } 3343 3383 3384 $product_data = apply_filters('orderpickingapp_product_data', $product_data, $item); 3385 3344 3386 if (isset($output[$packing_order_id]['products'][$identifier]['quantity'])) { 3345 3387 $output[$packing_order_id]['products'][$identifier]['quantity'] += $product_data['quantity']; … … 3780 3822 'picking_locations' => $picking_locations, 3781 3823 ); 3782 $product_data = apply_filters('orderpickingapp_product_data', $product_data );3824 $product_data = apply_filters('orderpickingapp_product_data', $product_data, []); 3783 3825 3784 3826 $product_data['second_barcode'] = ''; -
order-picking-app/trunk/orderpickingapp.php
r3387101 r3404834 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: 2.2. 75 * Version: 2.2.8 6 6 * Author: Arture | PHP Professionals 7 7 * Author URI: http://arture.nl -
order-picking-app/trunk/readme.txt
r3387101 r3404834 5 5 Requires at least: 6.0 6 6 Tested up to: 6.8.3 7 Stable tag: 2.2. 77 Stable tag: 2.2.8 8 8 Requires PHP: 8.0 9 9 License: GPLv2 or later … … 59 59 == Changelog == 60 60 61 = 2.2.8 = 62 * Added customer fields for billing and shipping to POS order create 63 * Added user connection with picker 64 61 65 = 2.2.7 = 62 66 * Bugfix for product finder action and picking location
Note: See TracChangeset
for help on using the changeset viewer.