From a71c815b43d0b8ee0720df2a439fd68f716e87d2 Mon Sep 17 00:00:00 2001 From: Damien Couchez Date: Mon, 17 Feb 2020 15:19:12 +0100 Subject: [PATCH] Develop (#1155) --- CHANGELOG.md | 9 +++++++++ README.md | 2 +- .../community/Algolia/Algoliasearch/Helper/Config.php | 2 +- app/code/community/Algolia/Algoliasearch/etc/config.xml | 2 +- app/code/community/Algolia/Algoliasearch/etc/system.xml | 2 +- .../template/algoliasearch/internals/configuration.phtml | 1 + app/etc/modules/Algolia_Algoliasearch.xml | 2 +- js/algoliasearch/click_conversion_analytics.js | 5 ----- js/algoliasearch/instantsearch.js | 4 ++++ 9 files changed, 19 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dbe27d86..0d45ee66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # CHANGE LOG +## 1.17.1 + +### Updates +- Clean up and condition the analytics url (#1149) +- Remove IS enable condition for empty result popular queries (#1151) + +### Fixes +- Remove (un)serialize methods to pass new Marketplace expectations (#1152) + ## 1.17.0 ### Updates diff --git a/README.md b/README.md index b3c6a131..e3a974aa 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ Algolia Search for Magento 1.6+ ================== -![Latest version](https://img.shields.io/badge/latest-1.17.0-green.svg) +![Latest version](https://img.shields.io/badge/latest-1.17.1-green.svg) [![Build Status](https://travis-ci.org/algolia/algoliasearch-magento.svg?branch=master)](https://travis-ci.org/algolia/algoliasearch-magento) ![PHP >= 5.3](https://img.shields.io/badge/php-%3E=5.3-green.svg) diff --git a/app/code/community/Algolia/Algoliasearch/Helper/Config.php b/app/code/community/Algolia/Algoliasearch/Helper/Config.php index 64cdfbd5..6e10c6c4 100644 --- a/app/code/community/Algolia/Algoliasearch/Helper/Config.php +++ b/app/code/community/Algolia/Algoliasearch/Helper/Config.php @@ -618,7 +618,7 @@ public function getCurrency($storeId = null) public function getPopularQueries($storeId = null) { - if (!$this->isInstantEnabled($storeId) || !$this->showSuggestionsOnNoResultsPage($storeId)) { + if (!$this->showSuggestionsOnNoResultsPage($storeId)) { return array(); } diff --git a/app/code/community/Algolia/Algoliasearch/etc/config.xml b/app/code/community/Algolia/Algoliasearch/etc/config.xml index 6f0bb3b1..2ead2f6f 100644 --- a/app/code/community/Algolia/Algoliasearch/etc/config.xml +++ b/app/code/community/Algolia/Algoliasearch/etc/config.xml @@ -2,7 +2,7 @@ - 1.17.0 + 1.17.1 diff --git a/app/code/community/Algolia/Algoliasearch/etc/system.xml b/app/code/community/Algolia/Algoliasearch/etc/system.xml index 18a01383..1a4446df 100644 --- a/app/code/community/Algolia/Algoliasearch/etc/system.xml +++ b/app/code/community/Algolia/Algoliasearch/etc/system.xml @@ -4,7 +4,7 @@ diff --git a/js/algoliasearch/click_conversion_analytics.js b/js/algoliasearch/click_conversion_analytics.js index 324758b8..35c33c0b 100644 --- a/js/algoliasearch/click_conversion_analytics.js +++ b/js/algoliasearch/click_conversion_analytics.js @@ -79,11 +79,6 @@ algolia.registerHook('beforeInstantsearchStart', function (search) { return search; }); -algolia.registerHook('beforeWidgetInitialization', function (allWidgetConfiguration) { - allWidgetConfiguration['hits'] - return allWidgetConfiguration; -}); - algolia.registerHook('beforeInstantsearchInit', function (instantsearchOptions) { instantsearchOptions.searchParameters['clickAnalytics'] = true; return instantsearchOptions; diff --git a/js/algoliasearch/instantsearch.js b/js/algoliasearch/instantsearch.js index 4e800875..1f67bda7 100644 --- a/js/algoliasearch/instantsearch.js +++ b/js/algoliasearch/instantsearch.js @@ -2,6 +2,10 @@ document.addEventListener("DOMContentLoaded", function (event) { algoliaBundle.$(function ($) { function makeUrlForInsights(baseUrl, objectID, queryID, indexName) { + if (algoliaConfig.ccAnalytics.enabled !== true) { + return baseUrl; + } + var _baseUrl = baseUrl.indexOf('?') === -1 ? baseUrl + '?' : baseUrl; return _baseUrl + $.param({ queryID: queryID,