Changeset 3486334
- Timestamp:
- 03/19/2026 10:22:41 AM (13 days ago)
- Location:
- ltl-freight-quotes-tql-edition
- Files:
-
- 8 added
- 18 edited
- 1 copied
-
tags/1.2.12 (copied) (copied from ltl-freight-quotes-tql-edition/trunk)
-
tags/1.2.12/admin/product/assets (added)
-
tags/1.2.12/admin/product/assets/en-custom-fields-style.css (added)
-
tags/1.2.12/admin/product/assets/en-custom-fields.js (added)
-
tags/1.2.12/admin/product/en-nesting-product-detail.php (added)
-
tags/1.2.12/admin/product/en-product-detail.php (modified) (1 diff)
-
tags/1.2.12/common/en-app-load.php (modified) (1 diff)
-
tags/1.2.12/common/en-plans.php (modified) (1 diff)
-
tags/1.2.12/en-install.php (modified) (2 diffs)
-
tags/1.2.12/ltl-freight-quotes-tql-edition.php (modified) (1 diff)
-
tags/1.2.12/readme.txt (modified) (2 diffs)
-
tags/1.2.12/server/package/en-package.php (modified) (6 diffs)
-
tags/1.2.12/vendor/composer/autoload_classmap.php (modified) (1 diff)
-
tags/1.2.12/vendor/composer/autoload_static.php (modified) (1 diff)
-
trunk/admin/product/assets (added)
-
trunk/admin/product/assets/en-custom-fields-style.css (added)
-
trunk/admin/product/assets/en-custom-fields.js (added)
-
trunk/admin/product/en-nesting-product-detail.php (added)
-
trunk/admin/product/en-product-detail.php (modified) (1 diff)
-
trunk/common/en-app-load.php (modified) (1 diff)
-
trunk/common/en-plans.php (modified) (1 diff)
-
trunk/en-install.php (modified) (2 diffs)
-
trunk/ltl-freight-quotes-tql-edition.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/server/package/en-package.php (modified) (6 diffs)
-
trunk/vendor/composer/autoload_classmap.php (modified) (1 diff)
-
trunk/vendor/composer/autoload_static.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ltl-freight-quotes-tql-edition/tags/1.2.12/admin/product/en-product-detail.php
r3454346 r3486334 34 34 $this->en_tql_check_if_woo_payment_and_subscription_plugin_installed(); 35 35 // Add simple product fields 36 add_action('woocommerce_product_options_shipping', [$this, 'en_show_product_fields'], 10 1, 3);37 add_action('woocommerce_process_product_meta', [$this, 'en_save_product_fields'], 10 1, 1);36 add_action('woocommerce_product_options_shipping', [$this, 'en_show_product_fields'], 100, 3); 37 add_action('woocommerce_process_product_meta', [$this, 'en_save_product_fields'], 100, 1); 38 38 39 39 // Add variable product fields. 40 add_action('woocommerce_product_after_variable_attributes', [$this, 'en_show_product_fields'], 10 1, 3);41 add_action('woocommerce_save_product_variation', [$this, 'en_save_product_fields'], 10 1, 1);40 add_action('woocommerce_product_after_variable_attributes', [$this, 'en_show_product_fields'], 100, 3); 41 add_action('woocommerce_save_product_variation', [$this, 'en_save_product_fields'], 100, 1); 42 42 43 43 // Check compatible with our old eniture plugins. -
ltl-freight-quotes-tql-edition/tags/1.2.12/common/en-app-load.php
r2775282 r3486334 45 45 new EnTqlOrderRates(); 46 46 new EnTqlOrderScript(); 47 new \EnUpdateProductNestedOptions('hooks'); 47 48 !class_exists('EnOrderWidget') ? new EnTqlOrderWidget() : ''; 48 49 !class_exists('EnCsvExport') ? new EnTqlCsvExport() : ''; -
ltl-freight-quotes-tql-edition/tags/1.2.12/common/en-plans.php
r3454346 r3486334 148 148 'multi_dropships' => ['0', '1', '2', '3'], 149 149 'delivery_estimate_option' => ['1', '2', '3'], 150 'order_cutt_off_time' => ['2', '3'] 150 'order_cutt_off_time' => ['2', '3'], 151 'nested_material' => ['3'], 151 152 ]; 152 153 -
ltl-freight-quotes-tql-edition/tags/1.2.12/en-install.php
r3465519 r3486334 73 73 )); 74 74 75 wp_enqueue_script('EnTqlProductScript', EN_TQL_DIR_FILE . '/admin/product/assets/en-custom-fields.js', [], '1.0.1'); 76 wp_localize_script('EnTqlProductScript', 'script', array( 77 'pluginsUrl' => EN_TQL_PLUGIN_URL, 78 )); 79 75 80 wp_register_style('EnTqlLocationStyle', EN_TQL_DIR_FILE . '/admin/tab/location/assets/css/en-tql-location.css', false, '1.0.4'); 76 81 wp_enqueue_style('EnTqlLocationStyle'); … … 78 83 wp_register_style('EnTqlAdminCss', EN_TQL_DIR_FILE . '/admin/assets/en-tql-admin.css', false, '1.0.8'); 79 84 wp_enqueue_style('EnTqlAdminCss'); 85 86 wp_register_style('EnTqlProductCss', EN_TQL_DIR_FILE . '/admin/product/assets/en-custom-fields-style.css', false, '1.0.2'); 87 wp_enqueue_style('EnTqlProductCss'); 80 88 81 89 // Cuttoff Time -
ltl-freight-quotes-tql-edition/tags/1.2.12/ltl-freight-quotes-tql-edition.php
r3465519 r3486334 4 4 * Plugin URI: https://eniture.com/products/ 5 5 * Description: Dynamically retrieves your negotiated shipping rates from TQL and displays the results in the WooCommerce shopping cart. 6 * Version: 1.2.1 16 * Version: 1.2.12 7 7 * Author: Eniture Technology 8 8 * Author URI: http://eniture.com/ -
ltl-freight-quotes-tql-edition/tags/1.2.12/readme.txt
r3465519 r3486334 4 4 Requires at least: 6.4 5 5 Tested up to: 6.9 6 Stable tag: 1.2.1 16 Stable tag: 1.2.12 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 147 147 == Changelog == 148 148 149 = 1.2.12 - 2026-03-19 = 150 * Update: Added Nested material feature to the plugin to optimize packing. 151 149 152 = 1.2.11 - 2026-02-20 = 150 153 * Update: Added a dropdown setting to support both Legacy API and New API selection within the plugin settings. -
ltl-freight-quotes-tql-edition/tags/1.2.12/server/package/en-package.php
r3465519 r3486334 35 35 // Images for FDO 36 36 static public $en_fdo_image_urls = []; 37 static public $has_nesting = false; 37 38 38 39 /** … … 120 121 self::$parent_id = $parent_id = $variation->get_parent_id(); 121 122 } 123 122 124 $product_title = str_replace(array("'", '"'), '', esc_attr($product_data->get_name())); 123 125 // Get product level markup value … … 147 149 'fulfillment_offset_days' => $product_level_fulfillment_offset, 148 150 ]; 151 152 $product_item = self::en_add_product_nesting_params($product_item); 149 153 150 154 $product_weight = $product_item['lineItemWeight']; … … 331 335 self::$en_request = array_merge(self::$en_request, self::$receiver_address); 332 336 self::$en_request['instorPickupLocalDelEnable'] = self::$instore_pickup_local_delivery; 337 self::$en_request['doNesting'] = self::$has_nesting ? 1 : ''; 338 333 339 if(isset(self::$en_request['shipment_type']['LTL_FREIGHT']) || isset(self::$en_request['shipment_type']['LTL_SMALL'])) { 334 340 self::$en_request['shipment_type'] = (isset(self::$en_request['LTL_FREIGHT'])) ? … … 336 342 self::$en_request['shipment_type']['LTL_SMALL']; 337 343 } 338 339 344 } 340 345 … … 715 720 return ''; 716 721 } 722 723 static public function en_add_product_nesting_params($product_item) 724 { 725 $tql_plan = get_option('en_tql_plan_number'); 726 if ($tql_plan < 3) return $product_item; 727 728 $nested_mat = get_post_meta(self::$post_id, '_nestedMaterials'); 729 $post_id = self::$post_id; 730 if (isset($nested_mat[0]) && empty($nested_mat[0]) && self::$parent_id != self::$post_id) { 731 $nested_mat = get_post_meta(self::$parent_id, '_nestedMaterials'); 732 $post_id = self::$parent_id; 733 } 734 735 $do_nesting = isset($nested_mat[0]) && $nested_mat[0] == 'yes' ? 1 : 0; 736 737 // return $product_item if nested materials is not enabled 738 if (!$do_nesting) return $product_item; 739 740 self::$has_nesting = $do_nesting; 741 $nested_percentage = get_post_meta($post_id, '_nestedPercentage'); 742 $product_item['nestingPercentage'] = !empty($nested_percentage) ? $nested_percentage[0] : 0; 743 744 $nested_dimension = get_post_meta($post_id, '_nestedDimension'); 745 if (isset($nested_dimension[0]) && empty($nested_dimension[0]) && self::$parent_id != self::$post_id) { 746 $nested_dimension = get_post_meta(self::$parent_id, '_nestedDimension'); 747 } 748 749 $product_item['nestingDimension'] = !empty($nested_dimension) ? $nested_dimension[0] : 0; 750 751 $max_nested_item = get_post_meta($post_id, '_maxNestedItems'); 752 if (isset($max_nested_item[0]) && empty($max_nested_item[0]) && self::$parent_id != self::$post_id) { 753 $max_nested_item = get_post_meta(self::$parent_id, '_maxNestedItems'); 754 } 755 756 $product_item['nestedLimit'] = !empty($max_nested_item) ? $max_nested_item[0] : 0; 757 758 $nested_staking_property = get_post_meta($post_id, '_nestedStakingProperty'); 759 $product_item['nestedStackProperty'] = !empty($nested_staking_property) ? $nested_staking_property[0] : 0; 760 761 return $product_item; 762 } 717 763 } 718 764 -
ltl-freight-quotes-tql-edition/tags/1.2.12/vendor/composer/autoload_classmap.php
r2791706 r3486334 33 33 'EnTqlPlans\\EnTqlPlans' => $baseDir . '/common/en-plans.php', 34 34 'EnTqlProductDetail\\EnTqlProductDetail' => $baseDir . '/admin/product/en-product-detail.php', 35 'EnUpdateProductNestedOptions' => $baseDir . '/admin/product/en-nesting-product-detail.php', 35 36 'EnTqlQuoteSettingsDetail\\EnTqlQuoteSettingsDetail' => $baseDir . '/server/common/en-quote-settings.php', 36 37 'EnTqlQuoteSettings\\EnTqlQuoteSettings' => $baseDir . '/admin/tab/quote-settings/en-quote-settings.php', -
ltl-freight-quotes-tql-edition/tags/1.2.12/vendor/composer/autoload_static.php
r2791706 r3486334 34 34 'EnTqlPlans\\EnTqlPlans' => __DIR__ . '/../..' . '/common/en-plans.php', 35 35 'EnTqlProductDetail\\EnTqlProductDetail' => __DIR__ . '/../..' . '/admin/product/en-product-detail.php', 36 'EnUpdateProductNestedOptions' => __DIR__ . '/../..' . '/admin/product/en-nesting-product-detail.php', 36 37 'EnTqlQuoteSettingsDetail\\EnTqlQuoteSettingsDetail' => __DIR__ . '/../..' . '/server/common/en-quote-settings.php', 37 38 'EnTqlQuoteSettings\\EnTqlQuoteSettings' => __DIR__ . '/../..' . '/admin/tab/quote-settings/en-quote-settings.php', -
ltl-freight-quotes-tql-edition/trunk/admin/product/en-product-detail.php
r3454346 r3486334 34 34 $this->en_tql_check_if_woo_payment_and_subscription_plugin_installed(); 35 35 // Add simple product fields 36 add_action('woocommerce_product_options_shipping', [$this, 'en_show_product_fields'], 10 1, 3);37 add_action('woocommerce_process_product_meta', [$this, 'en_save_product_fields'], 10 1, 1);36 add_action('woocommerce_product_options_shipping', [$this, 'en_show_product_fields'], 100, 3); 37 add_action('woocommerce_process_product_meta', [$this, 'en_save_product_fields'], 100, 1); 38 38 39 39 // Add variable product fields. 40 add_action('woocommerce_product_after_variable_attributes', [$this, 'en_show_product_fields'], 10 1, 3);41 add_action('woocommerce_save_product_variation', [$this, 'en_save_product_fields'], 10 1, 1);40 add_action('woocommerce_product_after_variable_attributes', [$this, 'en_show_product_fields'], 100, 3); 41 add_action('woocommerce_save_product_variation', [$this, 'en_save_product_fields'], 100, 1); 42 42 43 43 // Check compatible with our old eniture plugins. -
ltl-freight-quotes-tql-edition/trunk/common/en-app-load.php
r2775282 r3486334 45 45 new EnTqlOrderRates(); 46 46 new EnTqlOrderScript(); 47 new \EnUpdateProductNestedOptions('hooks'); 47 48 !class_exists('EnOrderWidget') ? new EnTqlOrderWidget() : ''; 48 49 !class_exists('EnCsvExport') ? new EnTqlCsvExport() : ''; -
ltl-freight-quotes-tql-edition/trunk/common/en-plans.php
r3454346 r3486334 148 148 'multi_dropships' => ['0', '1', '2', '3'], 149 149 'delivery_estimate_option' => ['1', '2', '3'], 150 'order_cutt_off_time' => ['2', '3'] 150 'order_cutt_off_time' => ['2', '3'], 151 'nested_material' => ['3'], 151 152 ]; 152 153 -
ltl-freight-quotes-tql-edition/trunk/en-install.php
r3465519 r3486334 73 73 )); 74 74 75 wp_enqueue_script('EnTqlProductScript', EN_TQL_DIR_FILE . '/admin/product/assets/en-custom-fields.js', [], '1.0.1'); 76 wp_localize_script('EnTqlProductScript', 'script', array( 77 'pluginsUrl' => EN_TQL_PLUGIN_URL, 78 )); 79 75 80 wp_register_style('EnTqlLocationStyle', EN_TQL_DIR_FILE . '/admin/tab/location/assets/css/en-tql-location.css', false, '1.0.4'); 76 81 wp_enqueue_style('EnTqlLocationStyle'); … … 78 83 wp_register_style('EnTqlAdminCss', EN_TQL_DIR_FILE . '/admin/assets/en-tql-admin.css', false, '1.0.8'); 79 84 wp_enqueue_style('EnTqlAdminCss'); 85 86 wp_register_style('EnTqlProductCss', EN_TQL_DIR_FILE . '/admin/product/assets/en-custom-fields-style.css', false, '1.0.2'); 87 wp_enqueue_style('EnTqlProductCss'); 80 88 81 89 // Cuttoff Time -
ltl-freight-quotes-tql-edition/trunk/ltl-freight-quotes-tql-edition.php
r3465519 r3486334 4 4 * Plugin URI: https://eniture.com/products/ 5 5 * Description: Dynamically retrieves your negotiated shipping rates from TQL and displays the results in the WooCommerce shopping cart. 6 * Version: 1.2.1 16 * Version: 1.2.12 7 7 * Author: Eniture Technology 8 8 * Author URI: http://eniture.com/ -
ltl-freight-quotes-tql-edition/trunk/readme.txt
r3465519 r3486334 4 4 Requires at least: 6.4 5 5 Tested up to: 6.9 6 Stable tag: 1.2.1 16 Stable tag: 1.2.12 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 147 147 == Changelog == 148 148 149 = 1.2.12 - 2026-03-19 = 150 * Update: Added Nested material feature to the plugin to optimize packing. 151 149 152 = 1.2.11 - 2026-02-20 = 150 153 * Update: Added a dropdown setting to support both Legacy API and New API selection within the plugin settings. -
ltl-freight-quotes-tql-edition/trunk/server/package/en-package.php
r3465519 r3486334 35 35 // Images for FDO 36 36 static public $en_fdo_image_urls = []; 37 static public $has_nesting = false; 37 38 38 39 /** … … 120 121 self::$parent_id = $parent_id = $variation->get_parent_id(); 121 122 } 123 122 124 $product_title = str_replace(array("'", '"'), '', esc_attr($product_data->get_name())); 123 125 // Get product level markup value … … 147 149 'fulfillment_offset_days' => $product_level_fulfillment_offset, 148 150 ]; 151 152 $product_item = self::en_add_product_nesting_params($product_item); 149 153 150 154 $product_weight = $product_item['lineItemWeight']; … … 331 335 self::$en_request = array_merge(self::$en_request, self::$receiver_address); 332 336 self::$en_request['instorPickupLocalDelEnable'] = self::$instore_pickup_local_delivery; 337 self::$en_request['doNesting'] = self::$has_nesting ? 1 : ''; 338 333 339 if(isset(self::$en_request['shipment_type']['LTL_FREIGHT']) || isset(self::$en_request['shipment_type']['LTL_SMALL'])) { 334 340 self::$en_request['shipment_type'] = (isset(self::$en_request['LTL_FREIGHT'])) ? … … 336 342 self::$en_request['shipment_type']['LTL_SMALL']; 337 343 } 338 339 344 } 340 345 … … 715 720 return ''; 716 721 } 722 723 static public function en_add_product_nesting_params($product_item) 724 { 725 $tql_plan = get_option('en_tql_plan_number'); 726 if ($tql_plan < 3) return $product_item; 727 728 $nested_mat = get_post_meta(self::$post_id, '_nestedMaterials'); 729 $post_id = self::$post_id; 730 if (isset($nested_mat[0]) && empty($nested_mat[0]) && self::$parent_id != self::$post_id) { 731 $nested_mat = get_post_meta(self::$parent_id, '_nestedMaterials'); 732 $post_id = self::$parent_id; 733 } 734 735 $do_nesting = isset($nested_mat[0]) && $nested_mat[0] == 'yes' ? 1 : 0; 736 737 // return $product_item if nested materials is not enabled 738 if (!$do_nesting) return $product_item; 739 740 self::$has_nesting = $do_nesting; 741 $nested_percentage = get_post_meta($post_id, '_nestedPercentage'); 742 $product_item['nestingPercentage'] = !empty($nested_percentage) ? $nested_percentage[0] : 0; 743 744 $nested_dimension = get_post_meta($post_id, '_nestedDimension'); 745 if (isset($nested_dimension[0]) && empty($nested_dimension[0]) && self::$parent_id != self::$post_id) { 746 $nested_dimension = get_post_meta(self::$parent_id, '_nestedDimension'); 747 } 748 749 $product_item['nestingDimension'] = !empty($nested_dimension) ? $nested_dimension[0] : 0; 750 751 $max_nested_item = get_post_meta($post_id, '_maxNestedItems'); 752 if (isset($max_nested_item[0]) && empty($max_nested_item[0]) && self::$parent_id != self::$post_id) { 753 $max_nested_item = get_post_meta(self::$parent_id, '_maxNestedItems'); 754 } 755 756 $product_item['nestedLimit'] = !empty($max_nested_item) ? $max_nested_item[0] : 0; 757 758 $nested_staking_property = get_post_meta($post_id, '_nestedStakingProperty'); 759 $product_item['nestedStackProperty'] = !empty($nested_staking_property) ? $nested_staking_property[0] : 0; 760 761 return $product_item; 762 } 717 763 } 718 764 -
ltl-freight-quotes-tql-edition/trunk/vendor/composer/autoload_classmap.php
r2791706 r3486334 33 33 'EnTqlPlans\\EnTqlPlans' => $baseDir . '/common/en-plans.php', 34 34 'EnTqlProductDetail\\EnTqlProductDetail' => $baseDir . '/admin/product/en-product-detail.php', 35 'EnUpdateProductNestedOptions' => $baseDir . '/admin/product/en-nesting-product-detail.php', 35 36 'EnTqlQuoteSettingsDetail\\EnTqlQuoteSettingsDetail' => $baseDir . '/server/common/en-quote-settings.php', 36 37 'EnTqlQuoteSettings\\EnTqlQuoteSettings' => $baseDir . '/admin/tab/quote-settings/en-quote-settings.php', -
ltl-freight-quotes-tql-edition/trunk/vendor/composer/autoload_static.php
r2791706 r3486334 34 34 'EnTqlPlans\\EnTqlPlans' => __DIR__ . '/../..' . '/common/en-plans.php', 35 35 'EnTqlProductDetail\\EnTqlProductDetail' => __DIR__ . '/../..' . '/admin/product/en-product-detail.php', 36 'EnUpdateProductNestedOptions' => __DIR__ . '/../..' . '/admin/product/en-nesting-product-detail.php', 36 37 'EnTqlQuoteSettingsDetail\\EnTqlQuoteSettingsDetail' => __DIR__ . '/../..' . '/server/common/en-quote-settings.php', 37 38 'EnTqlQuoteSettings\\EnTqlQuoteSettings' => __DIR__ . '/../..' . '/admin/tab/quote-settings/en-quote-settings.php',
Note: See TracChangeset
for help on using the changeset viewer.