Changeset 3225923
- Timestamp:
- 01/21/2025 04:59:46 AM (14 months ago)
- Location:
- shipany
- Files:
-
- 20 edited
- 1 copied
-
tags/1.1.65 (copied) (copied from shipany/trunk)
-
tags/1.1.65/assets/js/shipany.js (modified) (6 diffs)
-
tags/1.1.65/includes/Utils/ShipanyHelper.php (modified) (6 diffs)
-
tags/1.1.65/includes/abstract-shipany-wc-order.php (modified) (3 diffs)
-
tags/1.1.65/includes/class-shipany-wc-method-ecs-asia.php (modified) (2 diffs)
-
tags/1.1.65/lang/shipany-zh_HK.mo (modified) (previous)
-
tags/1.1.65/lang/shipany-zh_HK.po (modified) (1 diff)
-
tags/1.1.65/lang/shipany-zh_TW.mo (modified) (previous)
-
tags/1.1.65/lang/shipany-zh_TW.po (modified) (1 diff)
-
tags/1.1.65/readme.txt (modified) (2 diffs)
-
tags/1.1.65/shipany-woocommerce.php (modified) (2 diffs)
-
trunk/assets/js/shipany.js (modified) (6 diffs)
-
trunk/includes/Utils/ShipanyHelper.php (modified) (6 diffs)
-
trunk/includes/abstract-shipany-wc-order.php (modified) (3 diffs)
-
trunk/includes/class-shipany-wc-method-ecs-asia.php (modified) (2 diffs)
-
trunk/lang/shipany-zh_HK.mo (modified) (previous)
-
trunk/lang/shipany-zh_HK.po (modified) (1 diff)
-
trunk/lang/shipany-zh_TW.mo (modified) (previous)
-
trunk/lang/shipany-zh_TW.po (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/shipany-woocommerce.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
shipany/tags/1.1.65/assets/js/shipany.js
r3032634 r3225923 16 16 .on( 'click', '#shipany-pickup-button', this.pickup_fn ); 17 17 $( '#woocommerce-shipment-shipany-label' ) 18 .on( 'change', '#pr_shipany_merchant_location', this.change_courier ); 19 $( '#woocommerce-shipment-shipany-label' ) 20 .on( 'change', '#pr_shipany_incoterms', this.change_courier ); 21 $( '#woocommerce-shipment-shipany-label' ) 18 22 .on( 'change', '#pr_shipany_product', this.change_courier ); 19 23 $( '#woocommerce-shipment-shipany-label' ) 20 .on( 'change', '#pr_shipany_storage_type', this.change_ storage_type);24 .on( 'change', '#pr_shipany_storage_type', this.change_courier ); 21 25 $( '#woocommerce-shipment-shipany-label' ) 22 26 .on( 'change', '#pr_shipany_courier_additional_service', this.change_courier_additional_service ); … … 308 312 309 313 change_courier: function(e) { 310 $courier_id=e.target.value; 311 const targetCourier = $(e.target).find('option:selected')[0].text || '' 314 const targetCourier = $("#pr_shipany_product").find('option:selected')[0].text || '' 312 315 let courierNeedSelectServicePlan = true 313 316 // lalamove … … 385 388 386 389 $("[name='pr_shipany_couier_service_plan']").empty() 387 if (courierNeedSelectServicePlan) { 388 wc_shipment_shipany_label_items._update_by_courier($courier_id); 389 } else { 390 // normal courier 391 $('.pr_shipany_couier_service_plan_field').hide() 392 } 393 390 wc_shipment_shipany_label_items._update_by_courier($("#pr_shipany_product").find('option:selected')[0].value); 394 391 }, 395 392 … … 406 403 var paid_by_rec = $( '[name="pr_shipany_paid_by_rec"]' ).get(0).checked ? 'yes' : 'no'; 407 404 var self_drop_off = $( '[name="pr_shipany_self_drop_off"]' ).get(0).checked ? 'yes' : 'no'; 405 var merchant_location = $( '[name="pr_shipany_merchant_location"]' ).val(); 406 var incoterms = $( '[name="pr_shipany_incoterms"]' ).val(); 408 407 var weight = $( '[name="shipany_weight"]' ).val(); 409 408 $('.pr_shipany_couier_service_plan_field').show() … … 418 417 selfDropOff: self_drop_off, 419 418 packageWeight: weight, 419 location_uid: merchant_location, 420 incoterms: incoterms, 420 421 }; 421 422 … … 468 469 } 469 470 }); 470 },471 472 change_storage_type: function(e) {473 const targetCourier = $('#pr_shipany_product').find('option:selected')[0].text || '';474 let courierNeedSelectServicePlan = true;475 $("[name='pr_shipany_couier_service_plan']").empty()476 if (courierNeedSelectServicePlan) {477 wc_shipment_shipany_label_items._update_by_courier($('#pr_shipany_product').find('option:selected')[0].value);478 } else {479 // normal courier480 $('.pr_shipany_couier_service_plan_field').hide()481 }482 471 }, 483 472 -
shipany/tags/1.1.65/includes/Utils/ShipanyHelper.php
r3218747 r3225923 173 173 'add-ons' => array(), // for lalamove, keep the structure of the add-ons 174 174 'package_weight' => 0, 175 'location_uid' => '', // static::get_settings('shipany_default_location'), 176 'incoterms' => static::get_settings('shipany_incoterms'), 175 177 ), 176 178 $shipany_data … … 182 184 183 185 $merchant_info = static::get_merchant_info(); 184 $sndr_ctc['ctc'] = json_decode(json_encode($merchant_info->co_info->ctc_pers[0]->ctc), true); 185 $sndr_ctc['addr'] = json_decode(json_encode($merchant_info->co_info->org_ctcs[0]->addr), true); 186 if($shipany_data['location_uid']){ 187 $sndr_ctc['location_uid'] = $shipany_data['location_uid']; 188 } else { 189 $sndr_ctc['ctc'] = json_decode(json_encode($merchant_info->co_info->ctc_pers[0]->ctc), true); 190 $sndr_ctc['addr'] = json_decode(json_encode($merchant_info->co_info->org_ctcs[0]->addr), true); 191 } 186 192 $avaliable_couriers = json_decode(json_encode(array_filter(static::get_couriers(), function ($courier) use ($merchant_info) { 187 193 return in_array($courier->uid, $merchant_info->desig_cours); … … 375 381 'paid_by_rcvr' => $shipany_data['paid_by_rcvr'], 376 382 'stg' => $shipany_data['storage_type'] ?: 'Normal', 383 'incoterms' => $shipany_data['incoterms'], 377 384 'order_from' => "woocommerce", 378 385 'woocommerce_default_create' => $shipany_data['auto'], … … 557 564 558 565 public static function query_rate($payload, $header) { 559 $request_headers = array( 560 // "cour-uid" => isset($payload['cour_uid']) ? $payload['cour_uid'] : '' 561 ); 562 // if (empty($request_headers["cour-uid"])) { 563 // $request_headers["cour-uid"] = $header['cour-uid']; 564 // } 566 $request_headers = array(); 565 567 $response = static::getInstance()->api_client->post('couriers-connector/query-rate/', $payload, $request_headers); 566 568 if ($response->status === 200) { … … 712 714 $settings = get_option('woocommerce_shipany_ecs_asia_settings'); 713 715 return isset($settings[$key]) ? $settings[$key] : null; 716 } 717 718 public static function update_settings($key, $value) { 719 $settings = get_option('woocommerce_shipany_ecs_asia_settings'); 720 $settings[$key] = $value; 721 update_option('woocommerce_shipany_ecs_asia_settings', $settings); 714 722 } 715 723 … … 1059 1067 return 'customer'; 1060 1068 } 1069 } 1070 1071 public static function get_merchant_locations($fulfillment_enabled=false) { 1072 $output = array( 1073 array( 1074 'uid' => '', 1075 'country' => array( 1076 0 => 'HKG', 1077 1 => 'SGP', 1078 2 => 'TWN', 1079 3 => 'THA', 1080 )[static::get_settings('shipany_region')], 1081 'name' => __('Default Location', 'shipany'), 1082 ) 1083 ); 1084 $url = 'locations/'; 1085 if($fulfillment_enabled){ 1086 $url = $url . '?fulfillment_enabled=true'; 1087 } 1088 $resp = static::getInstance()->api_client->get($url); 1089 if ($resp->status >= 200 && $resp->status < 300) { 1090 $resp = json_decode($resp->body, true); 1091 if (!isset($resp['result']) || $resp['result']['code'] != 200) { 1092 return $output; 1093 } 1094 $result = $resp['data']['objects']; 1095 return array_merge($output, $result); 1096 } 1097 return $output; 1061 1098 } 1062 1099 -
shipany/tags/1.1.65/includes/abstract-shipany-wc-order.php
r3218747 r3225923 217 217 'self_drop_off' => $self_drop_off, 218 218 'package_weight' => $_POST['packageWeight'], 219 'location_uid' => $_POST['location_uid'], 220 'incoterms' => $_POST['incoterms'], 219 221 )); 220 222 … … 803 805 'value' => wp_create_nonce( 'create-shipany-label' ) 804 806 ) ); 807 808 $cross_boarder_map = array(); 809 810 $pr_shipany_merchant_location = $obj->get_meta('pr_shipany_merchant_location'); 811 812 woocommerce_wp_select(array( 813 'id' => 'pr_shipany_merchant_location', 814 'label' => __('Merchant Location', 'shipany'), 815 'options' => array_reduce(ShipanyHelper::get_merchant_locations(true), function($acc, $location) use (&$cross_boarder_map, $obj) { 816 $acc[$location['uid']] = $location['name'] . (@$location['address_line'] ? ' (' . $location['address_line'] . ')' : ''); 817 if($location['country'] != CommonUtils::convert_country_code($obj->get_address('shipping')['country'])) { 818 $cross_boarder_map[] = $location['uid']; 819 } 820 return $acc; 821 }, array()), 822 'value' => $pr_shipany_merchant_location, 823 'custom_attributes' => array( 824 'data-cross-boarder-map' => json_encode($cross_boarder_map), 825 'onchange' => 'document.getElementById("pr_shipany_incoterms").parentElement.style.display = (this.dataset.crossBoarderMap ? JSON.parse(this.dataset.crossBoarderMap).includes(this.value) : false) ? "block" : "none";' 826 ) 827 )); 828 829 woocommerce_wp_select(array( 830 'id' => 'pr_shipany_incoterms', 831 'label' => __('Duty Type', 'shipany'), 832 'options' => array( 833 'DDP' => __('DDP - Delivered Duty Paid', 'shipany'), 834 'DDU' => __('DDU - Delivered Duty Unpaid', 'shipany') 835 ) 836 )); 837 838 echo '<script>document.getElementById("pr_shipany_incoterms").parentElement.style.display = (document.getElementById("pr_shipany_merchant_location").dataset.crossBoarderMap ? JSON.parse(document.getElementById("pr_shipany_merchant_location").dataset.crossBoarderMap).includes(document.getElementById("pr_shipany_merchant_location").value) : false) ? "block" : "none";</script>'; 805 839 806 840 woocommerce_wp_select ( array( … … 1350 1384 'paid_by_rcvr' => isset($_POST['pr_shipany_paid_by_rec']) && $_POST['pr_shipany_paid_by_rec'] == 'yes', 1351 1385 'self_drop_off' => isset($_POST['pr_shipany_self_drop_off']) && $_POST['pr_shipany_self_drop_off'] == 'yes', 1386 'package_weight' => $_POST['shipany_weight'], 1387 'location_uid' => $_POST['pr_shipany_merchant_location'], 1388 'incoterms' => $_POST['pr_shipany_incoterms'], 1352 1389 )); 1353 1390 // $args = apply_filters('shipping_shipany_label_args', $args, $order_id ); -
shipany/tags/1.1.65/includes/class-shipany-wc-method-ecs-asia.php
r3105502 r3225923 511 511 'class' => 'wc-enhanced-select' 512 512 ); 513 514 // $default_location = array( 515 // 'title' => __( 'Default Location', 'shipany' ), 516 // 'type' => 'select', 517 // 'description' => __( 'Please select the default location.', 'shipany' ), 518 // 'desc_tip' => true, 519 // 'options' => array_reduce(ShipanyHelper::get_merchant_locations(true), function($acc, $location) { 520 // $acc[$location['uid']] = $location['name']; 521 // return $acc; 522 // }, array()), 523 // 'class' => 'wc-enhanced-select' 524 // ); 525 513 526 $paid_by_rec = array( 514 527 'title' => __( 'Paid by Receiver', 'shipany' ), … … 527 540 ); 528 541 542 $ddp_or_ddu = array( 543 'title' => __( 'Duty Type (Only applicable for international shipment)', 'shipany' ), 544 'type' => 'select', 545 'description' => __( 'Please select DDP (Delivered Duty Paid) or DDU (Delivered Duty Unpaid). For DDP, import duty and taxes are paid by sender. For DDU, import duty and taxes are paid by receiver.', 'shipany' ), 546 'desc_tip' => true, 547 'options' => array( 548 'DDP' => __('DDP - Delivered Duty Paid', 'shipany'), 549 'DDU' => __('DDU - Delivered Duty Unpaid', 'shipany') 550 ), 551 'default' => 'DDP', 552 'class' => 'wc-enhanced-select' 553 ); 554 529 555 $this->form_fields = array_slice($this->form_fields, 0, 7, true) + array( 530 556 "shipany_default_courier_additional_service" => $default_courier_additional_service, 557 // "shipany_default_location" => $default_location, 531 558 "shipany_paid_by_rec" => $paid_by_rec, 532 559 "shipany_self_drop_off" => $self_drop_off, 560 "shipany_incoterms" => $ddp_or_ddu, 533 561 "shipany_rest_token" => $get_token, 534 562 "shipany_enable_locker_list" => $insert_locker_setting1, -
shipany/tags/1.1.65/lang/shipany-zh_HK.po
r3105502 r3225923 867 867 msgid "Self Drop-off:" 868 868 msgstr "自寄:" 869 870 msgid "DDP - Delivered Duty Paid" 871 msgstr "DDP - 寄方支付清關費用" 872 873 msgid "DDU - Delivered Duty Unpaid" 874 msgstr "DDU - 收件方支付清關費用" 875 876 msgid "Default Location" 877 msgstr "預設地址" -
shipany/tags/1.1.65/lang/shipany-zh_TW.po
r3105502 r3225923 867 867 msgid "Self Drop-off:" 868 868 msgstr "自寄:" 869 870 msgid "DDP - Delivered Duty Paid" 871 msgstr "DDP - 寄方支付清關費用" 872 873 msgid "DDU - Delivered Duty Unpaid" 874 msgstr "DDU - 收件方支付清關費用" 875 876 msgid "Default Location" 877 msgstr "預設地址" -
shipany/tags/1.1.65/readme.txt
r3218878 r3225923 4 4 Requires at least: 4.1 5 5 Tested up to: 6.7.1 6 Stable tag: 1.1.6 46 Stable tag: 1.1.65 7 7 Requires PHP: 5.6 8 8 License: GPLv2 or later … … 71 71 == Changelog == 72 72 73 = 1.1.65 = 74 - Added merchant location 75 - Added incoterms support 76 73 77 = 1.1.64 = 74 78 - Added Support for Thailand Region -
shipany/tags/1.1.65/shipany-woocommerce.php
r3218747 r3225923 7 7 Plugin URI: http://wordpress.org/plugins/shipany 8 8 Description: ShipAny one-stop logistics platform interconnects WooCommerce to multiple logistics service providers (including SF Express, Kerry Express, SF Cold-Chain, Alfred Locker, Hongkong Post, SF Locker, Convenience Store, etc.) so merchants can enjoy full-set features of logistics automation which disrupt the manual logistics process and bring E-Commerce to new generation. 9 Version: 1.1.6 49 Version: 1.1.65 10 10 Author: ShipAny 11 11 Author URI: https://www.shipany.io … … 690 690 class SHIPANY_WC { 691 691 public static $list; 692 private $version = "1.1.6 4";692 private $version = "1.1.65"; 693 693 694 694 protected static $_instance = null; -
shipany/trunk/assets/js/shipany.js
r3032634 r3225923 16 16 .on( 'click', '#shipany-pickup-button', this.pickup_fn ); 17 17 $( '#woocommerce-shipment-shipany-label' ) 18 .on( 'change', '#pr_shipany_merchant_location', this.change_courier ); 19 $( '#woocommerce-shipment-shipany-label' ) 20 .on( 'change', '#pr_shipany_incoterms', this.change_courier ); 21 $( '#woocommerce-shipment-shipany-label' ) 18 22 .on( 'change', '#pr_shipany_product', this.change_courier ); 19 23 $( '#woocommerce-shipment-shipany-label' ) 20 .on( 'change', '#pr_shipany_storage_type', this.change_ storage_type);24 .on( 'change', '#pr_shipany_storage_type', this.change_courier ); 21 25 $( '#woocommerce-shipment-shipany-label' ) 22 26 .on( 'change', '#pr_shipany_courier_additional_service', this.change_courier_additional_service ); … … 308 312 309 313 change_courier: function(e) { 310 $courier_id=e.target.value; 311 const targetCourier = $(e.target).find('option:selected')[0].text || '' 314 const targetCourier = $("#pr_shipany_product").find('option:selected')[0].text || '' 312 315 let courierNeedSelectServicePlan = true 313 316 // lalamove … … 385 388 386 389 $("[name='pr_shipany_couier_service_plan']").empty() 387 if (courierNeedSelectServicePlan) { 388 wc_shipment_shipany_label_items._update_by_courier($courier_id); 389 } else { 390 // normal courier 391 $('.pr_shipany_couier_service_plan_field').hide() 392 } 393 390 wc_shipment_shipany_label_items._update_by_courier($("#pr_shipany_product").find('option:selected')[0].value); 394 391 }, 395 392 … … 406 403 var paid_by_rec = $( '[name="pr_shipany_paid_by_rec"]' ).get(0).checked ? 'yes' : 'no'; 407 404 var self_drop_off = $( '[name="pr_shipany_self_drop_off"]' ).get(0).checked ? 'yes' : 'no'; 405 var merchant_location = $( '[name="pr_shipany_merchant_location"]' ).val(); 406 var incoterms = $( '[name="pr_shipany_incoterms"]' ).val(); 408 407 var weight = $( '[name="shipany_weight"]' ).val(); 409 408 $('.pr_shipany_couier_service_plan_field').show() … … 418 417 selfDropOff: self_drop_off, 419 418 packageWeight: weight, 419 location_uid: merchant_location, 420 incoterms: incoterms, 420 421 }; 421 422 … … 468 469 } 469 470 }); 470 },471 472 change_storage_type: function(e) {473 const targetCourier = $('#pr_shipany_product').find('option:selected')[0].text || '';474 let courierNeedSelectServicePlan = true;475 $("[name='pr_shipany_couier_service_plan']").empty()476 if (courierNeedSelectServicePlan) {477 wc_shipment_shipany_label_items._update_by_courier($('#pr_shipany_product').find('option:selected')[0].value);478 } else {479 // normal courier480 $('.pr_shipany_couier_service_plan_field').hide()481 }482 471 }, 483 472 -
shipany/trunk/includes/Utils/ShipanyHelper.php
r3218747 r3225923 173 173 'add-ons' => array(), // for lalamove, keep the structure of the add-ons 174 174 'package_weight' => 0, 175 'location_uid' => '', // static::get_settings('shipany_default_location'), 176 'incoterms' => static::get_settings('shipany_incoterms'), 175 177 ), 176 178 $shipany_data … … 182 184 183 185 $merchant_info = static::get_merchant_info(); 184 $sndr_ctc['ctc'] = json_decode(json_encode($merchant_info->co_info->ctc_pers[0]->ctc), true); 185 $sndr_ctc['addr'] = json_decode(json_encode($merchant_info->co_info->org_ctcs[0]->addr), true); 186 if($shipany_data['location_uid']){ 187 $sndr_ctc['location_uid'] = $shipany_data['location_uid']; 188 } else { 189 $sndr_ctc['ctc'] = json_decode(json_encode($merchant_info->co_info->ctc_pers[0]->ctc), true); 190 $sndr_ctc['addr'] = json_decode(json_encode($merchant_info->co_info->org_ctcs[0]->addr), true); 191 } 186 192 $avaliable_couriers = json_decode(json_encode(array_filter(static::get_couriers(), function ($courier) use ($merchant_info) { 187 193 return in_array($courier->uid, $merchant_info->desig_cours); … … 375 381 'paid_by_rcvr' => $shipany_data['paid_by_rcvr'], 376 382 'stg' => $shipany_data['storage_type'] ?: 'Normal', 383 'incoterms' => $shipany_data['incoterms'], 377 384 'order_from' => "woocommerce", 378 385 'woocommerce_default_create' => $shipany_data['auto'], … … 557 564 558 565 public static function query_rate($payload, $header) { 559 $request_headers = array( 560 // "cour-uid" => isset($payload['cour_uid']) ? $payload['cour_uid'] : '' 561 ); 562 // if (empty($request_headers["cour-uid"])) { 563 // $request_headers["cour-uid"] = $header['cour-uid']; 564 // } 566 $request_headers = array(); 565 567 $response = static::getInstance()->api_client->post('couriers-connector/query-rate/', $payload, $request_headers); 566 568 if ($response->status === 200) { … … 712 714 $settings = get_option('woocommerce_shipany_ecs_asia_settings'); 713 715 return isset($settings[$key]) ? $settings[$key] : null; 716 } 717 718 public static function update_settings($key, $value) { 719 $settings = get_option('woocommerce_shipany_ecs_asia_settings'); 720 $settings[$key] = $value; 721 update_option('woocommerce_shipany_ecs_asia_settings', $settings); 714 722 } 715 723 … … 1059 1067 return 'customer'; 1060 1068 } 1069 } 1070 1071 public static function get_merchant_locations($fulfillment_enabled=false) { 1072 $output = array( 1073 array( 1074 'uid' => '', 1075 'country' => array( 1076 0 => 'HKG', 1077 1 => 'SGP', 1078 2 => 'TWN', 1079 3 => 'THA', 1080 )[static::get_settings('shipany_region')], 1081 'name' => __('Default Location', 'shipany'), 1082 ) 1083 ); 1084 $url = 'locations/'; 1085 if($fulfillment_enabled){ 1086 $url = $url . '?fulfillment_enabled=true'; 1087 } 1088 $resp = static::getInstance()->api_client->get($url); 1089 if ($resp->status >= 200 && $resp->status < 300) { 1090 $resp = json_decode($resp->body, true); 1091 if (!isset($resp['result']) || $resp['result']['code'] != 200) { 1092 return $output; 1093 } 1094 $result = $resp['data']['objects']; 1095 return array_merge($output, $result); 1096 } 1097 return $output; 1061 1098 } 1062 1099 -
shipany/trunk/includes/abstract-shipany-wc-order.php
r3218747 r3225923 217 217 'self_drop_off' => $self_drop_off, 218 218 'package_weight' => $_POST['packageWeight'], 219 'location_uid' => $_POST['location_uid'], 220 'incoterms' => $_POST['incoterms'], 219 221 )); 220 222 … … 803 805 'value' => wp_create_nonce( 'create-shipany-label' ) 804 806 ) ); 807 808 $cross_boarder_map = array(); 809 810 $pr_shipany_merchant_location = $obj->get_meta('pr_shipany_merchant_location'); 811 812 woocommerce_wp_select(array( 813 'id' => 'pr_shipany_merchant_location', 814 'label' => __('Merchant Location', 'shipany'), 815 'options' => array_reduce(ShipanyHelper::get_merchant_locations(true), function($acc, $location) use (&$cross_boarder_map, $obj) { 816 $acc[$location['uid']] = $location['name'] . (@$location['address_line'] ? ' (' . $location['address_line'] . ')' : ''); 817 if($location['country'] != CommonUtils::convert_country_code($obj->get_address('shipping')['country'])) { 818 $cross_boarder_map[] = $location['uid']; 819 } 820 return $acc; 821 }, array()), 822 'value' => $pr_shipany_merchant_location, 823 'custom_attributes' => array( 824 'data-cross-boarder-map' => json_encode($cross_boarder_map), 825 'onchange' => 'document.getElementById("pr_shipany_incoterms").parentElement.style.display = (this.dataset.crossBoarderMap ? JSON.parse(this.dataset.crossBoarderMap).includes(this.value) : false) ? "block" : "none";' 826 ) 827 )); 828 829 woocommerce_wp_select(array( 830 'id' => 'pr_shipany_incoterms', 831 'label' => __('Duty Type', 'shipany'), 832 'options' => array( 833 'DDP' => __('DDP - Delivered Duty Paid', 'shipany'), 834 'DDU' => __('DDU - Delivered Duty Unpaid', 'shipany') 835 ) 836 )); 837 838 echo '<script>document.getElementById("pr_shipany_incoterms").parentElement.style.display = (document.getElementById("pr_shipany_merchant_location").dataset.crossBoarderMap ? JSON.parse(document.getElementById("pr_shipany_merchant_location").dataset.crossBoarderMap).includes(document.getElementById("pr_shipany_merchant_location").value) : false) ? "block" : "none";</script>'; 805 839 806 840 woocommerce_wp_select ( array( … … 1350 1384 'paid_by_rcvr' => isset($_POST['pr_shipany_paid_by_rec']) && $_POST['pr_shipany_paid_by_rec'] == 'yes', 1351 1385 'self_drop_off' => isset($_POST['pr_shipany_self_drop_off']) && $_POST['pr_shipany_self_drop_off'] == 'yes', 1386 'package_weight' => $_POST['shipany_weight'], 1387 'location_uid' => $_POST['pr_shipany_merchant_location'], 1388 'incoterms' => $_POST['pr_shipany_incoterms'], 1352 1389 )); 1353 1390 // $args = apply_filters('shipping_shipany_label_args', $args, $order_id ); -
shipany/trunk/includes/class-shipany-wc-method-ecs-asia.php
r3105502 r3225923 511 511 'class' => 'wc-enhanced-select' 512 512 ); 513 514 // $default_location = array( 515 // 'title' => __( 'Default Location', 'shipany' ), 516 // 'type' => 'select', 517 // 'description' => __( 'Please select the default location.', 'shipany' ), 518 // 'desc_tip' => true, 519 // 'options' => array_reduce(ShipanyHelper::get_merchant_locations(true), function($acc, $location) { 520 // $acc[$location['uid']] = $location['name']; 521 // return $acc; 522 // }, array()), 523 // 'class' => 'wc-enhanced-select' 524 // ); 525 513 526 $paid_by_rec = array( 514 527 'title' => __( 'Paid by Receiver', 'shipany' ), … … 527 540 ); 528 541 542 $ddp_or_ddu = array( 543 'title' => __( 'Duty Type (Only applicable for international shipment)', 'shipany' ), 544 'type' => 'select', 545 'description' => __( 'Please select DDP (Delivered Duty Paid) or DDU (Delivered Duty Unpaid). For DDP, import duty and taxes are paid by sender. For DDU, import duty and taxes are paid by receiver.', 'shipany' ), 546 'desc_tip' => true, 547 'options' => array( 548 'DDP' => __('DDP - Delivered Duty Paid', 'shipany'), 549 'DDU' => __('DDU - Delivered Duty Unpaid', 'shipany') 550 ), 551 'default' => 'DDP', 552 'class' => 'wc-enhanced-select' 553 ); 554 529 555 $this->form_fields = array_slice($this->form_fields, 0, 7, true) + array( 530 556 "shipany_default_courier_additional_service" => $default_courier_additional_service, 557 // "shipany_default_location" => $default_location, 531 558 "shipany_paid_by_rec" => $paid_by_rec, 532 559 "shipany_self_drop_off" => $self_drop_off, 560 "shipany_incoterms" => $ddp_or_ddu, 533 561 "shipany_rest_token" => $get_token, 534 562 "shipany_enable_locker_list" => $insert_locker_setting1, -
shipany/trunk/lang/shipany-zh_HK.po
r3105502 r3225923 867 867 msgid "Self Drop-off:" 868 868 msgstr "自寄:" 869 870 msgid "DDP - Delivered Duty Paid" 871 msgstr "DDP - 寄方支付清關費用" 872 873 msgid "DDU - Delivered Duty Unpaid" 874 msgstr "DDU - 收件方支付清關費用" 875 876 msgid "Default Location" 877 msgstr "預設地址" -
shipany/trunk/lang/shipany-zh_TW.po
r3105502 r3225923 867 867 msgid "Self Drop-off:" 868 868 msgstr "自寄:" 869 870 msgid "DDP - Delivered Duty Paid" 871 msgstr "DDP - 寄方支付清關費用" 872 873 msgid "DDU - Delivered Duty Unpaid" 874 msgstr "DDU - 收件方支付清關費用" 875 876 msgid "Default Location" 877 msgstr "預設地址" -
shipany/trunk/readme.txt
r3218878 r3225923 4 4 Requires at least: 4.1 5 5 Tested up to: 6.7.1 6 Stable tag: 1.1.6 46 Stable tag: 1.1.65 7 7 Requires PHP: 5.6 8 8 License: GPLv2 or later … … 71 71 == Changelog == 72 72 73 = 1.1.65 = 74 - Added merchant location 75 - Added incoterms support 76 73 77 = 1.1.64 = 74 78 - Added Support for Thailand Region -
shipany/trunk/shipany-woocommerce.php
r3218747 r3225923 7 7 Plugin URI: http://wordpress.org/plugins/shipany 8 8 Description: ShipAny one-stop logistics platform interconnects WooCommerce to multiple logistics service providers (including SF Express, Kerry Express, SF Cold-Chain, Alfred Locker, Hongkong Post, SF Locker, Convenience Store, etc.) so merchants can enjoy full-set features of logistics automation which disrupt the manual logistics process and bring E-Commerce to new generation. 9 Version: 1.1.6 49 Version: 1.1.65 10 10 Author: ShipAny 11 11 Author URI: https://www.shipany.io … … 690 690 class SHIPANY_WC { 691 691 public static $list; 692 private $version = "1.1.6 4";692 private $version = "1.1.65"; 693 693 694 694 protected static $_instance = null;
Note: See TracChangeset
for help on using the changeset viewer.