Plugin Directory

Changeset 3486334


Ignore:
Timestamp:
03/19/2026 10:22:41 AM (13 days ago)
Author:
enituretechnology
Message:

1.2.12 - 2026-03-19

  • Update: Added Nested material feature to the plugin to optimize packing.

Ticket 42492788652

Location:
ltl-freight-quotes-tql-edition
Files:
8 added
18 edited
1 copied

Legend:

Unmodified
Added
Removed
  • ltl-freight-quotes-tql-edition/tags/1.2.12/admin/product/en-product-detail.php

    r3454346 r3486334  
    3434                $this->en_tql_check_if_woo_payment_and_subscription_plugin_installed();
    3535                // Add simple product fields
    36                 add_action('woocommerce_product_options_shipping', [$this, 'en_show_product_fields'], 101, 3);
    37                 add_action('woocommerce_process_product_meta', [$this, 'en_save_product_fields'], 101, 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);
    3838
    3939                // Add variable product fields.
    40                 add_action('woocommerce_product_after_variable_attributes', [$this, 'en_show_product_fields'], 101, 3);
    41                 add_action('woocommerce_save_product_variation', [$this, 'en_save_product_fields'], 101, 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);
    4242
    4343                // Check compatible with our old eniture plugins.
  • ltl-freight-quotes-tql-edition/tags/1.2.12/common/en-app-load.php

    r2775282 r3486334  
    4545                new EnTqlOrderRates();
    4646                new EnTqlOrderScript();
     47                new \EnUpdateProductNestedOptions('hooks');
    4748                !class_exists('EnOrderWidget') ? new EnTqlOrderWidget() : '';
    4849                !class_exists('EnCsvExport') ? new EnTqlCsvExport() : '';
  • ltl-freight-quotes-tql-edition/tags/1.2.12/common/en-plans.php

    r3454346 r3486334  
    148148                'multi_dropships' => ['0', '1', '2', '3'],
    149149                'delivery_estimate_option' => ['1', '2', '3'],
    150                 'order_cutt_off_time' => ['2', '3']
     150                'order_cutt_off_time' => ['2', '3'],
     151                'nested_material' => ['3'],
    151152            ];
    152153
  • ltl-freight-quotes-tql-edition/tags/1.2.12/en-install.php

    r3465519 r3486334  
    7373        ));
    7474
     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
    7580        wp_register_style('EnTqlLocationStyle', EN_TQL_DIR_FILE . '/admin/tab/location/assets/css/en-tql-location.css', false, '1.0.4');
    7681        wp_enqueue_style('EnTqlLocationStyle');
     
    7883        wp_register_style('EnTqlAdminCss', EN_TQL_DIR_FILE . '/admin/assets/en-tql-admin.css', false, '1.0.8');
    7984        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');
    8088
    8189         // Cuttoff Time
  • ltl-freight-quotes-tql-edition/tags/1.2.12/ltl-freight-quotes-tql-edition.php

    r3465519 r3486334  
    44 * Plugin URI: https://eniture.com/products/
    55 * Description: Dynamically retrieves your negotiated shipping rates from TQL and displays the results in the WooCommerce shopping cart.
    6  * Version: 1.2.11
     6 * Version: 1.2.12
    77 * Author: Eniture Technology
    88 * Author URI: http://eniture.com/
  • ltl-freight-quotes-tql-edition/tags/1.2.12/readme.txt

    r3465519 r3486334  
    44Requires at least: 6.4
    55Tested up to: 6.9
    6 Stable tag: 1.2.11
     6Stable tag: 1.2.12
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    147147== Changelog ==
    148148
     149= 1.2.12 - 2026-03-19 =
     150* Update: Added Nested material feature to the plugin to optimize packing.
     151
    149152= 1.2.11 - 2026-02-20 =
    150153* 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  
    3535        // Images for FDO
    3636        static public $en_fdo_image_urls = [];
     37        static public $has_nesting = false;
    3738
    3839        /**
     
    120121                        self::$parent_id = $parent_id = $variation->get_parent_id();
    121122                    }
     123
    122124                    $product_title = str_replace(array("'", '"'), '', esc_attr($product_data->get_name()));
    123125                    // Get product level markup value
     
    147149                        'fulfillment_offset_days' => $product_level_fulfillment_offset,
    148150                    ];
     151
     152                    $product_item = self::en_add_product_nesting_params($product_item);
    149153
    150154                    $product_weight = $product_item['lineItemWeight'];
     
    331335                self::$en_request = array_merge(self::$en_request, self::$receiver_address);
    332336                self::$en_request['instorPickupLocalDelEnable'] = self::$instore_pickup_local_delivery;
     337                self::$en_request['doNesting'] = self::$has_nesting ? 1 : '';
     338
    333339                if(isset(self::$en_request['shipment_type']['LTL_FREIGHT']) || isset(self::$en_request['shipment_type']['LTL_SMALL'])) {
    334340                    self::$en_request['shipment_type'] = (isset(self::$en_request['LTL_FREIGHT'])) ?
     
    336342                        self::$en_request['shipment_type']['LTL_SMALL'];
    337343                }
    338 
    339344            }
    340345
     
    715720            return '';
    716721        }
     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        }
    717763    }
    718764
  • ltl-freight-quotes-tql-edition/tags/1.2.12/vendor/composer/autoload_classmap.php

    r2791706 r3486334  
    3333    'EnTqlPlans\\EnTqlPlans' => $baseDir . '/common/en-plans.php',
    3434    'EnTqlProductDetail\\EnTqlProductDetail' => $baseDir . '/admin/product/en-product-detail.php',
     35    'EnUpdateProductNestedOptions' => $baseDir . '/admin/product/en-nesting-product-detail.php',
    3536    'EnTqlQuoteSettingsDetail\\EnTqlQuoteSettingsDetail' => $baseDir . '/server/common/en-quote-settings.php',
    3637    '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  
    3434        'EnTqlPlans\\EnTqlPlans' => __DIR__ . '/../..' . '/common/en-plans.php',
    3535        'EnTqlProductDetail\\EnTqlProductDetail' => __DIR__ . '/../..' . '/admin/product/en-product-detail.php',
     36        'EnUpdateProductNestedOptions' => __DIR__ . '/../..' . '/admin/product/en-nesting-product-detail.php',
    3637        'EnTqlQuoteSettingsDetail\\EnTqlQuoteSettingsDetail' => __DIR__ . '/../..' . '/server/common/en-quote-settings.php',
    3738        '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  
    3434                $this->en_tql_check_if_woo_payment_and_subscription_plugin_installed();
    3535                // Add simple product fields
    36                 add_action('woocommerce_product_options_shipping', [$this, 'en_show_product_fields'], 101, 3);
    37                 add_action('woocommerce_process_product_meta', [$this, 'en_save_product_fields'], 101, 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);
    3838
    3939                // Add variable product fields.
    40                 add_action('woocommerce_product_after_variable_attributes', [$this, 'en_show_product_fields'], 101, 3);
    41                 add_action('woocommerce_save_product_variation', [$this, 'en_save_product_fields'], 101, 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);
    4242
    4343                // Check compatible with our old eniture plugins.
  • ltl-freight-quotes-tql-edition/trunk/common/en-app-load.php

    r2775282 r3486334  
    4545                new EnTqlOrderRates();
    4646                new EnTqlOrderScript();
     47                new \EnUpdateProductNestedOptions('hooks');
    4748                !class_exists('EnOrderWidget') ? new EnTqlOrderWidget() : '';
    4849                !class_exists('EnCsvExport') ? new EnTqlCsvExport() : '';
  • ltl-freight-quotes-tql-edition/trunk/common/en-plans.php

    r3454346 r3486334  
    148148                'multi_dropships' => ['0', '1', '2', '3'],
    149149                'delivery_estimate_option' => ['1', '2', '3'],
    150                 'order_cutt_off_time' => ['2', '3']
     150                'order_cutt_off_time' => ['2', '3'],
     151                'nested_material' => ['3'],
    151152            ];
    152153
  • ltl-freight-quotes-tql-edition/trunk/en-install.php

    r3465519 r3486334  
    7373        ));
    7474
     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
    7580        wp_register_style('EnTqlLocationStyle', EN_TQL_DIR_FILE . '/admin/tab/location/assets/css/en-tql-location.css', false, '1.0.4');
    7681        wp_enqueue_style('EnTqlLocationStyle');
     
    7883        wp_register_style('EnTqlAdminCss', EN_TQL_DIR_FILE . '/admin/assets/en-tql-admin.css', false, '1.0.8');
    7984        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');
    8088
    8189         // Cuttoff Time
  • ltl-freight-quotes-tql-edition/trunk/ltl-freight-quotes-tql-edition.php

    r3465519 r3486334  
    44 * Plugin URI: https://eniture.com/products/
    55 * Description: Dynamically retrieves your negotiated shipping rates from TQL and displays the results in the WooCommerce shopping cart.
    6  * Version: 1.2.11
     6 * Version: 1.2.12
    77 * Author: Eniture Technology
    88 * Author URI: http://eniture.com/
  • ltl-freight-quotes-tql-edition/trunk/readme.txt

    r3465519 r3486334  
    44Requires at least: 6.4
    55Tested up to: 6.9
    6 Stable tag: 1.2.11
     6Stable tag: 1.2.12
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    147147== Changelog ==
    148148
     149= 1.2.12 - 2026-03-19 =
     150* Update: Added Nested material feature to the plugin to optimize packing.
     151
    149152= 1.2.11 - 2026-02-20 =
    150153* 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  
    3535        // Images for FDO
    3636        static public $en_fdo_image_urls = [];
     37        static public $has_nesting = false;
    3738
    3839        /**
     
    120121                        self::$parent_id = $parent_id = $variation->get_parent_id();
    121122                    }
     123
    122124                    $product_title = str_replace(array("'", '"'), '', esc_attr($product_data->get_name()));
    123125                    // Get product level markup value
     
    147149                        'fulfillment_offset_days' => $product_level_fulfillment_offset,
    148150                    ];
     151
     152                    $product_item = self::en_add_product_nesting_params($product_item);
    149153
    150154                    $product_weight = $product_item['lineItemWeight'];
     
    331335                self::$en_request = array_merge(self::$en_request, self::$receiver_address);
    332336                self::$en_request['instorPickupLocalDelEnable'] = self::$instore_pickup_local_delivery;
     337                self::$en_request['doNesting'] = self::$has_nesting ? 1 : '';
     338
    333339                if(isset(self::$en_request['shipment_type']['LTL_FREIGHT']) || isset(self::$en_request['shipment_type']['LTL_SMALL'])) {
    334340                    self::$en_request['shipment_type'] = (isset(self::$en_request['LTL_FREIGHT'])) ?
     
    336342                        self::$en_request['shipment_type']['LTL_SMALL'];
    337343                }
    338 
    339344            }
    340345
     
    715720            return '';
    716721        }
     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        }
    717763    }
    718764
  • ltl-freight-quotes-tql-edition/trunk/vendor/composer/autoload_classmap.php

    r2791706 r3486334  
    3333    'EnTqlPlans\\EnTqlPlans' => $baseDir . '/common/en-plans.php',
    3434    'EnTqlProductDetail\\EnTqlProductDetail' => $baseDir . '/admin/product/en-product-detail.php',
     35    'EnUpdateProductNestedOptions' => $baseDir . '/admin/product/en-nesting-product-detail.php',
    3536    'EnTqlQuoteSettingsDetail\\EnTqlQuoteSettingsDetail' => $baseDir . '/server/common/en-quote-settings.php',
    3637    'EnTqlQuoteSettings\\EnTqlQuoteSettings' => $baseDir . '/admin/tab/quote-settings/en-quote-settings.php',
  • ltl-freight-quotes-tql-edition/trunk/vendor/composer/autoload_static.php

    r2791706 r3486334  
    3434        'EnTqlPlans\\EnTqlPlans' => __DIR__ . '/../..' . '/common/en-plans.php',
    3535        'EnTqlProductDetail\\EnTqlProductDetail' => __DIR__ . '/../..' . '/admin/product/en-product-detail.php',
     36        'EnUpdateProductNestedOptions' => __DIR__ . '/../..' . '/admin/product/en-nesting-product-detail.php',
    3637        'EnTqlQuoteSettingsDetail\\EnTqlQuoteSettingsDetail' => __DIR__ . '/../..' . '/server/common/en-quote-settings.php',
    3738        'EnTqlQuoteSettings\\EnTqlQuoteSettings' => __DIR__ . '/../..' . '/admin/tab/quote-settings/en-quote-settings.php',
Note: See TracChangeset for help on using the changeset viewer.