From cf0b2048be509e243607c5da586ab7d3a5b43012 Mon Sep 17 00:00:00 2001 From: Cid Lopes Date: Mon, 14 Oct 2024 13:58:51 +0300 Subject: [PATCH 1/4] Remove whitespaces from category strings --- Model/Service/Product/Category/DefaultCategoryService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Model/Service/Product/Category/DefaultCategoryService.php b/Model/Service/Product/Category/DefaultCategoryService.php index 03a03f63a..a714e416c 100644 --- a/Model/Service/Product/Category/DefaultCategoryService.php +++ b/Model/Service/Product/Category/DefaultCategoryService.php @@ -130,7 +130,7 @@ public function getCategory(Category $category, StoreInterface $store) ['categoryString' => $nostoCategory, 'magentoCategory' => $category] ); } - return $nostoCategory; + return trim($nostoCategory); } /** From 1980468a4771e0f46bdedda7e107d5b4bef639f4 Mon Sep 17 00:00:00 2001 From: Cid Lopes Date: Mon, 14 Oct 2024 14:00:09 +0300 Subject: [PATCH 2/4] Bump version && update changelog --- CHANGELOG.md | 3 +++ composer.json | 2 +- etc/module.xml | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5908b10e7..b002ad6f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning. +### 7.6.1 +* Remove whitespaces from category strings + ### 7.6.0 * Deprecate MySQL as message queue provider, the extension now uses RabbitMQ as the default message queue provider * Add command to clear the Nosto message queue diff --git a/composer.json b/composer.json index 4a128c076..86278a314 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "nosto/module-nostotagging", "description": "Increase your conversion rate and average order value by delivering your customers personalized product recommendations throughout their shopping journey.", "type": "magento2-module", - "version": "7.6.0", + "version": "7.6.1", "require-dev": { "phpmd/phpmd": "^2.5", "sebastian/phpcpd": "*", diff --git a/etc/module.xml b/etc/module.xml index d7070be90..245439d94 100755 --- a/etc/module.xml +++ b/etc/module.xml @@ -37,5 +37,5 @@ - + From efa0c27a53e8c43f54040c2e9f4cfd5af589d1e6 Mon Sep 17 00:00:00 2001 From: Cid Lopes Date: Mon, 14 Oct 2024 14:02:25 +0300 Subject: [PATCH 3/4] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b002ad6f0..8558b0e26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ All notable changes to this project will be documented in this file. This projec ### 7.6.1 * Remove whitespaces from category strings +* Make rabbitmq publishing error message more clear ### 7.6.0 * Deprecate MySQL as message queue provider, the extension now uses RabbitMQ as the default message queue provider From b14cb8689e0f7644e00874b2c8c5b157f327fcf9 Mon Sep 17 00:00:00 2001 From: Cid Lopes Date: Mon, 14 Oct 2024 14:10:21 +0300 Subject: [PATCH 4/4] Fix for nullable category return --- Model/Service/Product/Category/DefaultCategoryService.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Model/Service/Product/Category/DefaultCategoryService.php b/Model/Service/Product/Category/DefaultCategoryService.php index a714e416c..e36cfa8d7 100644 --- a/Model/Service/Product/Category/DefaultCategoryService.php +++ b/Model/Service/Product/Category/DefaultCategoryService.php @@ -130,7 +130,8 @@ public function getCategory(Category $category, StoreInterface $store) ['categoryString' => $nostoCategory, 'magentoCategory' => $category] ); } - return trim($nostoCategory); + + return $nostoCategory ? trim($nostoCategory) : $nostoCategory; } /**