diff --git a/CHANGELOG.md b/CHANGELOG.md index f88a18d5a..526585195 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # CHANGE LOG +## 3.13.6 + +### Bug Fixes +- Improve handling of insights params for URLs that already have a query string +- Improve query method for alternate root categories - Thank you @igorfigueiredogen + ## 3.13.5 ### Updates diff --git a/Helper/Entity/CategoryHelper.php b/Helper/Entity/CategoryHelper.php index 264ad71b9..94c8f6524 100755 --- a/Helper/Entity/CategoryHelper.php +++ b/Helper/Entity/CategoryHelper.php @@ -180,7 +180,7 @@ public function getCategoryCollectionQuery($storeId, $categoryIds = null) { /** @var \Magento\Store\Model\Store $store */ $store = $this->storeManager->getStore($storeId); - $storeRootCategoryPath = sprintf('%d/%d', $this->getRootCategoryId(), $store->getRootCategoryId()); + $storeRootCategoryPath = sprintf('%d/%d/', $this->getRootCategoryId(), $store->getRootCategoryId()); $unserializedCategorysAttrs = $this->getAdditionalAttributes($storeId); $additionalAttr = array_column($unserializedCategorysAttrs, 'attribute'); diff --git a/README.md b/README.md index fd3672075..5d0624593 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ Algolia Search & Discovery extension for Magento 2 ================================================== -![Latest version](https://img.shields.io/badge/latest-3.13.5-green) +![Latest version](https://img.shields.io/badge/latest-3.13.6-green) ![Magento 2](https://img.shields.io/badge/Magento-2.4.x-orange) ![PHP](https://img.shields.io/badge/PHP-8.2%2C8.1%2C7.4-blue) diff --git a/composer.json b/composer.json index e39a0b106..e0b89bdbb 100755 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "description": "Algolia Search & Discovery extension for Magento 2", "type": "magento2-module", "license": ["MIT"], - "version": "3.13.5", + "version": "3.13.6", "require": { "magento/framework": "~102.0|~103.0", "algolia/algoliasearch-client-php": "3.3.2", diff --git a/etc/module.xml b/etc/module.xml index 3253219c6..326de0ad2 100755 --- a/etc/module.xml +++ b/etc/module.xml @@ -1,6 +1,6 @@ - + diff --git a/view/frontend/web/autocomplete.js b/view/frontend/web/autocomplete.js index a474be6b5..6f45c045a 100755 --- a/view/frontend/web/autocomplete.js +++ b/view/frontend/web/autocomplete.js @@ -152,7 +152,7 @@ define( indexName: hit.__autocomplete_indexName }); if (hit.url.indexOf('?') > -1) { - hit.urlForInsights += insightsDataUrlString + hit.urlForInsights += '&' + insightsDataUrlString; } else { hit.urlForInsights += '?' + insightsDataUrlString; } diff --git a/view/frontend/web/internals/common.js b/view/frontend/web/internals/common.js index 7d42fbb0f..ea3625e28 100755 --- a/view/frontend/web/internals/common.js +++ b/view/frontend/web/internals/common.js @@ -237,7 +237,7 @@ define(['jquery', 'algoliaBundle'], function ($, algoliaBundle) { indexName: hit.__indexName }); if (hit.url.indexOf('?') > -1) { - hit.urlForInsights += insightsDataUrlString + hit.urlForInsights += '&' + insightsDataUrlString; } else { hit.urlForInsights += '?' + insightsDataUrlString; }