From ab5a9dc17acea291195b96300de2cfa4e1c2902c Mon Sep 17 00:00:00 2001 From: "John.R" Date: Fri, 17 Jan 2025 11:58:19 +0100 Subject: [PATCH 01/12] fix: coutable query erro --- src/Repository/CarrierDetailRepository.php | 10 +++++----- src/Repository/CarrierTaxeRepository.php | 13 +++++-------- src/Repository/OrderDetailRepository.php | 17 +++++++++-------- src/Repository/OrderRepository.php | 15 ++++++++------- 4 files changed, 27 insertions(+), 28 deletions(-) diff --git a/src/Repository/CarrierDetailRepository.php b/src/Repository/CarrierDetailRepository.php index 0c66a5ed..a89fed8f 100644 --- a/src/Repository/CarrierDetailRepository.php +++ b/src/Repository/CarrierDetailRepository.php @@ -46,6 +46,7 @@ public function generateFullQuery($langIso, $withSelecParameters) { $this->generateMinimalQuery(self::TABLE_NAME, 'ca'); + // minimal query for countable query $this->query ->innerJoin('delivery', 'd', 'ca.id_carrier = d.id_carrier AND d.id_zone IS NOT NULL') ->innerJoin('country', 'co', 'd.id_zone = co.id_zone AND co.iso_code IS NOT NULL AND co.active = 1') @@ -53,11 +54,12 @@ public function generateFullQuery($langIso, $withSelecParameters) ->leftJoin('range_price', 'rp', 'ca.id_carrier = rp.id_carrier AND d.id_range_price = rp.id_range_price') ->leftJoin('state', 's', 'co.id_zone = s.id_zone AND co.id_country = s.id_country AND s.active = 1') ->leftJoin('configuration', 'conf', 'conf.name = "PS_SHIPPING_METHOD"') + ->select('ca.id_reference') + ->groupBy('ca.id_reference, co.id_zone, id_range') ; if ($withSelecParameters) { $this->query - ->select('ca.id_reference') ->select('d.id_zone') ->select(' CASE @@ -111,8 +113,6 @@ public function generateFullQuery($langIso, $withSelecParameters) ) AS price ') ; - - $this->query->groupBy('ca.id_reference, co.id_zone, id_range'); } } @@ -176,10 +176,10 @@ public function countFullSyncContentLeft($offset, $limit, $langIso) $this->generateFullQuery($langIso, true); $result = $this->db->executeS(' - SELECT (COUNT(*) - ' . (int) $offset . ') AS count + SELECT COUNT(*) - ' . (int) $offset . ' AS count FROM (' . $this->query->build() . ') as subquery; '); - return is_array($result) ? $result[0]['count'] : []; + return is_array($result) ? $result[0]['count'] : 0; } } diff --git a/src/Repository/CarrierTaxeRepository.php b/src/Repository/CarrierTaxeRepository.php index 430c4a79..3e86078f 100644 --- a/src/Repository/CarrierTaxeRepository.php +++ b/src/Repository/CarrierTaxeRepository.php @@ -46,6 +46,7 @@ public function generateFullQuery($langIso, $withSelecParameters) { $this->generateMinimalQuery(self::TABLE_NAME, 'ca'); + // minimal query for countable query $this->query ->innerJoin('carrier_tax_rules_group_shop', 'ctrgs', 'ca.id_carrier = ctrgs.id_carrier') ->innerJoin('tax_rule', 'tr', 'ctrgs.id_tax_rules_group = tr.id_tax_rules_group') @@ -53,15 +54,13 @@ public function generateFullQuery($langIso, $withSelecParameters) ->innerJoin('delivery', 'd', 'ca.id_carrier = d.id_carrier AND d.id_zone IS NOT NULL') ->innerJoin('tax', 't', 'tr.id_tax = t.id_tax AND t.active = 1') ->leftJoin('state', 's', 'tr.id_state = s.id_state AND s.active = 1') - ; - - $this->query ->where('(co.id_zone = d.id_zone OR s.id_zone = d.id_zone)') + ->select('ca.id_reference') + ->groupBy('ca.id_reference, co.id_zone, id_range, country_id') ; if ($withSelecParameters) { $this->query - ->select('ca.id_reference') ->select('co.id_zone') ->select(' CASE @@ -81,8 +80,6 @@ public function generateFullQuery($langIso, $withSelecParameters) ') ->select('t.rate AS tax_rate') ; - - $this->query->groupBy('ca.id_reference, co.id_zone, id_range, country_id'); } } @@ -146,10 +143,10 @@ public function countFullSyncContentLeft($offset, $limit, $langIso) $this->generateFullQuery($langIso, true); $result = $this->db->executeS(' - SELECT (COUNT(*) - ' . (int) $offset . ') AS count + SELECT COUNT(*) - ' . (int) $offset . ' AS count FROM (' . $this->query->build() . ') as subquery; '); - return is_array($result) ? $result[0]['count'] : []; + return is_array($result) ? $result[0]['count'] : 0; } } diff --git a/src/Repository/OrderDetailRepository.php b/src/Repository/OrderDetailRepository.php index 0466ab0c..5f1aebfc 100644 --- a/src/Repository/OrderDetailRepository.php +++ b/src/Repository/OrderDetailRepository.php @@ -56,6 +56,7 @@ public function generateFullQuery($langIso, $withSelecParameters) $this->generateMinimalQuery(self::TABLE_NAME, 'od'); + // minimal query for countable query $this->query ->where('od.id_shop = ' . $context->shop->id) ->innerJoin('orders', 'o', 'od.id_order = o.id_order') @@ -63,11 +64,12 @@ public function generateFullQuery($langIso, $withSelecParameters) ->leftJoin('product_shop', 'ps', 'od.product_id = ps.id_product AND ps.id_shop = ' . (int) $context->shop->id) ->leftJoin('currency', 'c', 'c.id_currency = o.id_currency') ->leftJoin('lang', 'l', 'o.id_lang = l.id_lang') + ->select('od.id_order_detail') + ->groupBy('od.id_order_detail') ; if ($withSelecParameters) { $this->query - ->select('od.id_order_detail') ->select('od.id_order') ->select('od.product_id') ->select('od.product_attribute_id') @@ -98,8 +100,6 @@ public function retrieveContentsForFull($offset, $limit, $langIso) { $this->generateFullQuery($langIso, true); - $this->query->groupBy('od.id_order_detail'); - $this->query->limit((int) $limit, (int) $offset); return $this->runQuery(); @@ -143,12 +143,13 @@ public function retrieveContentsForIncremental($limit, $contentIds, $langIso) */ public function countFullSyncContentLeft($offset, $limit, $langIso) { - $this->generateFullQuery($langIso, false); - - $this->query->select('(COUNT(*) - ' . (int) $offset . ') as count'); + $this->generateFullQuery($langIso, true); - $result = $this->runQuery(true); + $result = $this->db->executeS(' + SELECT COUNT(*) - ' . (int) $offset . ' AS count + FROM (' . $this->query->build() . ') as subquery; + '); - return $result[0]['count']; + return is_array($result) ? $result[0]['count'] : 0; } } diff --git a/src/Repository/OrderRepository.php b/src/Repository/OrderRepository.php index 71352a86..e1f67e45 100644 --- a/src/Repository/OrderRepository.php +++ b/src/Repository/OrderRepository.php @@ -46,6 +46,7 @@ public function generateFullQuery($langIso, $withSelecParameters) { $this->generateMinimalQuery(self::TABLE_NAME, 'o'); + // minimal query for countable query $this->query ->leftJoin('currency', 'c', 'o.id_currency = c.id_currency') ->leftJoin('order_slip', 'os', 'o.id_order = os.id_order') @@ -56,11 +57,12 @@ public function generateFullQuery($langIso, $withSelecParameters) ->leftJoin('order_state_lang', 'osl', 'o.current_state = osl.id_order_state') ->leftJoin('order_state', 'ost', 'o.current_state = ost.id_order_state') ->where('o.id_shop = ' . (int) parent::getShopContext()->id) + ->select('o.id_order') + ->groupBy('o.id_order') ; if ($withSelecParameters) { $this->query - ->select('o.id_order') ->select('o.reference') ->select('o.id_customer') ->select('o.id_cart') @@ -128,8 +130,6 @@ public function retrieveContentsForFull($offset, $limit, $langIso) { $this->generateFullQuery($langIso, true); - $this->query->groupBy('o.id_order'); - $this->query->limit((int) $limit, (int) $offset); return $this->runQuery(); @@ -175,10 +175,11 @@ public function countFullSyncContentLeft($offset, $limit, $langIso) { $this->generateFullQuery($langIso, false); - $this->query->select('(COUNT(*) - ' . (int) $offset . ') as count'); - - $result = $this->runQuery(true); + $result = $this->db->executeS(' + SELECT (COUNT(*) - ' . (int) $offset . ') AS count + FROM (' . $this->query->build() . ') as subquery; + '); - return $result[0]['count']; + return is_array($result) ? $result[0]['count'] : 0; } } From 1a0ddc156eaa7400137c6c4933d6f91099a373bd Mon Sep 17 00:00:00 2001 From: "John.R" Date: Fri, 17 Jan 2025 12:04:42 +0100 Subject: [PATCH 02/12] fix: return type doc --- src/Repository/BundleRepository.php | 2 +- src/Repository/CarrierDetailRepository.php | 4 ++-- src/Repository/CarrierRepository.php | 2 +- src/Repository/CarrierTaxeRepository.php | 2 +- src/Repository/CartProductRepository.php | 2 +- src/Repository/CartRepository.php | 2 +- src/Repository/CartRuleRepository.php | 2 +- src/Repository/CategoryRepository.php | 2 +- src/Repository/CurrencyRepository.php | 2 +- src/Repository/CustomProductCarrierRepository.php | 2 +- src/Repository/CustomerRepository.php | 2 +- src/Repository/EmployeeRepository.php | 2 +- src/Repository/ImageRepository.php | 2 +- src/Repository/ImageTypeRepository.php | 2 +- src/Repository/LanguageRepository.php | 2 +- src/Repository/ManufacturerRepository.php | 2 +- src/Repository/ModuleRepository.php | 2 +- src/Repository/OrderCarrierRepository.php | 2 +- src/Repository/OrderCartRuleRepository.php | 2 +- src/Repository/OrderDetailRepository.php | 2 +- src/Repository/OrderRepository.php | 4 ++-- src/Repository/OrderStatusHistoryRepository.php | 2 +- src/Repository/ProductRepository.php | 2 +- src/Repository/ProductSupplierRepository.php | 2 +- src/Repository/RepositoryInterface.php | 2 +- src/Repository/SpecificPriceRepository.php | 2 +- src/Repository/StockMovementRepository.php | 2 +- src/Repository/StockRepository.php | 2 +- src/Repository/StoreRepository.php | 2 +- src/Repository/SupplierRepository.php | 2 +- src/Repository/TaxonomyRepository.php | 2 +- src/Repository/TranslationRepository.php | 2 +- src/Repository/WishlistProductRepository.php | 2 +- src/Repository/WishlistRepository.php | 2 +- 34 files changed, 36 insertions(+), 36 deletions(-) diff --git a/src/Repository/BundleRepository.php b/src/Repository/BundleRepository.php index 16d2103a..6ed08b26 100644 --- a/src/Repository/BundleRepository.php +++ b/src/Repository/BundleRepository.php @@ -38,7 +38,7 @@ class BundleRepository extends AbstractRepository implements RepositoryInterface * @param string $langIso * @param bool $withSelecParameters * - * @return mixed + * @return void * * @throws \PrestaShopException */ diff --git a/src/Repository/CarrierDetailRepository.php b/src/Repository/CarrierDetailRepository.php index a89fed8f..882c598e 100644 --- a/src/Repository/CarrierDetailRepository.php +++ b/src/Repository/CarrierDetailRepository.php @@ -38,7 +38,7 @@ class CarrierDetailRepository extends AbstractRepository implements RepositoryIn * @param string $langIso * @param bool $withSelecParameters * - * @return mixed + * @return void * * @throws \PrestaShopException */ @@ -59,7 +59,7 @@ public function generateFullQuery($langIso, $withSelecParameters) ; if ($withSelecParameters) { - $this->query + $this->query ->select('d.id_zone') ->select(' CASE diff --git a/src/Repository/CarrierRepository.php b/src/Repository/CarrierRepository.php index b6c5b3e4..3375cc76 100644 --- a/src/Repository/CarrierRepository.php +++ b/src/Repository/CarrierRepository.php @@ -38,7 +38,7 @@ class CarrierRepository extends AbstractRepository implements RepositoryInterfac * @param string $langIso * @param bool $withSelecParameters * - * @return mixed + * @return void * * @throws \PrestaShopException */ diff --git a/src/Repository/CarrierTaxeRepository.php b/src/Repository/CarrierTaxeRepository.php index 3e86078f..2d702e9e 100644 --- a/src/Repository/CarrierTaxeRepository.php +++ b/src/Repository/CarrierTaxeRepository.php @@ -38,7 +38,7 @@ class CarrierTaxeRepository extends AbstractRepository implements RepositoryInte * @param string $langIso * @param bool $withSelecParameters * - * @return mixed + * @return void * * @throws \PrestaShopException */ diff --git a/src/Repository/CartProductRepository.php b/src/Repository/CartProductRepository.php index f229081b..b029ee5b 100644 --- a/src/Repository/CartProductRepository.php +++ b/src/Repository/CartProductRepository.php @@ -38,7 +38,7 @@ class CartProductRepository extends AbstractRepository implements RepositoryInte * @param string $langIso * @param bool $withSelecParameters * - * @return mixed + * @return void * * @throws \PrestaShopException */ diff --git a/src/Repository/CartRepository.php b/src/Repository/CartRepository.php index 111db8a7..6c867baa 100644 --- a/src/Repository/CartRepository.php +++ b/src/Repository/CartRepository.php @@ -38,7 +38,7 @@ class CartRepository extends AbstractRepository implements RepositoryInterface * @param string $langIso * @param bool $withSelecParameters * - * @return mixed + * @return void * * @throws \PrestaShopException */ diff --git a/src/Repository/CartRuleRepository.php b/src/Repository/CartRuleRepository.php index 545a6e08..f0841e45 100644 --- a/src/Repository/CartRuleRepository.php +++ b/src/Repository/CartRuleRepository.php @@ -38,7 +38,7 @@ class CartRuleRepository extends AbstractRepository implements RepositoryInterfa * @param string $langIso * @param bool $withSelecParameters * - * @return mixed + * @return void * * @throws \PrestaShopException */ diff --git a/src/Repository/CategoryRepository.php b/src/Repository/CategoryRepository.php index d2b2c2a0..f162b69a 100644 --- a/src/Repository/CategoryRepository.php +++ b/src/Repository/CategoryRepository.php @@ -38,7 +38,7 @@ class CategoryRepository extends AbstractRepository implements RepositoryInterfa * @param string $langIso * @param bool $withSelecParameters * - * @return mixed + * @return void * * @throws \PrestaShopException */ diff --git a/src/Repository/CurrencyRepository.php b/src/Repository/CurrencyRepository.php index 31e2e5a0..b85da292 100644 --- a/src/Repository/CurrencyRepository.php +++ b/src/Repository/CurrencyRepository.php @@ -38,7 +38,7 @@ class CurrencyRepository extends AbstractRepository implements RepositoryInterfa * @param string $langIso * @param bool $withSelecParameters * - * @return mixed + * @return void * * @throws \PrestaShopException */ diff --git a/src/Repository/CustomProductCarrierRepository.php b/src/Repository/CustomProductCarrierRepository.php index cbae7dcd..ca7aded3 100644 --- a/src/Repository/CustomProductCarrierRepository.php +++ b/src/Repository/CustomProductCarrierRepository.php @@ -38,7 +38,7 @@ class CustomProductCarrierRepository extends AbstractRepository implements Repos * @param string $langIso * @param bool $withSelecParameters * - * @return mixed + * @return void * * @throws \PrestaShopException */ diff --git a/src/Repository/CustomerRepository.php b/src/Repository/CustomerRepository.php index 94e6eb83..d5e44aa4 100644 --- a/src/Repository/CustomerRepository.php +++ b/src/Repository/CustomerRepository.php @@ -38,7 +38,7 @@ class CustomerRepository extends AbstractRepository implements RepositoryInterfa * @param string $langIso * @param bool $withSelecParameters * - * @return mixed + * @return void * * @throws \PrestaShopException */ diff --git a/src/Repository/EmployeeRepository.php b/src/Repository/EmployeeRepository.php index 15b1a373..b09bb554 100644 --- a/src/Repository/EmployeeRepository.php +++ b/src/Repository/EmployeeRepository.php @@ -38,7 +38,7 @@ class EmployeeRepository extends AbstractRepository implements RepositoryInterfa * @param string $langIso * @param bool $withSelecParameters * - * @return mixed + * @return void * * @throws \PrestaShopException */ diff --git a/src/Repository/ImageRepository.php b/src/Repository/ImageRepository.php index 4ebe7d65..b71d1d30 100644 --- a/src/Repository/ImageRepository.php +++ b/src/Repository/ImageRepository.php @@ -38,7 +38,7 @@ class ImageRepository extends AbstractRepository implements RepositoryInterface * @param string $langIso * @param bool $withSelecParameters * - * @return mixed + * @return void * * @throws \PrestaShopException */ diff --git a/src/Repository/ImageTypeRepository.php b/src/Repository/ImageTypeRepository.php index fbc872b4..20bb86dc 100644 --- a/src/Repository/ImageTypeRepository.php +++ b/src/Repository/ImageTypeRepository.php @@ -38,7 +38,7 @@ class ImageTypeRepository extends AbstractRepository implements RepositoryInterf * @param string $langIso * @param bool $withSelecParameters * - * @return mixed + * @return void * * @throws \PrestaShopException */ diff --git a/src/Repository/LanguageRepository.php b/src/Repository/LanguageRepository.php index ea0c8533..4e292d27 100644 --- a/src/Repository/LanguageRepository.php +++ b/src/Repository/LanguageRepository.php @@ -38,7 +38,7 @@ class LanguageRepository extends AbstractRepository implements RepositoryInterfa * @param string $langIso * @param bool $withSelecParameters * - * @return mixed + * @return void * * @throws \PrestaShopException */ diff --git a/src/Repository/ManufacturerRepository.php b/src/Repository/ManufacturerRepository.php index b2bbc81a..2e359bba 100644 --- a/src/Repository/ManufacturerRepository.php +++ b/src/Repository/ManufacturerRepository.php @@ -38,7 +38,7 @@ class ManufacturerRepository extends AbstractRepository implements RepositoryInt * @param string $langIso * @param bool $withSelecParameters * - * @return mixed + * @return void * * @throws \PrestaShopException */ diff --git a/src/Repository/ModuleRepository.php b/src/Repository/ModuleRepository.php index 41e4a41e..24b67193 100644 --- a/src/Repository/ModuleRepository.php +++ b/src/Repository/ModuleRepository.php @@ -38,7 +38,7 @@ class ModuleRepository extends AbstractRepository implements RepositoryInterface * @param string $langIso * @param bool $withSelecParameters * - * @return mixed + * @return void * * @throws \PrestaShopException */ diff --git a/src/Repository/OrderCarrierRepository.php b/src/Repository/OrderCarrierRepository.php index 709c153d..a5fe9b27 100644 --- a/src/Repository/OrderCarrierRepository.php +++ b/src/Repository/OrderCarrierRepository.php @@ -38,7 +38,7 @@ class OrderCarrierRepository extends AbstractRepository implements RepositoryInt * @param string $langIso * @param bool $withSelecParameters * - * @return mixed + * @return void * * @throws \PrestaShopException */ diff --git a/src/Repository/OrderCartRuleRepository.php b/src/Repository/OrderCartRuleRepository.php index 3795a04a..9d544d60 100644 --- a/src/Repository/OrderCartRuleRepository.php +++ b/src/Repository/OrderCartRuleRepository.php @@ -38,7 +38,7 @@ class OrderCartRuleRepository extends AbstractRepository implements RepositoryIn * @param string $langIso * @param bool $withSelecParameters * - * @return mixed + * @return void * * @throws \PrestaShopException */ diff --git a/src/Repository/OrderDetailRepository.php b/src/Repository/OrderDetailRepository.php index 5f1aebfc..bcba4277 100644 --- a/src/Repository/OrderDetailRepository.php +++ b/src/Repository/OrderDetailRepository.php @@ -38,7 +38,7 @@ class OrderDetailRepository extends AbstractRepository implements RepositoryInte * @param string $langIso * @param bool $withSelecParameters * - * @return mixed + * @return void * * @throws \PrestaShopException */ diff --git a/src/Repository/OrderRepository.php b/src/Repository/OrderRepository.php index e1f67e45..84c24b52 100644 --- a/src/Repository/OrderRepository.php +++ b/src/Repository/OrderRepository.php @@ -38,7 +38,7 @@ class OrderRepository extends AbstractRepository implements RepositoryInterface * @param string $langIso * @param bool $withSelecParameters * - * @return mixed + * @return void * * @throws \PrestaShopException */ @@ -176,7 +176,7 @@ public function countFullSyncContentLeft($offset, $limit, $langIso) $this->generateFullQuery($langIso, false); $result = $this->db->executeS(' - SELECT (COUNT(*) - ' . (int) $offset . ') AS count + SELECT COUNT(*) - ' . (int) $offset . ' AS count FROM (' . $this->query->build() . ') as subquery; '); diff --git a/src/Repository/OrderStatusHistoryRepository.php b/src/Repository/OrderStatusHistoryRepository.php index e60ca28d..d74990ff 100644 --- a/src/Repository/OrderStatusHistoryRepository.php +++ b/src/Repository/OrderStatusHistoryRepository.php @@ -38,7 +38,7 @@ class OrderStatusHistoryRepository extends AbstractRepository implements Reposit * @param string $langIso * @param bool $withSelecParameters * - * @return mixed + * @return void * * @throws \PrestaShopException */ diff --git a/src/Repository/ProductRepository.php b/src/Repository/ProductRepository.php index 4e0bf247..db62159e 100644 --- a/src/Repository/ProductRepository.php +++ b/src/Repository/ProductRepository.php @@ -38,7 +38,7 @@ class ProductRepository extends AbstractRepository implements RepositoryInterfac * @param string $langIso * @param bool $withSelecParameters * - * @return mixed + * @return void * * @throws \PrestaShopException */ diff --git a/src/Repository/ProductSupplierRepository.php b/src/Repository/ProductSupplierRepository.php index abc336fb..3abe82d6 100644 --- a/src/Repository/ProductSupplierRepository.php +++ b/src/Repository/ProductSupplierRepository.php @@ -38,7 +38,7 @@ class ProductSupplierRepository extends AbstractRepository implements Repository * @param string $langIso * @param bool $withSelecParameters * - * @return mixed + * @return void * * @throws \PrestaShopException */ diff --git a/src/Repository/RepositoryInterface.php b/src/Repository/RepositoryInterface.php index 9904a316..530b1c84 100644 --- a/src/Repository/RepositoryInterface.php +++ b/src/Repository/RepositoryInterface.php @@ -39,7 +39,7 @@ interface RepositoryInterface * @param string $langIso * @param bool $withSelecParameters * - * @return mixed + * @return void */ public function generateFullQuery($langIso, $withSelecParameters); diff --git a/src/Repository/SpecificPriceRepository.php b/src/Repository/SpecificPriceRepository.php index ea95c292..ed21db9b 100644 --- a/src/Repository/SpecificPriceRepository.php +++ b/src/Repository/SpecificPriceRepository.php @@ -38,7 +38,7 @@ class SpecificPriceRepository extends AbstractRepository implements RepositoryIn * @param string $langIso * @param bool $withSelecParameters * - * @return mixed + * @return void * * @throws \PrestaShopException */ diff --git a/src/Repository/StockMovementRepository.php b/src/Repository/StockMovementRepository.php index 6a03f05a..337b39f5 100644 --- a/src/Repository/StockMovementRepository.php +++ b/src/Repository/StockMovementRepository.php @@ -38,7 +38,7 @@ class StockMovementRepository extends AbstractRepository implements RepositoryIn * @param string $langIso * @param bool $withSelecParameters * - * @return mixed + * @return void * * @throws \PrestaShopException */ diff --git a/src/Repository/StockRepository.php b/src/Repository/StockRepository.php index 3e69300e..355581e6 100644 --- a/src/Repository/StockRepository.php +++ b/src/Repository/StockRepository.php @@ -38,7 +38,7 @@ class StockRepository extends AbstractRepository implements RepositoryInterface * @param string $langIso * @param bool $withSelecParameters * - * @return mixed + * @return void * * @throws \PrestaShopException */ diff --git a/src/Repository/StoreRepository.php b/src/Repository/StoreRepository.php index 6be5d5b9..8f3461b2 100644 --- a/src/Repository/StoreRepository.php +++ b/src/Repository/StoreRepository.php @@ -38,7 +38,7 @@ class StoreRepository extends AbstractRepository implements RepositoryInterface * @param string $langIso * @param bool $withSelecParameters * - * @return mixed + * @return void * * @throws \PrestaShopException */ diff --git a/src/Repository/SupplierRepository.php b/src/Repository/SupplierRepository.php index 9a2a81c4..1b716a20 100644 --- a/src/Repository/SupplierRepository.php +++ b/src/Repository/SupplierRepository.php @@ -38,7 +38,7 @@ class SupplierRepository extends AbstractRepository implements RepositoryInterfa * @param string $langIso * @param bool $withSelecParameters * - * @return mixed + * @return void * * @throws \PrestaShopException */ diff --git a/src/Repository/TaxonomyRepository.php b/src/Repository/TaxonomyRepository.php index edefb17e..53dab9fe 100644 --- a/src/Repository/TaxonomyRepository.php +++ b/src/Repository/TaxonomyRepository.php @@ -38,7 +38,7 @@ class TaxonomyRepository extends AbstractRepository implements RepositoryInterfa * @param string $langIso * @param bool $withSelecParameters * - * @return mixed + * @return void * * @throws \PrestaShopException */ diff --git a/src/Repository/TranslationRepository.php b/src/Repository/TranslationRepository.php index 62cb6d2a..cf483319 100644 --- a/src/Repository/TranslationRepository.php +++ b/src/Repository/TranslationRepository.php @@ -38,7 +38,7 @@ class TranslationRepository extends AbstractRepository implements RepositoryInte * @param string $langIso * @param bool $withSelecParameters * - * @return mixed + * @return void * * @throws \PrestaShopException */ diff --git a/src/Repository/WishlistProductRepository.php b/src/Repository/WishlistProductRepository.php index 764e50ad..01bc0f47 100644 --- a/src/Repository/WishlistProductRepository.php +++ b/src/Repository/WishlistProductRepository.php @@ -38,7 +38,7 @@ class WishlistProductRepository extends AbstractRepository implements Repository * @param string $langIso * @param bool $withSelecParameters * - * @return mixed + * @return void * * @throws \PrestaShopException */ diff --git a/src/Repository/WishlistRepository.php b/src/Repository/WishlistRepository.php index f56fc089..25558cfa 100644 --- a/src/Repository/WishlistRepository.php +++ b/src/Repository/WishlistRepository.php @@ -38,7 +38,7 @@ class WishlistRepository extends AbstractRepository implements RepositoryInterfa * @param string $langIso * @param bool $withSelecParameters * - * @return mixed + * @return void * * @throws \PrestaShopException */ From 485d263f3eaf3796e75fbb4fa024545108bf65a5 Mon Sep 17 00:00:00 2001 From: "John.R" Date: Fri, 17 Jan 2025 15:17:24 +0100 Subject: [PATCH 03/12] fix: order carrier hook miss --- e2e/src/fixtures/1.7/modules.json | 416 +++++++++++++++-------------- src/Traits/Hooks/UseOrderHooks.php | 24 +- 2 files changed, 242 insertions(+), 198 deletions(-) diff --git a/e2e/src/fixtures/1.7/modules.json b/e2e/src/fixtures/1.7/modules.json index fdbb20db..43147f97 100644 --- a/e2e/src/fixtures/1.7/modules.json +++ b/e2e/src/fixtures/1.7/modules.json @@ -5,10 +5,10 @@ "properties": { "module_id": "1", "name": "blockwishlist", - "module_version": "2.1.2", + "module_version": "2.0.1", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -17,10 +17,10 @@ "properties": { "module_id": "2", "name": "contactform", - "module_version": "4.4.1", + "module_version": "4.3.0", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -29,10 +29,10 @@ "properties": { "module_id": "3", "name": "dashactivity", - "module_version": "2.1.0", + "module_version": "2.0.2", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -41,10 +41,10 @@ "properties": { "module_id": "4", "name": "dashtrends", - "module_version": "2.1.2", + "module_version": "2.0.3", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -53,10 +53,10 @@ "properties": { "module_id": "5", "name": "dashgoals", - "module_version": "2.0.4", + "module_version": "2.0.2", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -65,10 +65,10 @@ "properties": { "module_id": "6", "name": "dashproducts", - "module_version": "2.1.3", + "module_version": "2.1.1", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -77,10 +77,10 @@ "properties": { "module_id": "7", "name": "graphnvd3", - "module_version": "2.0.3", + "module_version": "2.0.1", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -89,10 +89,10 @@ "properties": { "module_id": "8", "name": "gridhtml", - "module_version": "2.0.3", + "module_version": "2.0.1", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -101,10 +101,10 @@ "properties": { "module_id": "9", "name": "gsitemap", - "module_version": "4.3.0", + "module_version": "4.2.0", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -113,10 +113,10 @@ "properties": { "module_id": "10", "name": "pagesnotfound", - "module_version": "2.0.2", + "module_version": "2.0.0", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -125,10 +125,10 @@ "properties": { "module_id": "11", "name": "productcomments", - "module_version": "5.0.3", + "module_version": "4.2.2", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -137,10 +137,10 @@ "properties": { "module_id": "12", "name": "ps_banner", - "module_version": "2.1.2", + "module_version": "2.1.1", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -149,10 +149,10 @@ "properties": { "module_id": "13", "name": "ps_categorytree", - "module_version": "2.0.3", + "module_version": "2.0.2", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -161,10 +161,10 @@ "properties": { "module_id": "14", "name": "ps_checkpayment", - "module_version": "2.0.6", + "module_version": "2.0.5", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -173,10 +173,10 @@ "properties": { "module_id": "15", "name": "ps_contactinfo", - "module_version": "3.3.2", + "module_version": "3.3.0", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -185,10 +185,10 @@ "properties": { "module_id": "16", "name": "ps_crossselling", - "module_version": "2.0.2", + "module_version": "2.0.1", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -197,10 +197,10 @@ "properties": { "module_id": "17", "name": "ps_currencyselector", - "module_version": "2.1.1", + "module_version": "2.0.1", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -209,10 +209,10 @@ "properties": { "module_id": "18", "name": "ps_customeraccountlinks", - "module_version": "3.2.0", + "module_version": "3.1.1", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -221,10 +221,10 @@ "properties": { "module_id": "19", "name": "ps_customersignin", - "module_version": "2.0.5", + "module_version": "2.0.4", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -233,10 +233,10 @@ "properties": { "module_id": "20", "name": "ps_customtext", - "module_version": "4.2.1", + "module_version": "4.2.0", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -245,10 +245,10 @@ "properties": { "module_id": "21", "name": "ps_dataprivacy", - "module_version": "2.1.1", + "module_version": "2.0.1", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -257,10 +257,10 @@ "properties": { "module_id": "22", "name": "ps_emailsubscription", - "module_version": "2.7.1", + "module_version": "2.7.0", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -269,10 +269,10 @@ "properties": { "module_id": "24", "name": "ps_faviconnotificationbo", - "module_version": "2.1.3", + "module_version": "2.1.1", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -281,10 +281,10 @@ "properties": { "module_id": "25", "name": "ps_featuredproducts", - "module_version": "2.1.4", + "module_version": "2.1.0", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -293,10 +293,10 @@ "properties": { "module_id": "26", "name": "ps_imageslider", - "module_version": "3.1.3", + "module_version": "3.1.0", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -305,10 +305,10 @@ "properties": { "module_id": "27", "name": "ps_languageselector", - "module_version": "2.1.3", + "module_version": "2.1.0", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -317,10 +317,10 @@ "properties": { "module_id": "28", "name": "ps_linklist", - "module_version": "5.0.5", + "module_version": "5.0.4", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -329,10 +329,10 @@ "properties": { "module_id": "29", "name": "ps_mainmenu", - "module_version": "2.3.2", + "module_version": "2.3.1", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -341,10 +341,10 @@ "properties": { "module_id": "30", "name": "ps_searchbar", - "module_version": "2.1.3", + "module_version": "2.1.2", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -353,10 +353,10 @@ "properties": { "module_id": "31", "name": "ps_sharebuttons", - "module_version": "2.1.2", + "module_version": "2.1.1", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -365,10 +365,10 @@ "properties": { "module_id": "32", "name": "ps_shoppingcart", - "module_version": "2.0.7", + "module_version": "2.0.4", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -377,10 +377,10 @@ "properties": { "module_id": "33", "name": "ps_socialfollow", - "module_version": "2.3.0", + "module_version": "2.2.0", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -389,10 +389,10 @@ "properties": { "module_id": "34", "name": "ps_themecusto", - "module_version": "1.2.3", + "module_version": "1.2.1", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -401,10 +401,10 @@ "properties": { "module_id": "35", "name": "ps_wirepayment", - "module_version": "2.1.3", + "module_version": "2.1.0", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -413,10 +413,10 @@ "properties": { "module_id": "36", "name": "statsbestcategories", - "module_version": "2.0.1", + "module_version": "2.0.0", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -425,10 +425,10 @@ "properties": { "module_id": "37", "name": "statsbestcustomers", - "module_version": "2.0.4", + "module_version": "2.0.2", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -437,10 +437,10 @@ "properties": { "module_id": "38", "name": "statsbestproducts", - "module_version": "2.0.1", + "module_version": "2.0.0", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -449,10 +449,10 @@ "properties": { "module_id": "39", "name": "statsbestsuppliers", - "module_version": "2.0.2", + "module_version": "2.0.0", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -461,10 +461,10 @@ "properties": { "module_id": "40", "name": "statsbestvouchers", - "module_version": "2.0.1", + "module_version": "2.0.0", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -473,10 +473,10 @@ "properties": { "module_id": "41", "name": "statscarrier", - "module_version": "2.0.1", + "module_version": "2.0.0", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -485,10 +485,10 @@ "properties": { "module_id": "42", "name": "statscatalog", - "module_version": "2.0.3", + "module_version": "2.0.1", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -497,10 +497,10 @@ "properties": { "module_id": "43", "name": "statscheckup", - "module_version": "2.0.2", + "module_version": "2.0.1", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -509,10 +509,10 @@ "properties": { "module_id": "44", "name": "statsdata", - "module_version": "2.1.1", + "module_version": "2.1.0", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -521,10 +521,10 @@ "properties": { "module_id": "45", "name": "statsforecast", - "module_version": "2.0.4", + "module_version": "2.0.3", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -533,10 +533,10 @@ "properties": { "module_id": "46", "name": "statsnewsletter", - "module_version": "2.0.3", + "module_version": "2.0.2", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -545,10 +545,10 @@ "properties": { "module_id": "47", "name": "statspersonalinfos", - "module_version": "2.0.4", + "module_version": "2.0.3", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -557,10 +557,10 @@ "properties": { "module_id": "48", "name": "statsproduct", - "module_version": "2.1.1", + "module_version": "2.1.0", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -569,10 +569,10 @@ "properties": { "module_id": "49", "name": "statsregistrations", - "module_version": "2.0.1", + "module_version": "2.0.0", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -581,10 +581,10 @@ "properties": { "module_id": "50", "name": "statssales", - "module_version": "2.1.0", + "module_version": "2.0.0", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -593,10 +593,10 @@ "properties": { "module_id": "51", "name": "statssearch", - "module_version": "2.0.2", + "module_version": "2.0.1", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -605,10 +605,10 @@ "properties": { "module_id": "52", "name": "statsstock", - "module_version": "2.0.1", + "module_version": "2.0.0", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -617,10 +617,10 @@ "properties": { "module_id": "53", "name": "welcome", - "module_version": "6.0.9", + "module_version": "6.0.7", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { @@ -628,131 +628,155 @@ "collection": "modules", "properties": { "module_id": "54", + "name": "gamification", + "module_version": "2.5.1", + "active": true, + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" + } + }, + { + "action": "upsert", + "collection": "modules", + "properties": { + "module_id": "55", + "name": "psaddonsconnect", + "module_version": "2.1.0", + "active": true, + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" + } + }, + { + "action": "upsert", + "collection": "modules", + "properties": { + "module_id": "56", "name": "psgdpr", "module_version": "1.4.3", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { "action": "upsert", "collection": "modules", "properties": { - "module_id": "55", + "module_id": "57", "name": "ps_mbo", - "module_version": "3.0.1", + "module_version": "3.2.0", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { "action": "upsert", "collection": "modules", "properties": { - "module_id": "56", + "module_id": "58", "name": "ps_buybuttonlite", "module_version": "1.0.1", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { "action": "upsert", "collection": "modules", "properties": { - "module_id": "57", + "module_id": "59", "name": "ps_checkout", - "module_version": "7.3.5.2", + "module_version": "7.3.6.3", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { "action": "upsert", "collection": "modules", "properties": { - "module_id": "58", + "module_id": "60", "name": "ps_metrics", - "module_version": "4.0.3", + "module_version": "4.0.8", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { "action": "upsert", "collection": "modules", "properties": { - "module_id": "59", + "module_id": "61", "name": "ps_facebook", - "module_version": "1.33.2", + "module_version": "1.38.1", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { "action": "upsert", "collection": "modules", "properties": { - "module_id": "60", + "module_id": "62", "name": "psxmarketingwithgoogle", - "module_version": "1.63.0", + "module_version": "1.74.8", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { "action": "upsert", "collection": "modules", "properties": { - "module_id": "61", + "module_id": "63", "name": "blockreassurance", - "module_version": "5.1.2", + "module_version": "5.0.0", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { "action": "upsert", "collection": "modules", "properties": { - "module_id": "62", + "module_id": "64", "name": "ps_facetedsearch", - "module_version": "3.12.1", + "module_version": "3.7.1", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { "action": "upsert", "collection": "modules", "properties": { - "module_id": "63", + "module_id": "65", "name": "ps_accounts", - "module_version": "42.0.0", + "module_version": "7.0.2", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } }, { "action": "upsert", "collection": "modules", "properties": { - "module_id": "64", + "module_id": "66", "name": "ps_eventbus", "module_version": "0.0.0", "active": true, - "created_at": "2023-12-20T22:56:03+0100", - "updated_at": "2023-12-20T22:56:03+0100" + "created_at": "2024-10-26T07:33:06+0200", + "updated_at": "2024-10-26T07:33:06+0200" } } ] diff --git a/src/Traits/Hooks/UseOrderHooks.php b/src/Traits/Hooks/UseOrderHooks.php index 3d503449..d171e558 100644 --- a/src/Traits/Hooks/UseOrderHooks.php +++ b/src/Traits/Hooks/UseOrderHooks.php @@ -26,6 +26,7 @@ namespace PrestaShop\Module\PsEventbus\Traits\Hooks; +use Order; use PrestaShop\Module\PsEventbus\Config\Config; use PrestaShop\Module\PsEventbus\Service\SynchronizationService; @@ -45,12 +46,28 @@ public function hookActionObjectOrderAddAfter($parameters) /** @var SynchronizationService $synchronizationService * */ $synchronizationService = $this->getService(Config::SYNC_SERVICE_NAME); + /** @var Order $order */ $order = $parameters['object']; if (isset($order->id)) { - $synchronizationService->sendLiveSync(Config::COLLECTION_ORDERS, Config::INCREMENTAL_TYPE_UPSERT); + $synchronizationService->sendLiveSync( + [ + Config::COLLECTION_ORDERS, + Config::COLLECTION_ORDER_CART_RULES, + Config::COLLECTION_ORDER_DETAILS, + Config::COLLECTION_ORDER_STATUS_HISTORY, + Config::COLLECTION_ORDER_CARRIERS + ], + Config::INCREMENTAL_TYPE_UPSERT + ); $synchronizationService->insertContentIntoIncremental( - [Config::COLLECTION_ORDERS => $order->id], + [ + Config::COLLECTION_ORDERS => $order->id, + Config::COLLECTION_ORDER_CART_RULES => $order->id, + Config::COLLECTION_ORDER_DETAILS => $order->id, + Config::COLLECTION_ORDER_STATUS_HISTORY => $order->id, + Config::COLLECTION_ORDER_CARRIERS => $order->getIdOrderCarrier() + ], Config::INCREMENTAL_TYPE_UPSERT, date(DATE_ATOM), $this->shopId, @@ -69,6 +86,7 @@ public function hookActionObjectOrderUpdateAfter($parameters) /** @var SynchronizationService $synchronizationService * */ $synchronizationService = $this->getService(Config::SYNC_SERVICE_NAME); + /** @var Order $order */ $order = $parameters['object']; if (isset($order->id)) { @@ -78,6 +96,7 @@ public function hookActionObjectOrderUpdateAfter($parameters) Config::COLLECTION_ORDER_CART_RULES, Config::COLLECTION_ORDER_DETAILS, Config::COLLECTION_ORDER_STATUS_HISTORY, + Config::COLLECTION_ORDER_CARRIERS ], Config::INCREMENTAL_TYPE_UPSERT ); @@ -87,6 +106,7 @@ public function hookActionObjectOrderUpdateAfter($parameters) Config::COLLECTION_ORDER_CART_RULES => $order->id, Config::COLLECTION_ORDER_DETAILS => $order->id, Config::COLLECTION_ORDER_STATUS_HISTORY => $order->id, + Config::COLLECTION_ORDER_CARRIERS => $order->getIdOrderCarrier() ], Config::INCREMENTAL_TYPE_UPSERT, date(DATE_ATOM), From 7392c3a526a714a8a7aeca6edb9f9e0354d5c5d9 Mon Sep 17 00:00:00 2001 From: "John.R" Date: Fri, 17 Jan 2025 15:41:41 +0100 Subject: [PATCH 04/12] fix: phpcsfixer --- src/Repository/CarrierDetailRepository.php | 2 +- src/Traits/Hooks/UseOrderHooks.php | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/Repository/CarrierDetailRepository.php b/src/Repository/CarrierDetailRepository.php index 882c598e..b3cf36ac 100644 --- a/src/Repository/CarrierDetailRepository.php +++ b/src/Repository/CarrierDetailRepository.php @@ -59,7 +59,7 @@ public function generateFullQuery($langIso, $withSelecParameters) ; if ($withSelecParameters) { - $this->query + $this->query ->select('d.id_zone') ->select(' CASE diff --git a/src/Traits/Hooks/UseOrderHooks.php b/src/Traits/Hooks/UseOrderHooks.php index d171e558..dd12b2f8 100644 --- a/src/Traits/Hooks/UseOrderHooks.php +++ b/src/Traits/Hooks/UseOrderHooks.php @@ -26,7 +26,6 @@ namespace PrestaShop\Module\PsEventbus\Traits\Hooks; -use Order; use PrestaShop\Module\PsEventbus\Config\Config; use PrestaShop\Module\PsEventbus\Service\SynchronizationService; @@ -46,7 +45,7 @@ public function hookActionObjectOrderAddAfter($parameters) /** @var SynchronizationService $synchronizationService * */ $synchronizationService = $this->getService(Config::SYNC_SERVICE_NAME); - /** @var Order $order */ + /** @var \Order $order */ $order = $parameters['object']; if (isset($order->id)) { @@ -56,7 +55,7 @@ public function hookActionObjectOrderAddAfter($parameters) Config::COLLECTION_ORDER_CART_RULES, Config::COLLECTION_ORDER_DETAILS, Config::COLLECTION_ORDER_STATUS_HISTORY, - Config::COLLECTION_ORDER_CARRIERS + Config::COLLECTION_ORDER_CARRIERS, ], Config::INCREMENTAL_TYPE_UPSERT ); @@ -66,7 +65,7 @@ public function hookActionObjectOrderAddAfter($parameters) Config::COLLECTION_ORDER_CART_RULES => $order->id, Config::COLLECTION_ORDER_DETAILS => $order->id, Config::COLLECTION_ORDER_STATUS_HISTORY => $order->id, - Config::COLLECTION_ORDER_CARRIERS => $order->getIdOrderCarrier() + Config::COLLECTION_ORDER_CARRIERS => $order->getIdOrderCarrier(), ], Config::INCREMENTAL_TYPE_UPSERT, date(DATE_ATOM), @@ -86,7 +85,7 @@ public function hookActionObjectOrderUpdateAfter($parameters) /** @var SynchronizationService $synchronizationService * */ $synchronizationService = $this->getService(Config::SYNC_SERVICE_NAME); - /** @var Order $order */ + /** @var \Order $order */ $order = $parameters['object']; if (isset($order->id)) { @@ -96,7 +95,7 @@ public function hookActionObjectOrderUpdateAfter($parameters) Config::COLLECTION_ORDER_CART_RULES, Config::COLLECTION_ORDER_DETAILS, Config::COLLECTION_ORDER_STATUS_HISTORY, - Config::COLLECTION_ORDER_CARRIERS + Config::COLLECTION_ORDER_CARRIERS, ], Config::INCREMENTAL_TYPE_UPSERT ); @@ -106,7 +105,7 @@ public function hookActionObjectOrderUpdateAfter($parameters) Config::COLLECTION_ORDER_CART_RULES => $order->id, Config::COLLECTION_ORDER_DETAILS => $order->id, Config::COLLECTION_ORDER_STATUS_HISTORY => $order->id, - Config::COLLECTION_ORDER_CARRIERS => $order->getIdOrderCarrier() + Config::COLLECTION_ORDER_CARRIERS => $order->getIdOrderCarrier(), ], Config::INCREMENTAL_TYPE_UPSERT, date(DATE_ATOM), From 460bc1736c675d21c54d4eee303875abfe1534cc Mon Sep 17 00:00:00 2001 From: "John.R" Date: Fri, 17 Jan 2025 17:52:48 +0100 Subject: [PATCH 05/12] fix: cut all order hooks --- ps_eventbus.php | 5 ++ src/Traits/Hooks/UseOrderCarrierHooks.php | 87 ++++++++++++++++++++++ src/Traits/Hooks/UseOrderCartRuleHooks.php | 87 ++++++++++++++++++++++ src/Traits/Hooks/UseOrderDetailHooks.php | 87 ++++++++++++++++++++++ src/Traits/Hooks/UseOrderHistoryHooks.php | 87 ++++++++++++++++++++++ src/Traits/Hooks/UseOrderHooks.php | 38 +--------- src/Traits/Hooks/UseStockHooks.php | 27 ------- src/Traits/Hooks/UseStockMvtHooks.php | 64 ++++++++++++++++ src/Traits/UseHooks.php | 22 ++++++ 9 files changed, 443 insertions(+), 61 deletions(-) create mode 100644 src/Traits/Hooks/UseOrderCarrierHooks.php create mode 100644 src/Traits/Hooks/UseOrderCartRuleHooks.php create mode 100644 src/Traits/Hooks/UseOrderDetailHooks.php create mode 100644 src/Traits/Hooks/UseOrderHistoryHooks.php create mode 100644 src/Traits/Hooks/UseStockMvtHooks.php diff --git a/ps_eventbus.php b/ps_eventbus.php index 65ab809c..233e13d4 100644 --- a/ps_eventbus.php +++ b/ps_eventbus.php @@ -85,6 +85,11 @@ class Ps_eventbus extends Module */ public function __construct() { + $this->registerHook([ + 'actionObjectOrderCarrierAddAfter', + 'actionObjectOrderCarrierUpdateAfter' + ]); + if (defined('_PS_VERSION_') && version_compare(_PS_VERSION_, '1.7.8.0', '>=')) { $this->multistoreCompatibility = parent::MULTISTORE_COMPATIBILITY_YES; } diff --git a/src/Traits/Hooks/UseOrderCarrierHooks.php b/src/Traits/Hooks/UseOrderCarrierHooks.php new file mode 100644 index 00000000..160e7459 --- /dev/null +++ b/src/Traits/Hooks/UseOrderCarrierHooks.php @@ -0,0 +1,87 @@ + + * @copyright Since 2007 PrestaShop SA and Contributors + * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) + */ + +namespace PrestaShop\Module\PsEventbus\Traits\Hooks; + +use PrestaShop\Module\PsEventbus\Config\Config; +use PrestaShop\Module\PsEventbus\Service\SynchronizationService; + +if (!defined('_PS_VERSION_')) { + exit; +} + +trait UseOrderCarrierHooks +{ + /** + * @param array $parameters + * + * @return void + */ + public function hookActionObjectOrderCarrierAddAfter($parameters) + { + /** @var SynchronizationService $synchronizationService * */ + $synchronizationService = $this->getService(Config::SYNC_SERVICE_NAME); + + /** @var \OrderCarrier $orderCarrier */ + $orderCarrier = $parameters['object']; + + if (isset($orderCarrier->id)) { + $synchronizationService->sendLiveSync(Config::COLLECTION_ORDER_CARRIERS,Config::INCREMENTAL_TYPE_UPSERT); + $synchronizationService->insertContentIntoIncremental( + [Config::COLLECTION_ORDER_CARRIERS => $orderCarrier->id], + Config::INCREMENTAL_TYPE_UPSERT, + date(DATE_ATOM), + $this->shopId, + false + ); + } + } + + /** + * @param array $parameters + * + * @return void + */ + public function hookActionObjectOrderCarrierUpdateAfter($parameters) + { + /** @var SynchronizationService $synchronizationService * */ + $synchronizationService = $this->getService(Config::SYNC_SERVICE_NAME); + + /** @var \OrderCarrier $orderCarrier */ + $orderCarrier = $parameters['object']; + + if (isset($orderCarrier->id)) { + $synchronizationService->sendLiveSync(Config::COLLECTION_ORDER_CARRIERS, Config::INCREMENTAL_TYPE_UPSERT); + $synchronizationService->insertContentIntoIncremental( + [Config::COLLECTION_ORDER_CARRIERS => $orderCarrier->id], + Config::INCREMENTAL_TYPE_UPSERT, + date(DATE_ATOM), + $this->shopId, + false + ); + } + } +} diff --git a/src/Traits/Hooks/UseOrderCartRuleHooks.php b/src/Traits/Hooks/UseOrderCartRuleHooks.php new file mode 100644 index 00000000..5660ca6f --- /dev/null +++ b/src/Traits/Hooks/UseOrderCartRuleHooks.php @@ -0,0 +1,87 @@ + + * @copyright Since 2007 PrestaShop SA and Contributors + * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) + */ + +namespace PrestaShop\Module\PsEventbus\Traits\Hooks; + +use PrestaShop\Module\PsEventbus\Config\Config; +use PrestaShop\Module\PsEventbus\Service\SynchronizationService; + +if (!defined('_PS_VERSION_')) { + exit; +} + +trait UseOrderCartRuleHooks +{ + /** + * @param array $parameters + * + * @return void + */ + public function hookActionObjectOrderCartRuleAddAfter($parameters) + { + /** @var SynchronizationService $synchronizationService * */ + $synchronizationService = $this->getService(Config::SYNC_SERVICE_NAME); + + /** @var \OrderCartRule $orderCartRule */ + $orderCartRule = $parameters['object']; + + if (isset($orderCartRule->id)) { + $synchronizationService->sendLiveSync(Config::COLLECTION_ORDER_CART_RULES, Config::INCREMENTAL_TYPE_UPSERT); + $synchronizationService->insertContentIntoIncremental( + [Config::COLLECTION_ORDER_CART_RULES => $orderCartRule->id], + Config::INCREMENTAL_TYPE_UPSERT, + date(DATE_ATOM), + $this->shopId, + false + ); + } + } + + /** + * @param array $parameters + * + * @return void + */ + public function hookActionObjectOrderCartRuleUpdateAfter($parameters) + { + /** @var SynchronizationService $synchronizationService * */ + $synchronizationService = $this->getService(Config::SYNC_SERVICE_NAME); + + /** @var \OrderCartRule $orderCartRule */ + $orderCartRule = $parameters['object']; + + if (isset($orderCartRule->id)) { + $synchronizationService->sendLiveSync(Config::COLLECTION_ORDER_CART_RULES, Config::INCREMENTAL_TYPE_UPSERT); + $synchronizationService->insertContentIntoIncremental( + [Config::COLLECTION_ORDER_CART_RULES => $orderCartRule->id], + Config::INCREMENTAL_TYPE_UPSERT, + date(DATE_ATOM), + $this->shopId, + false + ); + } + } +} diff --git a/src/Traits/Hooks/UseOrderDetailHooks.php b/src/Traits/Hooks/UseOrderDetailHooks.php new file mode 100644 index 00000000..45073ad8 --- /dev/null +++ b/src/Traits/Hooks/UseOrderDetailHooks.php @@ -0,0 +1,87 @@ + + * @copyright Since 2007 PrestaShop SA and Contributors + * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) + */ + +namespace PrestaShop\Module\PsEventbus\Traits\Hooks; + +use PrestaShop\Module\PsEventbus\Config\Config; +use PrestaShop\Module\PsEventbus\Service\SynchronizationService; + +if (!defined('_PS_VERSION_')) { + exit; +} + +trait UseOrderDetailHooks +{ + /** + * @param array $parameters + * + * @return void + */ + public function hookActionObjectOrderDetailAddAfter($parameters) + { + /** @var SynchronizationService $synchronizationService * */ + $synchronizationService = $this->getService(Config::SYNC_SERVICE_NAME); + + /** @var \OrderDetail $orderDetail */ + $orderDetail = $parameters['object']; + + if (isset($orderDetail->id)) { + $synchronizationService->sendLiveSync(Config::COLLECTION_ORDER_DETAILS, Config::INCREMENTAL_TYPE_UPSERT); + $synchronizationService->insertContentIntoIncremental( + [Config::COLLECTION_ORDER_DETAILS => $orderDetail->id], + Config::INCREMENTAL_TYPE_UPSERT, + date(DATE_ATOM), + $this->shopId, + false + ); + } + } + + /** + * @param array $parameters + * + * @return void + */ + public function hookActionObjectOrderDetailUpdateAfter($parameters) + { + /** @var SynchronizationService $synchronizationService * */ + $synchronizationService = $this->getService(Config::SYNC_SERVICE_NAME); + + /** @var \OrderDetail $orderDetail */ + $orderDetail = $parameters['object']; + + if (isset($orderDetail->id)) { + $synchronizationService->sendLiveSync(Config::COLLECTION_ORDER_DETAILS, Config::INCREMENTAL_TYPE_UPSERT); + $synchronizationService->insertContentIntoIncremental( + [Config::COLLECTION_ORDER_DETAILS => $orderDetail->id], + Config::INCREMENTAL_TYPE_UPSERT, + date(DATE_ATOM), + $this->shopId, + false + ); + } + } +} diff --git a/src/Traits/Hooks/UseOrderHistoryHooks.php b/src/Traits/Hooks/UseOrderHistoryHooks.php new file mode 100644 index 00000000..127a92f8 --- /dev/null +++ b/src/Traits/Hooks/UseOrderHistoryHooks.php @@ -0,0 +1,87 @@ + + * @copyright Since 2007 PrestaShop SA and Contributors + * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) + */ + +namespace PrestaShop\Module\PsEventbus\Traits\Hooks; + +use PrestaShop\Module\PsEventbus\Config\Config; +use PrestaShop\Module\PsEventbus\Service\SynchronizationService; + +if (!defined('_PS_VERSION_')) { + exit; +} + +trait UseOrderHistoryHooks +{ + /** + * @param array $parameters + * + * @return void + */ + public function hookActionOrderHistoryAddAfter($parameters) + { + /** @var SynchronizationService $synchronizationService * */ + $synchronizationService = $this->getService(Config::SYNC_SERVICE_NAME); + + /** @var \OrderHistory $orderHistory */ + $orderHistory = $parameters['object']; + + if (isset($orderHistory->id)) { + $synchronizationService->sendLiveSync(Config::COLLECTION_ORDER_STATUS_HISTORY, Config::INCREMENTAL_TYPE_UPSERT); + $synchronizationService->insertContentIntoIncremental( + [Config::COLLECTION_ORDER_STATUS_HISTORY => $orderHistory->id], + Config::INCREMENTAL_TYPE_UPSERT, + date(DATE_ATOM), + $this->shopId, + false + ); + } + } + + /** + * @param array $parameters + * + * @return void + */ + public function hookActionObjectOrderHistoryUpdateAfter($parameters) + { + /** @var SynchronizationService $synchronizationService * */ + $synchronizationService = $this->getService(Config::SYNC_SERVICE_NAME); + + /** @var \OrderHistory $orderHistory */ + $orderHistory = $parameters['object']; + + if (isset($orderHistory->id)) { + $synchronizationService->sendLiveSync(Config::COLLECTION_ORDER_STATUS_HISTORY, Config::INCREMENTAL_TYPE_UPSERT); + $synchronizationService->insertContentIntoIncremental( + [Config::COLLECTION_ORDER_STATUS_HISTORY => $orderHistory->id], + Config::INCREMENTAL_TYPE_UPSERT, + date(DATE_ATOM), + $this->shopId, + false + ); + } + } +} diff --git a/src/Traits/Hooks/UseOrderHooks.php b/src/Traits/Hooks/UseOrderHooks.php index dd12b2f8..254b5955 100644 --- a/src/Traits/Hooks/UseOrderHooks.php +++ b/src/Traits/Hooks/UseOrderHooks.php @@ -49,24 +49,9 @@ public function hookActionObjectOrderAddAfter($parameters) $order = $parameters['object']; if (isset($order->id)) { - $synchronizationService->sendLiveSync( - [ - Config::COLLECTION_ORDERS, - Config::COLLECTION_ORDER_CART_RULES, - Config::COLLECTION_ORDER_DETAILS, - Config::COLLECTION_ORDER_STATUS_HISTORY, - Config::COLLECTION_ORDER_CARRIERS, - ], - Config::INCREMENTAL_TYPE_UPSERT - ); + $synchronizationService->sendLiveSync(Config::COLLECTION_ORDERS, Config::INCREMENTAL_TYPE_UPSERT); $synchronizationService->insertContentIntoIncremental( - [ - Config::COLLECTION_ORDERS => $order->id, - Config::COLLECTION_ORDER_CART_RULES => $order->id, - Config::COLLECTION_ORDER_DETAILS => $order->id, - Config::COLLECTION_ORDER_STATUS_HISTORY => $order->id, - Config::COLLECTION_ORDER_CARRIERS => $order->getIdOrderCarrier(), - ], + [Config::COLLECTION_ORDERS => $order->id], Config::INCREMENTAL_TYPE_UPSERT, date(DATE_ATOM), $this->shopId, @@ -89,24 +74,9 @@ public function hookActionObjectOrderUpdateAfter($parameters) $order = $parameters['object']; if (isset($order->id)) { - $synchronizationService->sendLiveSync( - [ - Config::COLLECTION_ORDERS, - Config::COLLECTION_ORDER_CART_RULES, - Config::COLLECTION_ORDER_DETAILS, - Config::COLLECTION_ORDER_STATUS_HISTORY, - Config::COLLECTION_ORDER_CARRIERS, - ], - Config::INCREMENTAL_TYPE_UPSERT - ); + $synchronizationService->sendLiveSync(Config::COLLECTION_ORDERS, Config::INCREMENTAL_TYPE_UPSERT); $synchronizationService->insertContentIntoIncremental( - [ - Config::COLLECTION_ORDERS => $order->id, - Config::COLLECTION_ORDER_CART_RULES => $order->id, - Config::COLLECTION_ORDER_DETAILS => $order->id, - Config::COLLECTION_ORDER_STATUS_HISTORY => $order->id, - Config::COLLECTION_ORDER_CARRIERS => $order->getIdOrderCarrier(), - ], + [Config::COLLECTION_ORDERS => $order->id], Config::INCREMENTAL_TYPE_UPSERT, date(DATE_ATOM), $this->shopId, diff --git a/src/Traits/Hooks/UseStockHooks.php b/src/Traits/Hooks/UseStockHooks.php index 29414ee4..3f74bb1d 100644 --- a/src/Traits/Hooks/UseStockHooks.php +++ b/src/Traits/Hooks/UseStockHooks.php @@ -84,31 +84,4 @@ public function hookActionObjectStockAvailableUpdateAfter($parameters) ); } } - - /** - * Work Only on 1.6 - * - * @param array $parameters - * - * @return void - */ - public function hookActionObjectStockMvtAddAfter($parameters) - { - /** @var SynchronizationService $synchronizationService * */ - $synchronizationService = $this->getService(Config::SYNC_SERVICE_NAME); - - /** @var \StockMvt $stockMvt */ - $stockMvt = $parameters['object']; - - if (isset($stockMvt->id)) { - $synchronizationService->sendLiveSync(Config::COLLECTION_STOCK_MOVEMENTS, Config::INCREMENTAL_TYPE_UPSERT); - $synchronizationService->insertContentIntoIncremental( - [Config::COLLECTION_STOCK_MOVEMENTS => $stockMvt->id], - Config::INCREMENTAL_TYPE_UPSERT, - date(DATE_ATOM), - $this->shopId, - true - ); - } - } } diff --git a/src/Traits/Hooks/UseStockMvtHooks.php b/src/Traits/Hooks/UseStockMvtHooks.php new file mode 100644 index 00000000..abca9ee6 --- /dev/null +++ b/src/Traits/Hooks/UseStockMvtHooks.php @@ -0,0 +1,64 @@ + + * @copyright Since 2007 PrestaShop SA and Contributors + * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) + */ + +namespace PrestaShop\Module\PsEventbus\Traits\Hooks; + +use PrestaShop\Module\PsEventbus\Config\Config; +use PrestaShop\Module\PsEventbus\Service\SynchronizationService; + +if (!defined('_PS_VERSION_')) { + exit; +} + +trait UseStockMVtHooks +{ + /** + * Work Only on 1.6 + * + * @param array $parameters + * + * @return void + */ + public function hookActionObjectStockMvtAddAfter($parameters) + { + /** @var SynchronizationService $synchronizationService * */ + $synchronizationService = $this->getService(Config::SYNC_SERVICE_NAME); + + /** @var \StockMvt $stockMvt */ + $stockMvt = $parameters['object']; + + if (isset($stockMvt->id)) { + $synchronizationService->sendLiveSync(Config::COLLECTION_STOCK_MOVEMENTS, Config::INCREMENTAL_TYPE_UPSERT); + $synchronizationService->insertContentIntoIncremental( + [Config::COLLECTION_STOCK_MOVEMENTS => $stockMvt->id], + Config::INCREMENTAL_TYPE_UPSERT, + date(DATE_ATOM), + $this->shopId, + true + ); + } + } +} diff --git a/src/Traits/UseHooks.php b/src/Traits/UseHooks.php index f29f7f86..dc63e4c9 100644 --- a/src/Traits/UseHooks.php +++ b/src/Traits/UseHooks.php @@ -38,10 +38,15 @@ use PrestaShop\Module\PsEventbus\Traits\Hooks\UseImageTypeHooks; use PrestaShop\Module\PsEventbus\Traits\Hooks\UseLanguageHooks; use PrestaShop\Module\PsEventbus\Traits\Hooks\UseManufacturerHooks; +use PrestaShop\Module\PsEventbus\Traits\Hooks\UseOrderCarrierHooks; +use PrestaShop\Module\PsEventbus\Traits\Hooks\UseOrderCartRuleHooks; +use PrestaShop\Module\PsEventbus\Traits\Hooks\UseOrderDetailHooks; +use PrestaShop\Module\PsEventbus\Traits\Hooks\UseOrderHistoryHooks; use PrestaShop\Module\PsEventbus\Traits\Hooks\UseOrderHooks; use PrestaShop\Module\PsEventbus\Traits\Hooks\UseProductHooks; use PrestaShop\Module\PsEventbus\Traits\Hooks\UseSpecificPriceHooks; use PrestaShop\Module\PsEventbus\Traits\Hooks\UseStockHooks; +use PrestaShop\Module\PsEventbus\Traits\Hooks\UseStockMVtHooks; use PrestaShop\Module\PsEventbus\Traits\Hooks\UseStoreHooks; use PrestaShop\Module\PsEventbus\Traits\Hooks\UseSupplierHooks; use PrestaShop\Module\PsEventbus\Traits\Hooks\UseWishlistHooks; @@ -64,10 +69,15 @@ trait UseHooks use UseImageTypeHooks; use UseLanguageHooks; use UseManufacturerHooks; + use UseOrderCarrierHooks; + use UseOrderCartRuleHooks; + use UseOrderDetailHooks; + use UseOrderHistoryHooks; use UseOrderHooks; use UseProductHooks; use UseSpecificPriceHooks; use UseStockHooks; + use UseStockMVtHooks; use UseStoreHooks; use UseSupplierHooks; use UseWishlistHooks; @@ -126,6 +136,18 @@ public function getHooks() 'actionObjectManufacturerUpdateAfter', 'actionObjectManufacturerDeleteAfter', + 'actionObjectOrderCarrierAddAfter', + 'actionObjectOrderCarrierUpdateAfter', + + 'actionObjectOrderCartRuleAddAfter', + 'actionObjectOrderCartRuleUpdateAfter', + + 'actionObjectOrderDetailAddAfter', + 'actionObjectOrderDetailUpdateAfter', + + 'actionObjectOrderHistoryAddAfter', + 'actionObjectOrderHistoryUpdateAfter', + 'actionObjectOrderAddAfter', 'actionObjectOrderUpdateAfter', From 8cf904070325ead2d27de74183860df4d12a9384 Mon Sep 17 00:00:00 2001 From: "John.R" Date: Fri, 17 Jan 2025 17:57:24 +0100 Subject: [PATCH 06/12] fix: order histories --- src/Traits/Hooks/UseOrderHistoryHooks.php | 2 +- src/Traits/Hooks/UseStockMvtHooks.php | 2 +- src/Traits/UseHooks.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Traits/Hooks/UseOrderHistoryHooks.php b/src/Traits/Hooks/UseOrderHistoryHooks.php index 127a92f8..325c6ca4 100644 --- a/src/Traits/Hooks/UseOrderHistoryHooks.php +++ b/src/Traits/Hooks/UseOrderHistoryHooks.php @@ -40,7 +40,7 @@ trait UseOrderHistoryHooks * * @return void */ - public function hookActionOrderHistoryAddAfter($parameters) + public function hookActionObjectOrderHistoryAddAfter($parameters) { /** @var SynchronizationService $synchronizationService * */ $synchronizationService = $this->getService(Config::SYNC_SERVICE_NAME); diff --git a/src/Traits/Hooks/UseStockMvtHooks.php b/src/Traits/Hooks/UseStockMvtHooks.php index abca9ee6..f4a37d84 100644 --- a/src/Traits/Hooks/UseStockMvtHooks.php +++ b/src/Traits/Hooks/UseStockMvtHooks.php @@ -33,7 +33,7 @@ exit; } -trait UseStockMVtHooks +trait UseStockMvtHooks { /** * Work Only on 1.6 diff --git a/src/Traits/UseHooks.php b/src/Traits/UseHooks.php index dc63e4c9..02b36a40 100644 --- a/src/Traits/UseHooks.php +++ b/src/Traits/UseHooks.php @@ -46,7 +46,7 @@ use PrestaShop\Module\PsEventbus\Traits\Hooks\UseProductHooks; use PrestaShop\Module\PsEventbus\Traits\Hooks\UseSpecificPriceHooks; use PrestaShop\Module\PsEventbus\Traits\Hooks\UseStockHooks; -use PrestaShop\Module\PsEventbus\Traits\Hooks\UseStockMVtHooks; +use PrestaShop\Module\PsEventbus\Traits\Hooks\UseStockMvtHooks; use PrestaShop\Module\PsEventbus\Traits\Hooks\UseStoreHooks; use PrestaShop\Module\PsEventbus\Traits\Hooks\UseSupplierHooks; use PrestaShop\Module\PsEventbus\Traits\Hooks\UseWishlistHooks; @@ -77,7 +77,7 @@ trait UseHooks use UseProductHooks; use UseSpecificPriceHooks; use UseStockHooks; - use UseStockMVtHooks; + use UseStockMvtHooks; use UseStoreHooks; use UseSupplierHooks; use UseWishlistHooks; From e1c50937173c1533d2318450e896073b4cce03aa Mon Sep 17 00:00:00 2001 From: "John.R" Date: Mon, 20 Jan 2025 09:36:28 +0100 Subject: [PATCH 07/12] fix: repositories --- ps_eventbus.php | 5 ----- src/Repository/OrderCartRuleRepository.php | 4 ++-- src/Repository/OrderDetailRepository.php | 4 ++-- src/Repository/OrderStatusHistoryRepository.php | 4 ++-- 4 files changed, 6 insertions(+), 11 deletions(-) diff --git a/ps_eventbus.php b/ps_eventbus.php index 233e13d4..65ab809c 100644 --- a/ps_eventbus.php +++ b/ps_eventbus.php @@ -85,11 +85,6 @@ class Ps_eventbus extends Module */ public function __construct() { - $this->registerHook([ - 'actionObjectOrderCarrierAddAfter', - 'actionObjectOrderCarrierUpdateAfter' - ]); - if (defined('_PS_VERSION_') && version_compare(_PS_VERSION_, '1.7.8.0', '>=')) { $this->multistoreCompatibility = parent::MULTISTORE_COMPATIBILITY_YES; } diff --git a/src/Repository/OrderCartRuleRepository.php b/src/Repository/OrderCartRuleRepository.php index 9d544d60..2cda0547 100644 --- a/src/Repository/OrderCartRuleRepository.php +++ b/src/Repository/OrderCartRuleRepository.php @@ -101,8 +101,8 @@ public function retrieveContentsForIncremental($limit, $contentIds, $langIso) $this->generateFullQuery($langIso, true); $this->query - ->where('ocr.id_order IN(' . implode(',', array_map('intval', $contentIds)) . ')') - // ->limit($limit) Sub shop content depend from another, temporary disabled + ->where('ocr.id_order_cart_rule IN(' . implode(',', array_map('intval', $contentIds)) . ')') + ->limit($limit) ; return $this->runQuery(); diff --git a/src/Repository/OrderDetailRepository.php b/src/Repository/OrderDetailRepository.php index bcba4277..7f2a5c27 100644 --- a/src/Repository/OrderDetailRepository.php +++ b/src/Repository/OrderDetailRepository.php @@ -124,8 +124,8 @@ public function retrieveContentsForIncremental($limit, $contentIds, $langIso) $this->generateFullQuery($langIso, true); $this->query - ->where('od.id_order IN(' . implode(',', array_map('intval', $contentIds)) . ')') - // ->limit($limit) Sub shop content depend from another, temporary disabled + ->where('od.id_order_detail IN(' . implode(',', array_map('intval', $contentIds)) . ')') + ->limit($limit) ; return $this->runQuery(); diff --git a/src/Repository/OrderStatusHistoryRepository.php b/src/Repository/OrderStatusHistoryRepository.php index d74990ff..989ea401 100644 --- a/src/Repository/OrderStatusHistoryRepository.php +++ b/src/Repository/OrderStatusHistoryRepository.php @@ -108,8 +108,8 @@ public function retrieveContentsForIncremental($limit, $contentIds, $langIso) $this->generateFullQuery($langIso, true); $this->query - ->where('oh.id_order IN(' . implode(',', array_map('intval', $contentIds)) . ')') - // ->limit($limit) Sub shop content depend from another, temporary disabled + ->where('oh.id_order_history IN(' . implode(',', array_map('intval', $contentIds)) . ')') + ->limit($limit) ; return $this->runQuery(); From c45c516834b22b61e0596bdb02f3ecfbd31a5d42 Mon Sep 17 00:00:00 2001 From: "John.R" Date: Mon, 20 Jan 2025 10:12:48 +0100 Subject: [PATCH 08/12] fix: bundles --- src/Repository/BundleRepository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Repository/BundleRepository.php b/src/Repository/BundleRepository.php index 6ed08b26..a86c80a3 100644 --- a/src/Repository/BundleRepository.php +++ b/src/Repository/BundleRepository.php @@ -103,7 +103,7 @@ public function retrieveContentsForIncremental($limit, $contentIds, $langIso) $this->query ->where('pac.id_product_pack IN(' . implode(',', array_map('intval', $contentIds)) . ')') - // ->limit($limit) Sub shop content depend from another, temporary disabled + ->limit($limit) ; return $this->runQuery(); From af9c7b10e14de5ec630781af72124a74612b7700 Mon Sep 17 00:00:00 2001 From: "John.R" Date: Mon, 20 Jan 2025 10:22:31 +0100 Subject: [PATCH 09/12] fix: phpcsfixer --- src/Traits/Hooks/UseOrderCarrierHooks.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Traits/Hooks/UseOrderCarrierHooks.php b/src/Traits/Hooks/UseOrderCarrierHooks.php index 160e7459..183cfd6c 100644 --- a/src/Traits/Hooks/UseOrderCarrierHooks.php +++ b/src/Traits/Hooks/UseOrderCarrierHooks.php @@ -44,12 +44,12 @@ public function hookActionObjectOrderCarrierAddAfter($parameters) { /** @var SynchronizationService $synchronizationService * */ $synchronizationService = $this->getService(Config::SYNC_SERVICE_NAME); - + /** @var \OrderCarrier $orderCarrier */ $orderCarrier = $parameters['object']; if (isset($orderCarrier->id)) { - $synchronizationService->sendLiveSync(Config::COLLECTION_ORDER_CARRIERS,Config::INCREMENTAL_TYPE_UPSERT); + $synchronizationService->sendLiveSync(Config::COLLECTION_ORDER_CARRIERS, Config::INCREMENTAL_TYPE_UPSERT); $synchronizationService->insertContentIntoIncremental( [Config::COLLECTION_ORDER_CARRIERS => $orderCarrier->id], Config::INCREMENTAL_TYPE_UPSERT, From 7be57a492ff3af4eab6e1bdc38d3ef1288a8d456 Mon Sep 17 00:00:00 2001 From: "John.R" Date: Mon, 20 Jan 2025 10:35:25 +0100 Subject: [PATCH 10/12] fix: account integration in error handler for test units --- src/Handler/ErrorHandler/ErrorHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Handler/ErrorHandler/ErrorHandler.php b/src/Handler/ErrorHandler/ErrorHandler.php index 20606b47..d43b7c3f 100644 --- a/src/Handler/ErrorHandler/ErrorHandler.php +++ b/src/Handler/ErrorHandler/ErrorHandler.php @@ -54,7 +54,7 @@ public function __construct($sentryDsn, $sentryEnv) /** @var \ModuleCore $accountsModule */ $accountsModule = \Module::getInstanceByName('ps_accounts'); /** @var mixed $accountService */ - $accountService = $accountsModule->get('PrestaShop\Module\PsAccounts\Service\PsAccountsService'); + $accountService = $accountsModule->getService('PrestaShop\Module\PsAccounts\Service\PsAccountsService'); /** @var \ModuleCore $eventbusModule */ $eventbusModule = \Module::getInstanceByName('ps_eventbus'); From e3ea7c3853e0dbacd5ecc3a447137b908b02e976 Mon Sep 17 00:00:00 2001 From: "John.R" Date: Mon, 20 Jan 2025 10:51:38 +0100 Subject: [PATCH 11/12] fix: phpstan --- src/Handler/ErrorHandler/ErrorHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Handler/ErrorHandler/ErrorHandler.php b/src/Handler/ErrorHandler/ErrorHandler.php index d43b7c3f..d2fb4c7b 100644 --- a/src/Handler/ErrorHandler/ErrorHandler.php +++ b/src/Handler/ErrorHandler/ErrorHandler.php @@ -51,7 +51,7 @@ class ErrorHandler public function __construct($sentryDsn, $sentryEnv) { try { - /** @var \ModuleCore $accountsModule */ + /** @var false|\ModuleCore $accountsModule */ $accountsModule = \Module::getInstanceByName('ps_accounts'); /** @var mixed $accountService */ $accountService = $accountsModule->getService('PrestaShop\Module\PsAccounts\Service\PsAccountsService'); From 0c5f304ba14457ef9f1b10f107391ef9b62d5405 Mon Sep 17 00:00:00 2001 From: "John.R" Date: Mon, 20 Jan 2025 11:00:21 +0100 Subject: [PATCH 12/12] fix: modules fixtures --- e2e/src/fixtures/1.7/modules.json | 404 ++++++++++++++---------------- 1 file changed, 190 insertions(+), 214 deletions(-) diff --git a/e2e/src/fixtures/1.7/modules.json b/e2e/src/fixtures/1.7/modules.json index 43147f97..310a6483 100644 --- a/e2e/src/fixtures/1.7/modules.json +++ b/e2e/src/fixtures/1.7/modules.json @@ -5,10 +5,10 @@ "properties": { "module_id": "1", "name": "blockwishlist", - "module_version": "2.0.1", + "module_version": "2.1.2", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -17,10 +17,10 @@ "properties": { "module_id": "2", "name": "contactform", - "module_version": "4.3.0", + "module_version": "4.4.1", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -29,10 +29,10 @@ "properties": { "module_id": "3", "name": "dashactivity", - "module_version": "2.0.2", + "module_version": "2.1.0", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -41,10 +41,10 @@ "properties": { "module_id": "4", "name": "dashtrends", - "module_version": "2.0.3", + "module_version": "2.1.2", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -53,10 +53,10 @@ "properties": { "module_id": "5", "name": "dashgoals", - "module_version": "2.0.2", + "module_version": "2.0.4", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -65,10 +65,10 @@ "properties": { "module_id": "6", "name": "dashproducts", - "module_version": "2.1.1", + "module_version": "2.1.3", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -77,10 +77,10 @@ "properties": { "module_id": "7", "name": "graphnvd3", - "module_version": "2.0.1", + "module_version": "2.0.3", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -89,10 +89,10 @@ "properties": { "module_id": "8", "name": "gridhtml", - "module_version": "2.0.1", + "module_version": "2.0.3", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -101,10 +101,10 @@ "properties": { "module_id": "9", "name": "gsitemap", - "module_version": "4.2.0", + "module_version": "4.3.0", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -113,10 +113,10 @@ "properties": { "module_id": "10", "name": "pagesnotfound", - "module_version": "2.0.0", + "module_version": "2.0.2", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -125,10 +125,10 @@ "properties": { "module_id": "11", "name": "productcomments", - "module_version": "4.2.2", + "module_version": "5.0.3", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -137,10 +137,10 @@ "properties": { "module_id": "12", "name": "ps_banner", - "module_version": "2.1.1", + "module_version": "2.1.2", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -149,10 +149,10 @@ "properties": { "module_id": "13", "name": "ps_categorytree", - "module_version": "2.0.2", + "module_version": "2.0.3", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -161,10 +161,10 @@ "properties": { "module_id": "14", "name": "ps_checkpayment", - "module_version": "2.0.5", + "module_version": "2.0.6", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -173,10 +173,10 @@ "properties": { "module_id": "15", "name": "ps_contactinfo", - "module_version": "3.3.0", + "module_version": "3.3.2", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -185,10 +185,10 @@ "properties": { "module_id": "16", "name": "ps_crossselling", - "module_version": "2.0.1", + "module_version": "2.0.2", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -197,10 +197,10 @@ "properties": { "module_id": "17", "name": "ps_currencyselector", - "module_version": "2.0.1", + "module_version": "2.1.1", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -209,10 +209,10 @@ "properties": { "module_id": "18", "name": "ps_customeraccountlinks", - "module_version": "3.1.1", + "module_version": "3.2.0", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -221,10 +221,10 @@ "properties": { "module_id": "19", "name": "ps_customersignin", - "module_version": "2.0.4", + "module_version": "2.0.5", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -233,10 +233,10 @@ "properties": { "module_id": "20", "name": "ps_customtext", - "module_version": "4.2.0", + "module_version": "4.2.1", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -245,10 +245,10 @@ "properties": { "module_id": "21", "name": "ps_dataprivacy", - "module_version": "2.0.1", + "module_version": "2.1.1", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -257,10 +257,10 @@ "properties": { "module_id": "22", "name": "ps_emailsubscription", - "module_version": "2.7.0", + "module_version": "2.7.1", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -269,10 +269,10 @@ "properties": { "module_id": "24", "name": "ps_faviconnotificationbo", - "module_version": "2.1.1", + "module_version": "2.1.3", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -281,10 +281,10 @@ "properties": { "module_id": "25", "name": "ps_featuredproducts", - "module_version": "2.1.0", + "module_version": "2.1.4", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -293,10 +293,10 @@ "properties": { "module_id": "26", "name": "ps_imageslider", - "module_version": "3.1.0", + "module_version": "3.1.3", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -305,10 +305,10 @@ "properties": { "module_id": "27", "name": "ps_languageselector", - "module_version": "2.1.0", + "module_version": "2.1.3", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -317,10 +317,10 @@ "properties": { "module_id": "28", "name": "ps_linklist", - "module_version": "5.0.4", + "module_version": "5.0.5", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -329,10 +329,10 @@ "properties": { "module_id": "29", "name": "ps_mainmenu", - "module_version": "2.3.1", + "module_version": "2.3.2", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -341,10 +341,10 @@ "properties": { "module_id": "30", "name": "ps_searchbar", - "module_version": "2.1.2", + "module_version": "2.1.3", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -353,10 +353,10 @@ "properties": { "module_id": "31", "name": "ps_sharebuttons", - "module_version": "2.1.1", + "module_version": "2.1.2", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -365,10 +365,10 @@ "properties": { "module_id": "32", "name": "ps_shoppingcart", - "module_version": "2.0.4", + "module_version": "2.0.7", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -377,10 +377,10 @@ "properties": { "module_id": "33", "name": "ps_socialfollow", - "module_version": "2.2.0", + "module_version": "2.3.0", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -389,10 +389,10 @@ "properties": { "module_id": "34", "name": "ps_themecusto", - "module_version": "1.2.1", + "module_version": "1.2.3", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -401,10 +401,10 @@ "properties": { "module_id": "35", "name": "ps_wirepayment", - "module_version": "2.1.0", + "module_version": "2.1.3", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -413,10 +413,10 @@ "properties": { "module_id": "36", "name": "statsbestcategories", - "module_version": "2.0.0", + "module_version": "2.0.1", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -425,10 +425,10 @@ "properties": { "module_id": "37", "name": "statsbestcustomers", - "module_version": "2.0.2", + "module_version": "2.0.4", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -437,10 +437,10 @@ "properties": { "module_id": "38", "name": "statsbestproducts", - "module_version": "2.0.0", + "module_version": "2.0.1", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -449,10 +449,10 @@ "properties": { "module_id": "39", "name": "statsbestsuppliers", - "module_version": "2.0.0", + "module_version": "2.0.2", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -461,10 +461,10 @@ "properties": { "module_id": "40", "name": "statsbestvouchers", - "module_version": "2.0.0", + "module_version": "2.0.1", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -473,10 +473,10 @@ "properties": { "module_id": "41", "name": "statscarrier", - "module_version": "2.0.0", + "module_version": "2.0.1", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -485,10 +485,10 @@ "properties": { "module_id": "42", "name": "statscatalog", - "module_version": "2.0.1", + "module_version": "2.0.3", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -497,10 +497,10 @@ "properties": { "module_id": "43", "name": "statscheckup", - "module_version": "2.0.1", + "module_version": "2.0.2", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -509,10 +509,10 @@ "properties": { "module_id": "44", "name": "statsdata", - "module_version": "2.1.0", + "module_version": "2.1.1", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -521,10 +521,10 @@ "properties": { "module_id": "45", "name": "statsforecast", - "module_version": "2.0.3", + "module_version": "2.0.4", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -533,10 +533,10 @@ "properties": { "module_id": "46", "name": "statsnewsletter", - "module_version": "2.0.2", + "module_version": "2.0.3", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -545,10 +545,10 @@ "properties": { "module_id": "47", "name": "statspersonalinfos", - "module_version": "2.0.3", + "module_version": "2.0.4", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -557,10 +557,10 @@ "properties": { "module_id": "48", "name": "statsproduct", - "module_version": "2.1.0", + "module_version": "2.1.1", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -569,10 +569,10 @@ "properties": { "module_id": "49", "name": "statsregistrations", - "module_version": "2.0.0", + "module_version": "2.0.1", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -581,10 +581,10 @@ "properties": { "module_id": "50", "name": "statssales", - "module_version": "2.0.0", + "module_version": "2.1.0", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -593,10 +593,10 @@ "properties": { "module_id": "51", "name": "statssearch", - "module_version": "2.0.1", + "module_version": "2.0.2", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -605,10 +605,10 @@ "properties": { "module_id": "52", "name": "statsstock", - "module_version": "2.0.0", + "module_version": "2.0.1", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -617,10 +617,10 @@ "properties": { "module_id": "53", "name": "welcome", - "module_version": "6.0.7", + "module_version": "6.0.9", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { @@ -628,155 +628,131 @@ "collection": "modules", "properties": { "module_id": "54", - "name": "gamification", - "module_version": "2.5.1", - "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" - } - }, - { - "action": "upsert", - "collection": "modules", - "properties": { - "module_id": "55", - "name": "psaddonsconnect", - "module_version": "2.1.0", - "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" - } - }, - { - "action": "upsert", - "collection": "modules", - "properties": { - "module_id": "56", "name": "psgdpr", "module_version": "1.4.3", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { "action": "upsert", "collection": "modules", "properties": { - "module_id": "57", + "module_id": "55", "name": "ps_mbo", "module_version": "3.2.0", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { "action": "upsert", "collection": "modules", "properties": { - "module_id": "58", + "module_id": "56", "name": "ps_buybuttonlite", "module_version": "1.0.1", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { "action": "upsert", "collection": "modules", "properties": { - "module_id": "59", + "module_id": "57", "name": "ps_checkout", "module_version": "7.3.6.3", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { "action": "upsert", "collection": "modules", "properties": { - "module_id": "60", + "module_id": "58", "name": "ps_metrics", "module_version": "4.0.8", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { "action": "upsert", "collection": "modules", "properties": { - "module_id": "61", + "module_id": "59", "name": "ps_facebook", "module_version": "1.38.1", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { "action": "upsert", "collection": "modules", "properties": { - "module_id": "62", + "module_id": "60", "name": "psxmarketingwithgoogle", "module_version": "1.74.8", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { "action": "upsert", "collection": "modules", "properties": { - "module_id": "63", + "module_id": "61", "name": "blockreassurance", - "module_version": "5.0.0", + "module_version": "5.1.2", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { "action": "upsert", "collection": "modules", "properties": { - "module_id": "64", + "module_id": "62", "name": "ps_facetedsearch", - "module_version": "3.7.1", + "module_version": "3.12.1", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { "action": "upsert", "collection": "modules", "properties": { - "module_id": "65", + "module_id": "63", "name": "ps_accounts", "module_version": "7.0.2", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } }, { "action": "upsert", "collection": "modules", "properties": { - "module_id": "66", + "module_id": "64", "name": "ps_eventbus", "module_version": "0.0.0", "active": true, - "created_at": "2024-10-26T07:33:06+0200", - "updated_at": "2024-10-26T07:33:06+0200" + "created_at": "2024-10-26T00:32:14+0200", + "updated_at": "2024-10-26T00:32:14+0200" } } ]