From f9b08a64d9ec986aa421ad6a7c0da278335fbdf0 Mon Sep 17 00:00:00 2001 From: "vishalsingh.qlo325" Date: Tue, 29 Apr 2025 17:26:12 +0530 Subject: [PATCH 1/3] Fixed: The refund rules are also deleted on the orders and customer delete process --- modules/qlocleaner/qlocleaner.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/modules/qlocleaner/qlocleaner.php b/modules/qlocleaner/qlocleaner.php index 1bc99a55e..d2c65a493 100644 --- a/modules/qlocleaner/qlocleaner.php +++ b/modules/qlocleaner/qlocleaner.php @@ -854,8 +854,6 @@ class QloCleaner extends Module 'htl_room_type_service_product_order_detail', 'htl_room_type_service_product_cart_detail', 'htl_hotel_service_product_cart_detail', - 'htl_order_refund_rules', - 'htl_order_refund_rules_lang', ); } } From a2714b8d1230b8e3fc180358113787292fa4b62f Mon Sep 17 00:00:00 2001 From: "vishalsingh.qlo325" Date: Thu, 8 May 2025 11:12:01 +0530 Subject: [PATCH 2/3] Added: service related tables are not cleaned properly when using the cleaner, also fixed some queries --- modules/qlocleaner/qlocleaner.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/modules/qlocleaner/qlocleaner.php b/modules/qlocleaner/qlocleaner.php index d2c65a493..6ba70f67c 100644 --- a/modules/qlocleaner/qlocleaner.php +++ b/modules/qlocleaner/qlocleaner.php @@ -665,7 +665,8 @@ class QloCleaner extends Module array('warehouse_carrier', 'id_carrier', 'carrier', 'id_carrier'), array('warehouse_product_location', 'id_product', 'product', 'id_product'), array('warehouse_product_location', 'id_warehouse', 'warehouse', 'id_warehouse'), - array('specific_price', 'id_product', 'customer', 'id_customer'), + array('specific_price', 'id_product', 'product', 'id_product'), + array('specific_price', 'id_customer', 'customer', 'id_customer'), array('specific_price', 'id_group', 'group', 'id_group'), array('htl_features_block_data_lang', 'id_features_block', 'htl_features_block_data', 'id_features_block'), array('cart_rule', 'id_customer', 'customer', 'id_customer'), @@ -699,13 +700,18 @@ class QloCleaner extends Module array('profile_lang', 'id_lang', 'lang', 'id_lang'), array('htl_access', 'id_profile', 'profile', 'id_profile'), array('htl_access', 'id_hotel', 'htl_branch_info', 'id'), - array('htl_room_disable_dates', 'id_room_type', 'htl_room_type', 'id'), + array('htl_room_disable_dates', 'id_room_type', 'htl_room_type', 'id_product'), array('htl_room_type_feature_pricing_lang', 'id_feature_price', 'htl_room_type_feature_pricing', 'id_feature_price'), array('htl_room_type_feature_pricing_lang', 'id_lang', 'lang', 'id_lang'), array('htl_order_restrict_date', 'id_hotel', 'htl_branch_info', 'id'), array('htl_branch_refund_rules', 'id_hotel', 'htl_branch_info', 'id'), array('htl_order_refund_rules_lang', 'id_refund_rule', 'htl_branch_refund_rules', 'id_refund_rule'), array('htl_advance_payment', 'id_product', 'product', 'id_product'), + array('htl_order_refund_rules_lang', 'id_lang', 'lang', 'id_lang'), + array('htl_room_type_service_product', 'id_product', 'product', 'id_product'), + array('htl_room_type_service_product', 'id_element', 'product', 'id_product'), + array('htl_room_type_service_product_price', 'id_product', 'product', 'id_product'), + array('htl_room_type_service_product_price', 'id_element', 'product', 'id_product'), ) ); } @@ -802,7 +808,9 @@ class QloCleaner extends Module 'htl_room_block_data', 'htl_features_block_data', 'htl_testimonials_block_data', - 'htl_room_type_global_demand' + 'htl_room_type_global_demand', + 'htl_room_type_service_product', + 'htl_room_type_service_product_price', ) ); } From 54b595ce3f1175cdede25a4d240bf2d0132bc747 Mon Sep 17 00:00:00 2001 From: "vishalsingh.qlo325" Date: Thu, 8 May 2025 12:13:17 +0530 Subject: [PATCH 3/3] Cache is not cleaned after using the cleaner, which shows the old data from the cache --- modules/qlocleaner/qlocleaner.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/qlocleaner/qlocleaner.php b/modules/qlocleaner/qlocleaner.php index 6ba70f67c..a475b0c55 100644 --- a/modules/qlocleaner/qlocleaner.php +++ b/modules/qlocleaner/qlocleaner.php @@ -85,6 +85,7 @@ class QloCleaner extends Module } Hook::exec('actionCleanData', array('method' => 'checkAndFix')); $html .= $this->displayConfirmation($conf); + Cache::getInstance()->flush(); } elseif (Tools::isSubmit('submitCleanAndOptimize')) { $logs = self::cleanAndOptimize(); if (count($logs)) { @@ -95,14 +96,17 @@ class QloCleaner extends Module } Hook::exec('actionCleanData', array('method' => 'cleanAndOptimize')); $html .= $this->displayConfirmation($conf); + Cache::getInstance()->flush(); } elseif (Tools::getValue('submitTruncateCatalog') && Tools::getValue('checkTruncateCatalog')) { self::truncate('catalog'); Hook::exec('actionCleanData', array('method' => 'catalog')); $html .= $this->displayConfirmation($this->l('Catalog truncated successfuly, please run functional Integrity constraints to clean the database.')); + Cache::getInstance()->flush(); } elseif (Tools::getValue('submitTruncateSales') && Tools::getValue('checkTruncateSales')) { self::truncate('sales'); Hook::exec('actionCleanData', array('method' => 'sales')); $html .= $this->displayConfirmation($this->l('Orders and customers truncated successfuly, please run functional Integrity constraints to clean the database')); + Cache::getInstance()->flush(); } $html .= $this->context->smarty->fetch(_PS_MODULE_DIR_.$this->name.'/views/templates/admin/qlocleaner_script.tpl');