Changeset 3366850
- Timestamp:
- 09/24/2025 03:40:47 AM (6 months ago)
- Location:
- a2z-ups-shipping
- Files:
-
- 31 added
- 4 edited
-
tags/4.4.0 (added)
-
tags/4.4.0/a2zups_basic.php (added)
-
tags/4.4.0/controllors (added)
-
tags/4.4.0/controllors/classes (added)
-
tags/4.4.0/controllors/classes/hit-box-packing.php (added)
-
tags/4.4.0/controllors/classes/index.php (added)
-
tags/4.4.0/controllors/classes/weight_pack (added)
-
tags/4.4.0/controllors/classes/weight_pack/class-hit-weight-packing-util.php (added)
-
tags/4.4.0/controllors/classes/weight_pack/class-hit-weight-packing.php (added)
-
tags/4.4.0/controllors/classes/weight_pack/class-hit-weight-strategy-ascend.php (added)
-
tags/4.4.0/controllors/classes/weight_pack/class-hit-weight-strategy-descend.php (added)
-
tags/4.4.0/controllors/classes/weight_pack/class-hit-weight-strategy-simple.php (added)
-
tags/4.4.0/controllors/classes/weight_pack/index.php (added)
-
tags/4.4.0/controllors/hit_ups_auto_init.php (added)
-
tags/4.4.0/controllors/index.php (added)
-
tags/4.4.0/controllors/ups_rest_main.php (added)
-
tags/4.4.0/controllors/views (added)
-
tags/4.4.0/controllors/views/hit_ups_automated_settings_view.php (added)
-
tags/4.4.0/controllors/views/ups_logo.png (added)
-
tags/4.4.0/controllors/xml (added)
-
tags/4.4.0/controllors/xml/email_temp.html (added)
-
tags/4.4.0/controllors/xml/index.php (added)
-
tags/4.4.0/controllors/xml/label.xml (added)
-
tags/4.4.0/controllors/xml/label_return.xml (added)
-
tags/4.4.0/controllors/xml/rate.xml (added)
-
tags/4.4.0/i18n (added)
-
tags/4.4.0/i18n/index.php (added)
-
tags/4.4.0/i18n/languages (added)
-
tags/4.4.0/i18n/languages/index.php (added)
-
tags/4.4.0/index.php (added)
-
tags/4.4.0/readme.txt (added)
-
trunk/a2zups_basic.php (modified) (4 diffs)
-
trunk/controllors/ups_rest_main.php (modified) (1 diff)
-
trunk/controllors/views/hit_ups_automated_settings_view.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
a2z-ups-shipping/trunk/a2zups_basic.php
r3361931 r3366850 5 5 * Plugin URI: https://a2zplugins.com/product/ups-express-shipping-with-label-printing/ 6 6 * Description: Realtime Shipping Rates, Shipping label, commercial invoice automation included. 7 * Version: 4. 3.97 * Version: 4.4.0 8 8 * Author: Shipi 9 9 * Author URI: https://myshipi.com/ … … 2021 2021 "wight_dim_unit" => $general_settings['hit_ups_auto_weight_unit'], 2022 2022 "plt" => ($general_settings['hit_ups_auto_ppt'] == 'yes') ? "Y" : "N", 2023 "simple_rate" => ($general_settings['hit_ups_auto_simple_rate'] == 'yes') ? "Y" : "N", 2023 2024 "airway_bill" => ($general_settings['hit_ups_auto_aabill'] == 'yes') ? "Y" : "N", 2024 2025 "sd" => ($general_settings['hit_ups_auto_sat'] == 'yes') ? "Y" : "N", … … 2364 2365 "wight_dim_unit" => $general_settings['hit_ups_auto_weight_unit'], 2365 2366 "plt" => ($general_settings['hit_ups_auto_ppt'] == 'yes') ? "Y" : "N", 2367 "simple_rate" => ($general_settings['hit_ups_auto_simple_rate'] == 'yes') ? "Y" : "N", 2366 2368 "airway_bill" => ($general_settings['hit_ups_auto_aabill'] == 'yes') ? "Y" : "N", 2367 2369 "sd" => ($general_settings['hit_ups_auto_sat'] == 'yes') ? "Y" : "N", … … 2783 2785 // "total_product_weg" => $total_weg, 2784 2786 "plt" => ($general_settings['hit_ups_auto_ppt'] == 'yes') ? "Y" : "N", 2787 "simple_rate" => ($general_settings['hit_ups_auto_simple_rate'] == 'yes') ? "Y" : "N", 2785 2788 "airway_bill" => ($general_settings['hit_ups_auto_aabill'] == 'yes') ? "Y" : "N", 2786 2789 "sd" => ($general_settings['hit_ups_auto_sat'] == 'yes') ? "Y" : "N", -
a2z-ups-shipping/trunk/controllors/ups_rest_main.php
r3079078 r3366850 115 115 foreach ($packs as $p_key => $pack) { 116 116 $curr_pack_info = []; 117 // Calculate Simple Rate 118 if (isset($general_settings['hit_ups_auto_simple_rate']) && $general_settings['hit_ups_auto_simple_rate'] == "yes") { 119 $length = isset($pack['Dimensions']['Length']) ? substr(number_format($pack['Dimensions']['Length'], 4), 0, 6) : "0.5000"; 120 $width = isset($pack['Dimensions']['Width']) ? substr(number_format($pack['Dimensions']['Width'], 4), 0, 6) : "0.5000"; 121 $height = isset($pack['Dimensions']['Height']) ? substr(number_format($pack['Dimensions']['Height'], 4), 0, 6) : "0.5000"; 122 $volume = $length * $width * $height; 123 if ($volume <= 100) { 124 $simple_rate_code = "XS"; 125 } elseif ($volume <= 250) { 126 $simple_rate_code = "S"; 127 } elseif ($volume <= 650) { 128 $simple_rate_code = "M"; 129 } elseif ($volume <= 1050) { 130 $simple_rate_code = "L"; 131 } else { 132 $simple_rate_code = "XL"; 133 } 134 $curr_pack_info['SimpleRate'] = [ 135 "Description" => "SimpleRateDescription", 136 "Code" => $simple_rate_code 137 ]; 138 } 139 117 140 $curr_pack_info['PackagingType'] = ["Code" => "02"]; 118 141 $curr_pack_info['PackageWeight']['UnitOfMeasurement'] = [ -
a2z-ups-shipping/trunk/controllors/views/hit_ups_automated_settings_view.php
r3223352 r3366850 639 639 $general_settings['hit_ups_auto_sat'] = sanitize_text_field(isset($_POST['hit_ups_auto_sat']) ? 'yes' :'no'); 640 640 $general_settings['hit_ups_auto_ppt'] = sanitize_text_field(isset($_POST['hit_ups_auto_ppt']) ? 'yes' :'no'); 641 $general_settings['hit_ups_auto_simple_rate'] = sanitize_text_field(isset($_POST['hit_ups_auto_simple_rate']) ? 'yes' :'no'); 641 642 $general_settings['hit_ups_auto_label_automation'] = sanitize_text_field(isset($_POST['hit_ups_auto_label_automation']) ? 'yes' :'no'); 642 643 $general_settings['hit_ups_add_shipping_invoice'] = sanitize_text_field(isset($_POST['hit_ups_add_shipping_invoice']) ? 'yes' :'no'); … … 1355 1356 <td><span style="float:right;padding-right:10px;"><input type="checkbox" name="hit_ups_add_shipping_invoice" <?php _e((isset($general_settings['hit_ups_add_shipping_invoice']) && $general_settings['hit_ups_add_shipping_invoice'] == 'yes') ? 'checked="true"' : '','hit_ups_auto'); ?> value="yes" ><small style="color:gray">Add Shipping Cost to invoice</small></span></td> 1356 1357 <td><span style="float:right;padding-right:10px;"><input type="checkbox" name="hit_ups_auto_ppt" <?php _e((isset($general_settings['hit_ups_auto_ppt']) && $general_settings['hit_ups_auto_ppt'] == 'yes') || ($initial_setup) ? 'checked="true"' : '','hit_ups_auto'); ?> value="yes" ><small style="color:gray"> Paperless Trade.</small></span></td> 1358 <td><span style="float:right;padding-right:10px;"><input type="checkbox" name="hit_ups_auto_simple_rate" <?php _e((isset($general_settings['hit_ups_auto_simple_rate']) && $general_settings['hit_ups_auto_simple_rate'] == 'yes') || ($initial_setup) ? 'checked="true"' : '','hit_ups_auto'); ?> value="yes" ><small style="color:gray"> Simple rate.</small></span></td> 1357 1359 </table> 1358 1360 -
a2z-ups-shipping/trunk/readme.txt
r3361931 r3366850 6 6 Tested up to: 6.8 7 7 Requires PHP: 5.6 8 Stable tag: 4. 3.98 Stable tag: 4.4.0 9 9 License: GPLv3 or later License 10 10 URI: http://www.gnu.org/licenses/gpl-3.0.html … … 97 97 98 98 == Changelog == 99 100 = 4.4.0 = 101 > Introduced Simple Rate support in the API for more flexible shipping costs. 102 99 103 = 4.3.9 = 100 104 > Fixed "Unsupported operand types" error.
Note: See TracChangeset
for help on using the changeset viewer.