Plugin Directory

Changeset 3453542


Ignore:
Timestamp:
02/04/2026 06:56:27 AM (8 weeks ago)
Author:
enituretechnology
Message:

2.4.17 - 2026-02-04

  • Fix: Resolved handling unit settings fields display conflict with other Eniture plugins on the product details page.

Ticket 40129264970

Location:
ltl-freight-quotes-freightquote-edition
Files:
10 edited
1 copied

Legend:

Unmodified
Added
Removed
  • ltl-freight-quotes-freightquote-edition/tags/2.4.17/fdo/en-fdo.php

    r3446938 r3453542  
    5050        $this->en_fdo_meta_data['items'] = [];
    5151        foreach ($items as $item_key => $item_data) {
    52             $nmfc_number = $productId = $productName = $productQty = $actualProductPrice = $products = $productPrice = $productWeight = $productLength = $productWidth = $productHeight = $ptype = $hazardousMaterial = $productType = $productSku = $productClass = $attributes = $variantId = $nestedMaterial = $nestedPercentage = $nestedDimension = $nestedItems = $stakingProperty = $ship_as_own_pallet = $vertical_rotation_for_pallet = '';
     52            $nmfc_number = $productId = $productName = $productQty = $actualProductQty = $actualProductPrice = $products = $productPrice = $productWeight = $productLength = $productWidth = $productHeight = $ptype = $hazardousMaterial = $productType = $productSku = $productClass = $attributes = $variantId = $nestedMaterial = $nestedPercentage = $nestedDimension = $nestedItems = $stakingProperty = $ship_as_own_pallet = $vertical_rotation_for_pallet = $handlingUnitWeight = $maxHandlingUnitWeight = '';
    5353            $attributes = [];
    5454            extract($item_data);
     
    6767
    6868            $productName = is_string($productName) && !empty($productName) ? str_replace(array("'", '"'), '', $productName) : '';
     69            $productQty = isset($actualProductQty) && !empty($actualProductQty) ? $actualProductQty : $productQty;
    6970
    7071            $item = [
     
    9495                'nmfc_number' => $nmfc_number,
    9596                'pallet_vertical_rotation' => $vertical_rotation_for_pallet,
    96                 'ship_as_own_pallet' => $ship_as_own_pallet
     97                'ship_as_own_pallet' => $ship_as_own_pallet,
     98                'handling_unit_weight' => $handlingUnitWeight,
     99                'max_handling_unit_weight' => $maxHandlingUnitWeight
    97100            ];
    98101
  • ltl-freight-quotes-freightquote-edition/tags/2.4.17/freightquote-group-package.php

    r3446938 r3453542  
    170170                'products' => $product_title,
    171171                'productQty' => $values['quantity'],
     172                'actualProductQty' => $values['quantity'],
    172173                'product_name' => $values['quantity'] . " x " . $product_title,
    173174                'productPrice' => $_product->get_price(),
     
    209210            ];
    210211
     212            $item_weight = $en_items['productWeight'];
    211213            // Product level handling unit settings
    212214            $en_items = $this->fq_ltl_apply_product_handling_unit_settings($_product, $values, $en_items);
     215            $weight = $item_weight != $en_items['productWeight'] ? $en_items['productWeight'] : $weight;
    213216
    214217            // Hook for flexibility adding to package
  • ltl-freight-quotes-freightquote-edition/tags/2.4.17/ltl-freight-quotes-freightquote-edition.php

    r3446938 r3453542  
    66  Author: Eniture Technology
    77  Author URI: http://eniture.com/
    8   Version: 2.4.16
     8  Version: 2.4.17
    99  Text Domain: eniture-freightquote-ltl
    1010  License:           GPL-2.0-or-later
  • ltl-freight-quotes-freightquote-edition/tags/2.4.17/product/en-product-detail.php

    r3446938 r3453542  
    3939                add_filter('En_Plugins_dropship_filter', [$this, 'en_compatible_other_eniture_plugins']);
    4040                add_filter('En_Plugins_variable_freight_classification_filter', [$this, 'en_compatible_other_eniture_plugins']);
     41
     42            } elseif (!has_filter('en_freightquote_freight_handling_unit_fields')) {
     43               
     44                // Check compatible with our old eniture plugins.
     45                add_filter('en_freightquote_freight_handling_unit_fields', [$this, 'en_compatible_other_eniture_plugins']);
     46               
     47                // Add simple product fields
     48                add_action('woocommerce_product_options_shipping', [$this, 'en_show_product_fields'], 111, 3);
     49                add_action('woocommerce_process_product_meta', [$this, 'en_save_product_fields'], 101, 1);
     50               
     51                // Add variable product fields.
     52                add_action('woocommerce_product_after_variable_attributes', [$this, 'en_show_product_fields'], 111, 3);
     53                add_action('woocommerce_save_product_variation', [$this, 'en_save_product_fields'], 101, 1);
    4154            }
    4255        }
     
    126139        }
    127140
    128             private function sanitize_fulfillment_offset_days($value)
     141        private function sanitize_fulfillment_offset_days($value)
    129142        {
    130143            $value = trim($value);
     
    258271                    ]
    259272                ],
    260                 [
    261                     'type' => 'input_field',
    262                     'id' => '_en_weight_of_handling_unit',
    263                     'class' => '_en_weight_of_handling_unit short',
    264                     'label' => 'Weight of handling unit',
    265                 ],
    266                 [
    267                     'type' => 'input_field',
    268                     'id' => '_en_max_weight_per_handling_unit',
    269                     'class' => '_en_max_weight_per_handling_unit short',
    270                     'label' => 'Max weight per handling unit',
    271                 ],
     273            ];
     274            $en_product_fields = array_merge($en_product_fields, $this->en_product_handling_unit_fields(), [
    272275                [
    273276                    'type' => 'checkbox',
     
    279282                    'description' => $this->hazardous_plan_required,
    280283                ]
    281             ];
     284            ]);
    282285
    283286            // Micro Warehouse
     
    317320        {
    318321            $this->en_app_common_plan_status();
    319             $en_product_fields = $this->en_product_fields_arr();
     322            // Check if the common product fields already added, then only add the product handling unit fields
     323            $en_product_fields = !has_filter('en_freightquote_freight_handling_unit_fields') ? $this->en_product_fields_arr() : $this->en_product_handling_unit_fields();
    320324
    321325            // Check compatability hazardous materials with other plugins.
     
    407411            woocommerce_wp_text_input($custom_input_field);
    408412        }
     413
     414        public function en_product_handling_unit_fields()
     415        {
     416            return [
     417                [
     418                    'type' => 'input_field',
     419                    'id' => '_en_weight_of_handling_unit',
     420                    'class' => '_en_weight_of_handling_unit short',
     421                    'label' => 'Weight of handling unit',
     422                ],
     423                [
     424                    'type' => 'input_field',
     425                    'id' => '_en_max_weight_per_handling_unit',
     426                    'class' => '_en_max_weight_per_handling_unit short',
     427                    'label' => 'Max weight per handling unit',
     428                ]
     429            ];
     430        }
    409431    }
    410432
  • ltl-freight-quotes-freightquote-edition/tags/2.4.17/readme.txt

    r3446938 r3453542  
    44Requires at least: 6.4
    55Tested up to:  6.9
    6 Stable tag: 2.4.16
     6Stable tag: 2.4.17
    77License: GPL-2.0-or-later
    88License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    170170== Changelog ==
    171171
     172= 2.4.17 - 2026-02-04 =
     173* Fix: Resolved handling unit settings fields display conflict with other Eniture plugins on the product details page.
     174
    172175= 2.4.16 - 2026-01-26 =
    173176* Update: Added **product-level offset days** feature to allow more granular shipment timing control.
  • ltl-freight-quotes-freightquote-edition/trunk/fdo/en-fdo.php

    r3446938 r3453542  
    5050        $this->en_fdo_meta_data['items'] = [];
    5151        foreach ($items as $item_key => $item_data) {
    52             $nmfc_number = $productId = $productName = $productQty = $actualProductPrice = $products = $productPrice = $productWeight = $productLength = $productWidth = $productHeight = $ptype = $hazardousMaterial = $productType = $productSku = $productClass = $attributes = $variantId = $nestedMaterial = $nestedPercentage = $nestedDimension = $nestedItems = $stakingProperty = $ship_as_own_pallet = $vertical_rotation_for_pallet = '';
     52            $nmfc_number = $productId = $productName = $productQty = $actualProductQty = $actualProductPrice = $products = $productPrice = $productWeight = $productLength = $productWidth = $productHeight = $ptype = $hazardousMaterial = $productType = $productSku = $productClass = $attributes = $variantId = $nestedMaterial = $nestedPercentage = $nestedDimension = $nestedItems = $stakingProperty = $ship_as_own_pallet = $vertical_rotation_for_pallet = $handlingUnitWeight = $maxHandlingUnitWeight = '';
    5353            $attributes = [];
    5454            extract($item_data);
     
    6767
    6868            $productName = is_string($productName) && !empty($productName) ? str_replace(array("'", '"'), '', $productName) : '';
     69            $productQty = isset($actualProductQty) && !empty($actualProductQty) ? $actualProductQty : $productQty;
    6970
    7071            $item = [
     
    9495                'nmfc_number' => $nmfc_number,
    9596                'pallet_vertical_rotation' => $vertical_rotation_for_pallet,
    96                 'ship_as_own_pallet' => $ship_as_own_pallet
     97                'ship_as_own_pallet' => $ship_as_own_pallet,
     98                'handling_unit_weight' => $handlingUnitWeight,
     99                'max_handling_unit_weight' => $maxHandlingUnitWeight
    97100            ];
    98101
  • ltl-freight-quotes-freightquote-edition/trunk/freightquote-group-package.php

    r3446938 r3453542  
    170170                'products' => $product_title,
    171171                'productQty' => $values['quantity'],
     172                'actualProductQty' => $values['quantity'],
    172173                'product_name' => $values['quantity'] . " x " . $product_title,
    173174                'productPrice' => $_product->get_price(),
     
    209210            ];
    210211
     212            $item_weight = $en_items['productWeight'];
    211213            // Product level handling unit settings
    212214            $en_items = $this->fq_ltl_apply_product_handling_unit_settings($_product, $values, $en_items);
     215            $weight = $item_weight != $en_items['productWeight'] ? $en_items['productWeight'] : $weight;
    213216
    214217            // Hook for flexibility adding to package
  • ltl-freight-quotes-freightquote-edition/trunk/ltl-freight-quotes-freightquote-edition.php

    r3446938 r3453542  
    66  Author: Eniture Technology
    77  Author URI: http://eniture.com/
    8   Version: 2.4.16
     8  Version: 2.4.17
    99  Text Domain: eniture-freightquote-ltl
    1010  License:           GPL-2.0-or-later
  • ltl-freight-quotes-freightquote-edition/trunk/product/en-product-detail.php

    r3446938 r3453542  
    3939                add_filter('En_Plugins_dropship_filter', [$this, 'en_compatible_other_eniture_plugins']);
    4040                add_filter('En_Plugins_variable_freight_classification_filter', [$this, 'en_compatible_other_eniture_plugins']);
     41
     42            } elseif (!has_filter('en_freightquote_freight_handling_unit_fields')) {
     43               
     44                // Check compatible with our old eniture plugins.
     45                add_filter('en_freightquote_freight_handling_unit_fields', [$this, 'en_compatible_other_eniture_plugins']);
     46               
     47                // Add simple product fields
     48                add_action('woocommerce_product_options_shipping', [$this, 'en_show_product_fields'], 111, 3);
     49                add_action('woocommerce_process_product_meta', [$this, 'en_save_product_fields'], 101, 1);
     50               
     51                // Add variable product fields.
     52                add_action('woocommerce_product_after_variable_attributes', [$this, 'en_show_product_fields'], 111, 3);
     53                add_action('woocommerce_save_product_variation', [$this, 'en_save_product_fields'], 101, 1);
    4154            }
    4255        }
     
    126139        }
    127140
    128             private function sanitize_fulfillment_offset_days($value)
     141        private function sanitize_fulfillment_offset_days($value)
    129142        {
    130143            $value = trim($value);
     
    258271                    ]
    259272                ],
    260                 [
    261                     'type' => 'input_field',
    262                     'id' => '_en_weight_of_handling_unit',
    263                     'class' => '_en_weight_of_handling_unit short',
    264                     'label' => 'Weight of handling unit',
    265                 ],
    266                 [
    267                     'type' => 'input_field',
    268                     'id' => '_en_max_weight_per_handling_unit',
    269                     'class' => '_en_max_weight_per_handling_unit short',
    270                     'label' => 'Max weight per handling unit',
    271                 ],
     273            ];
     274            $en_product_fields = array_merge($en_product_fields, $this->en_product_handling_unit_fields(), [
    272275                [
    273276                    'type' => 'checkbox',
     
    279282                    'description' => $this->hazardous_plan_required,
    280283                ]
    281             ];
     284            ]);
    282285
    283286            // Micro Warehouse
     
    317320        {
    318321            $this->en_app_common_plan_status();
    319             $en_product_fields = $this->en_product_fields_arr();
     322            // Check if the common product fields already added, then only add the product handling unit fields
     323            $en_product_fields = !has_filter('en_freightquote_freight_handling_unit_fields') ? $this->en_product_fields_arr() : $this->en_product_handling_unit_fields();
    320324
    321325            // Check compatability hazardous materials with other plugins.
     
    407411            woocommerce_wp_text_input($custom_input_field);
    408412        }
     413
     414        public function en_product_handling_unit_fields()
     415        {
     416            return [
     417                [
     418                    'type' => 'input_field',
     419                    'id' => '_en_weight_of_handling_unit',
     420                    'class' => '_en_weight_of_handling_unit short',
     421                    'label' => 'Weight of handling unit',
     422                ],
     423                [
     424                    'type' => 'input_field',
     425                    'id' => '_en_max_weight_per_handling_unit',
     426                    'class' => '_en_max_weight_per_handling_unit short',
     427                    'label' => 'Max weight per handling unit',
     428                ]
     429            ];
     430        }
    409431    }
    410432
  • ltl-freight-quotes-freightquote-edition/trunk/readme.txt

    r3446938 r3453542  
    44Requires at least: 6.4
    55Tested up to:  6.9
    6 Stable tag: 2.4.16
     6Stable tag: 2.4.17
    77License: GPL-2.0-or-later
    88License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    170170== Changelog ==
    171171
     172= 2.4.17 - 2026-02-04 =
     173* Fix: Resolved handling unit settings fields display conflict with other Eniture plugins on the product details page.
     174
    172175= 2.4.16 - 2026-01-26 =
    173176* Update: Added **product-level offset days** feature to allow more granular shipment timing control.
Note: See TracChangeset for help on using the changeset viewer.