From 58ff94f2174a75de725c02891edbf5e4bbf7c471 Mon Sep 17 00:00:00 2001 From: "vishalsingh.qlo325" Date: Wed, 9 Jul 2025 13:27:37 +0530 Subject: [PATCH 1/9] Removed admin search configuration controller --- controllers/admin/AdminSearchConfController.php | 1 + install/data/xml/tab.xml | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/controllers/admin/AdminSearchConfController.php b/controllers/admin/AdminSearchConfController.php index e07881d2c..00d2daab7 100644 --- a/controllers/admin/AdminSearchConfController.php +++ b/controllers/admin/AdminSearchConfController.php @@ -33,6 +33,7 @@ class AdminSearchConfControllerCore extends AdminController public function __construct() { + Tools::redirectAdmin(Context::getContext()->link->getAdminLink('AdminDashboard')); $this->bootstrap = true; $this->table = 'alias'; $this->className = 'Alias'; diff --git a/install/data/xml/tab.xml b/install/data/xml/tab.xml index ac0890d86..09eed80f3 100644 --- a/install/data/xml/tab.xml +++ b/install/data/xml/tab.xml @@ -228,9 +228,9 @@ - + AdminMaintenance From 5566bd498786c9b8688decce69142956e1b38822 Mon Sep 17 00:00:00 2001 From: "vishalsingh.qlo325" Date: Fri, 8 Aug 2025 13:11:57 +0530 Subject: [PATCH 2/9] Fixed: Filter related issue in the front office caused due to floating values --- modules/hotelreservationsystem/classes/HotelBookingDetail.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/hotelreservationsystem/classes/HotelBookingDetail.php b/modules/hotelreservationsystem/classes/HotelBookingDetail.php index ce5ce56b2..fbf4ba1c6 100644 --- a/modules/hotelreservationsystem/classes/HotelBookingDetail.php +++ b/modules/hotelreservationsystem/classes/HotelBookingDetail.php @@ -1718,7 +1718,7 @@ class HotelBookingDetail extends ObjectModel } } $productFeaturePrice = HotelRoomTypeFeaturePricing::getRoomTypeFeaturePricesPerDay($value['id_product'], $date_from, $date_to, self::useTax(), 0, 0, 0, 0, 1, 1, $bookingParams['occupancy']); - if (!empty($price) && ($price['from'] > $productFeaturePrice || $price['to'] < $productFeaturePrice)) { + if (!empty($price) && ((float) $price['from'] > $productFeaturePrice || (float) $price['to'] < $productFeaturePrice)) { unset($bookingData['rm_data'][$key]); continue; } From 0f586536148b0854b86d9abb2d177cc6b7338ae4 Mon Sep 17 00:00:00 2001 From: "vishalsingh.qlo325" Date: Tue, 18 Nov 2025 10:27:08 +0530 Subject: [PATCH 3/9] Fixed: Undefined variable in module.php --- classes/module/Module.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/classes/module/Module.php b/classes/module/Module.php index 937e9ecf6..1a1b4c200 100644 --- a/classes/module/Module.php +++ b/classes/module/Module.php @@ -3044,7 +3044,7 @@ abstract class ModuleCore ); $reflectionClassModule = new ReflectionClass($overrideClassName.'Override'.$uniq); - $moduleClassFileArray = $this->getCommentedClass($moduleClassFileArray, $reflectionClassModule, $reflectionClassOverride, $overrideClassFileArray); + $moduleClassFileArray = $this->getCommentedClass($moduleClassFileArray, $reflectionClassModule, $reflectionClassOverride, $overrideClassFileArray, $overrideClassName); // Insert the methods from module override in override $generatedCodeToCopy = array_slice($moduleClassFileArray, $reflectionClassModule->getStartLine() + 1, $reflectionClassModule->getEndLine() - $reflectionClassModule->getStartLine() - 2); @@ -3091,7 +3091,7 @@ abstract class ModuleCore ); $reflectionClassModule = new ReflectionClass($overrideClassName.'Override'.$uniq); - $moduleClassFileArray = $this->getCommentedClass($moduleClassFileArray, $reflectionClassModule); + $moduleClassFileArray = $this->getCommentedClass($moduleClassFileArray, $reflectionClassModule, null, null, $overrideClassName); file_put_contents($overrideClassFilePath, preg_replace($patternEscapeCommon, '', $moduleClassFileArray)); @@ -3102,7 +3102,7 @@ abstract class ModuleCore return true; } - private function getCommentedClass($moduleClassFileArray, $reflectionClassModule, $reflectionClassOverride = null, $overrideClassFileArray = null) + private function getCommentedClass($moduleClassFileArray, $reflectionClassModule, $reflectionClassOverride = null, $overrideClassFileArray = null, $className = '') { // Check if none of the methods already exists in the override class foreach ($reflectionClassModule->getMethods() as $method) { @@ -3110,15 +3110,15 @@ abstract class ModuleCore if ($reflectionClassOverride->hasMethod($method->getName())) { $overrideMethodInfo = $reflectionClassOverride->getMethod($method->getName()); if (preg_match('/module: (.*)/ism', $overrideClassFileArray[$overrideMethodInfo->getStartLine() - 5], $name) && preg_match('/date: (.*)/ism', $overrideClassFileArray[$overrideMethodInfo->getStartLine() - 4], $date) && preg_match('/version: ([0-9.]+)/ism', $overrideClassFileArray[$overrideMethodInfo->getStartLine() - 3], $version)) { - throw new Exception(sprintf(Tools::displayError('The method %1$s in the class %2$s is already overridden by the module %3$s version %4$s at %5$s.'), $method->getName(), $classname, $name[1], $version[1], $date[1])); + throw new Exception(sprintf(Tools::displayError('The method %1$s in the class %2$s is already overridden by the module %3$s version %4$s at %5$s.'), $method->getName(), $className, $name[1], $version[1], $date[1])); } - throw new Exception(sprintf(Tools::displayError('The method %1$s in the class %2$s is already overridden.'), $method->getName(), $classname)); + throw new Exception(sprintf(Tools::displayError('The method %1$s in the class %2$s is already overridden.'), $method->getName(), $className)); } } $moduleClassFileArray = preg_replace('/((:?public|private|protected)\s+(static\s+)?function\s+(?:\b'.$method->getName().'\b))/ism', "/*\n * module: ".$this->name."\n * date: ".date('Y-m-d H:i:s')."\n * version: ".$this->version."\n */\n $1", $moduleClassFileArray); if ($moduleClassFileArray === null) { - throw new Exception(sprintf(Tools::displayError('Failed to override method %1$s in class %2$s.'), $method->getName(), $classname)); + throw new Exception(sprintf(Tools::displayError('Failed to override method %1$s in class %2$s.'), $method->getName(), $className)); } } @@ -3126,13 +3126,13 @@ abstract class ModuleCore foreach ($reflectionClassModule->getProperties() as $property) { if ($reflectionClassOverride) { if ($reflectionClassOverride->hasProperty($property->getName())) { - throw new Exception(sprintf(Tools::displayError('The property %1$s in the class %2$s is already defined.'), $property->getName(), $classname)); + throw new Exception(sprintf(Tools::displayError('The property %1$s in the class %2$s is already defined.'), $property->getName(), $className)); } } $moduleClassFileArray = preg_replace('/((?:public|private|protected)\s)\s*(static\s)?\s*(\$\b'.$property->getName().'\b)/ism', "/*\n * module: ".$this->name."\n * date: ".date('Y-m-d H:i:s')."\n * version: ".$this->version."\n */\n $1$2$3", $moduleClassFileArray); if ($moduleClassFileArray === null) { - throw new Exception(sprintf(Tools::displayError('Failed to override property %1$s in class %2$s.'), $property->getName(), $classname)); + throw new Exception(sprintf(Tools::displayError('Failed to override property %1$s in class %2$s.'), $property->getName(), $className)); } } @@ -3140,13 +3140,13 @@ abstract class ModuleCore foreach ($reflectionClassModule->getConstants() as $constant => $value) { if ($reflectionClassOverride) { if ($reflectionClassOverride->hasConstant($constant)) { - throw new Exception(sprintf(Tools::displayError('The constant %1$s in the class %2$s is already defined.'), $constant, $classname)); + throw new Exception(sprintf(Tools::displayError('The constant %1$s in the class %2$s is already defined.'), $constant, $className)); } } $moduleClassFileArray = preg_replace('/(const\s)\s*(\b'.$constant.'\b)/ism', "/*\n * module: ".$this->name."\n * date: ".date('Y-m-d H:i:s')."\n * version: ".$this->version."\n */\n $1$2", $moduleClassFileArray); if ($moduleClassFileArray === null) { - throw new Exception(sprintf(Tools::displayError('Failed to override constant %1$s in class %2$s.'), $constant, $classname)); + throw new Exception(sprintf(Tools::displayError('Failed to override constant %1$s in class %2$s.'), $constant, $className)); } } From 42eab164b682f3e3286d1a1ad5a508e2f7b031bc Mon Sep 17 00:00:00 2001 From: "vishalsingh.qlo325" Date: Tue, 18 Nov 2025 13:01:31 +0530 Subject: [PATCH 4/9] Fixed: added our property page in theme meta --- install/data/xml/theme_meta.xml | 1 + .../blocknavigationmenu/classes/WkCustomNavigationLink.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/install/data/xml/theme_meta.xml b/install/data/xml/theme_meta.xml index 041a7e1c7..ce42c1a27 100644 --- a/install/data/xml/theme_meta.xml +++ b/install/data/xml/theme_meta.xml @@ -42,5 +42,6 @@ + diff --git a/modules/blocknavigationmenu/classes/WkCustomNavigationLink.php b/modules/blocknavigationmenu/classes/WkCustomNavigationLink.php index f8cfd422c..e4e86b593 100644 --- a/modules/blocknavigationmenu/classes/WkCustomNavigationLink.php +++ b/modules/blocknavigationmenu/classes/WkCustomNavigationLink.php @@ -197,8 +197,8 @@ class WkCustomNavigationLink extends ObjectModel 'id_cms' => 0, 'show_at_navigation' => 1, 'show_at_footer' => 0, - 'is_custom_link' => 1, - 'link' => $objLink->getPageLink('our-properties'), + 'is_custom_link' => 0, + 'link' => 'our-properties', ), ); From 3df30a2ecc9ff059993af43d9c6b1bb16370b5b4 Mon Sep 17 00:00:00 2001 From: Amit sharma Date: Fri, 21 Nov 2025 16:03:05 +0530 Subject: [PATCH 5/9] Fixed : Undefined variable numdays while creating order from the BO. --- classes/order/Order.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/classes/order/Order.php b/classes/order/Order.php index 656bce9cc..2fac4b50a 100644 --- a/classes/order/Order.php +++ b/classes/order/Order.php @@ -2577,10 +2577,16 @@ class OrderCore extends ObjectModel )) { $totals = array_reduce($serviceProductDetail, function ($carry, $item) use ($order_detail) { $objHotelBookingDetail = new HotelBookingDetail((int) $item['id_htl_booking_detail']); - if ((Product::PRICE_CALCULATION_METHOD_PER_DAY == $order_detail['product_price_calculation_method']) - && (!$numDays = HotelHelper::getNumberOfDays($objHotelBookingDetail->date_from, $objHotelBookingDetail->date_to)) - ) { - $numDays = 1; + $numDays = 1; + if (Product::PRICE_CALCULATION_METHOD_PER_DAY == $order_detail['product_price_calculation_method']) { + $calculatedDays = HotelHelper::getNumberOfDays( + $objHotelBookingDetail->date_from, + $objHotelBookingDetail->date_to + ); + + if ($calculatedDays) { + $numDays = $calculatedDays; + } } if (!empty($item['id_tax_rules_group'])) { From 98ea0f712e201eac99914b0395f8dfb2b87c70a0 Mon Sep 17 00:00:00 2001 From: Amit sharma Date: Wed, 17 Dec 2025 14:13:47 +0530 Subject: [PATCH 6/9] Fixed: fatal error on dashboard when number of decimals is 0. --- controllers/admin/AdminOrdersController.php | 3 ++- modules/dashactivity/dashactivity.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/controllers/admin/AdminOrdersController.php b/controllers/admin/AdminOrdersController.php index cd2874dba..30026bcca 100644 --- a/controllers/admin/AdminOrdersController.php +++ b/controllers/admin/AdminOrdersController.php @@ -2992,7 +2992,8 @@ class AdminOrdersControllerCore extends AdminController $helper->icon = 'icon-money'; $helper->color = 'color2'; $helper->title = $this->l('Total Due Amount', null, null, false); - $minValue = ('0.' . str_repeat('0', (Configuration::get('PS_PRICE_DISPLAY_PRECISION') - 1)) . '1'); + $priceDisplayPrecision = (int)Configuration::get('PS_PRICE_DISPLAY_PRECISION'); + $minValue = ('0.' . ($priceDisplayPrecision ? str_repeat('0', ($priceDisplayPrecision - 1)) : '') . '1'); // get all valid order states for due amount calculations $validOrderStatesFilter = ''; diff --git a/modules/dashactivity/dashactivity.php b/modules/dashactivity/dashactivity.php index 5f409565d..f9a36d348 100644 --- a/modules/dashactivity/dashactivity.php +++ b/modules/dashactivity/dashactivity.php @@ -532,12 +532,13 @@ class Dashactivity extends Module public function getConfigFieldsValues() { + $priceDisplayPrecision = (int)Configuration::get('PS_PRICE_DISPLAY_PRECISION'); return array( 'DASHACTIVITY_CART_ACTIVE' => Tools::getValue('DASHACTIVITY_CART_ACTIVE', Configuration::get('DASHACTIVITY_CART_ACTIVE')), 'DASHACTIVITY_CART_ABANDONED_MIN' => Tools::getValue('DASHACTIVITY_CART_ABANDONED_MIN', Configuration::get('DASHACTIVITY_CART_ABANDONED_MIN')), 'DASHACTIVITY_CART_ABANDONED_MAX' => Tools::getValue('DASHACTIVITY_CART_ABANDONED_MAX', Configuration::get('DASHACTIVITY_CART_ABANDONED_MAX')), 'DASHACTIVITY_VISITOR_ONLINE' => Tools::getValue('DASHACTIVITY_VISITOR_ONLINE', Configuration::get('DASHACTIVITY_VISITOR_ONLINE')), - 'min_due_amount' => ('0.' . str_repeat('0', (Configuration::get('PS_PRICE_DISPLAY_PRECISION') - 1)) . '1') + 'min_due_amount' => ('0.' . ($priceDisplayPrecision ? str_repeat('0', ($priceDisplayPrecision - 1)) : '') . '1') ); } From a5787f1b8688dd72a54456247da1d3c595c5ecb9 Mon Sep 17 00:00:00 2001 From: Amit sharma Date: Fri, 19 Dec 2025 16:23:58 +0530 Subject: [PATCH 7/9] Fixed: Service product quantity not showing on the order details page in the back office --- .../_extra_services_service_products_tab_content.tpl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/admin/themes/default/template/controllers/orders/modals/_extra_services_service_products_tab_content.tpl b/admin/themes/default/template/controllers/orders/modals/_extra_services_service_products_tab_content.tpl index a1013e732..c2af485fb 100644 --- a/admin/themes/default/template/controllers/orders/modals/_extra_services_service_products_tab_content.tpl +++ b/admin/themes/default/template/controllers/orders/modals/_extra_services_service_products_tab_content.tpl @@ -256,6 +256,7 @@ {l s='ID'} {l s='Name'} + {l s='Quantity'} {l s='Unit Price (tax excl.)'} {l s='Total Price (tax excl.)'} {l s='Total Price (tax incl.)'} @@ -276,6 +277,15 @@ {l s='Auto added'} {/if} + + {if isset($service['allow_multiple_quantity']) && $service['allow_multiple_quantity']} +
+ +
+ {else} + {l s='--'} + {/if} + {displayPrice price=$service['unit_price_tax_excl'] currency=$orderCurrency} {if $service['price_calculation_method'] == Product::PRICE_CALCULATION_METHOD_PER_DAY} From 3dc41008511d716d6ec513a24418b82573fc3a3d Mon Sep 17 00:00:00 2001 From: Amit sharma Date: Fri, 26 Dec 2025 16:32:27 +0530 Subject: [PATCH 8/9] Fixed: correction of the variable declaration --- classes/order/Order.php | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/classes/order/Order.php b/classes/order/Order.php index 2fac4b50a..7bceb94cf 100644 --- a/classes/order/Order.php +++ b/classes/order/Order.php @@ -2578,15 +2578,10 @@ class OrderCore extends ObjectModel $totals = array_reduce($serviceProductDetail, function ($carry, $item) use ($order_detail) { $objHotelBookingDetail = new HotelBookingDetail((int) $item['id_htl_booking_detail']); $numDays = 1; - if (Product::PRICE_CALCULATION_METHOD_PER_DAY == $order_detail['product_price_calculation_method']) { - $calculatedDays = HotelHelper::getNumberOfDays( - $objHotelBookingDetail->date_from, - $objHotelBookingDetail->date_to - ); - - if ($calculatedDays) { - $numDays = $calculatedDays; - } + if ((Product::PRICE_CALCULATION_METHOD_PER_DAY == $order_detail['product_price_calculation_method']) + && (!$numDays = HotelHelper::getNumberOfDays($objHotelBookingDetail->date_from, $objHotelBookingDetail->date_to)) + ) { + $numDays = 1; } if (!empty($item['id_tax_rules_group'])) { From 8e260a991c8632f29bae3ed4ca236d5c8628835a Mon Sep 17 00:00:00 2001 From: Amit sharma Date: Fri, 26 Dec 2025 16:57:38 +0530 Subject: [PATCH 9/9] Fixed: remove textbox and display quantity in normal text --- .../modals/_extra_services_service_products_tab_content.tpl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/admin/themes/default/template/controllers/orders/modals/_extra_services_service_products_tab_content.tpl b/admin/themes/default/template/controllers/orders/modals/_extra_services_service_products_tab_content.tpl index c2af485fb..8fb331302 100644 --- a/admin/themes/default/template/controllers/orders/modals/_extra_services_service_products_tab_content.tpl +++ b/admin/themes/default/template/controllers/orders/modals/_extra_services_service_products_tab_content.tpl @@ -279,9 +279,7 @@ {if isset($service['allow_multiple_quantity']) && $service['allow_multiple_quantity']} -
- -
+ {$service['quantity']} {else} {l s='--'} {/if}