diff --git a/CHANGELOG.md b/CHANGELOG.md
index e0b19201c..3ba36181c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,18 @@
# CHANGE LOG
+## 3.12.1
+
+### Updates
+- Updated insights library version from 2.6.0 to 2.11.0
+- Updated all click events to add authenticatedUserToken for login customer
+- Updated view events to add authenticatedUserToken for login customer
+- Added German translations in plugin
+- Updated code to provide a way for customers to modify timeout values for Algolia PHP Client
+
+### Bug Fixes
+- Fixed the issue with recommendations for grouped products in cart page
+- Fixed the issue with InstantSearch filters with quotations
+
## 3.12.0
### Updates
diff --git a/Helper/AlgoliaHelper.php b/Helper/AlgoliaHelper.php
index 2464eac03..f288564bd 100755
--- a/Helper/AlgoliaHelper.php
+++ b/Helper/AlgoliaHelper.php
@@ -6,6 +6,7 @@
use Algolia\AlgoliaSearch\Response\AbstractResponse;
use Algolia\AlgoliaSearch\Response\BatchIndexingResponse;
use Algolia\AlgoliaSearch\Response\MultiResponse;
+use Algolia\AlgoliaSearch\Config\SearchConfig;
use Algolia\AlgoliaSearch\SearchClient;
use Algolia\AlgoliaSearch\SearchIndex;
use Algolia\AlgoliaSearch\Support\UserAgent;
@@ -89,10 +90,11 @@ public function getRequest()
public function resetCredentialsFromConfig()
{
if ($this->config->getApplicationID() && $this->config->getAPIKey()) {
- $this->client = SearchClient::create(
- $this->config->getApplicationID(),
- $this->config->getAPIKey()
- );
+ $config = SearchConfig::create($this->config->getApplicationID(), $this->config->getAPIKey());
+ $config->setConnectTimeout($this->config->getConnectionTimeout());
+ $config->setReadTimeout($this->config->getReadTimeout());
+ $config->setWriteTimeout($this->config->getWriteTimeout());
+ $this->client = SearchClient::createWithConfig($config);
}
}
diff --git a/Helper/AnalyticsHelper.php b/Helper/AnalyticsHelper.php
index b0fc69edb..a08c96ef6 100644
--- a/Helper/AnalyticsHelper.php
+++ b/Helper/AnalyticsHelper.php
@@ -51,11 +51,11 @@ class AnalyticsHelper
private $analyticsConfig;
/**
- * Can be changed through DI
+ * Region can be modified via the Magento configuration
*
* @var string
*/
- private $region;
+ protected $region;
/**
* @param AlgoliaHelper $algoliaHelper
@@ -77,7 +77,7 @@ public function __construct(
$this->entityHelper = $entityHelper;
$this->logger = $logger;
- $this->region = $region;
+ $this->region = $this->configHelper->getAnalyticsRegion();
}
private function setupAnalyticsClient()
@@ -86,6 +86,7 @@ private function setupAnalyticsClient()
return;
}
+
$this->analyticsClient = AnalyticsClient::create(
$this->configHelper->getApplicationID(),
$this->configHelper->getAPIKey(),
diff --git a/Helper/ConfigHelper.php b/Helper/ConfigHelper.php
index 4349e41e6..83bad3075 100755
--- a/Helper/ConfigHelper.php
+++ b/Helper/ConfigHelper.php
@@ -100,6 +100,10 @@ class ConfigHelper
'algoliasearch_advanced/advanced/backend_rendering_allowed_user_agents';
public const NON_CASTABLE_ATTRIBUTES = 'algoliasearch_advanced/advanced/non_castable_attributes';
public const MAX_RECORD_SIZE_LIMIT = 'algoliasearch_advanced/advanced/max_record_size_limit';
+ public const ANALYTICS_REGION = 'algoliasearch_advanced/advanced/analytics_region';
+ public const CONNECTION_TIMEOUT = 'algoliasearch_advanced/advanced/connection_timeout';
+ public const READ_TIMEOUT = 'algoliasearch_advanced/advanced/read_timeout';
+ public const WRITE_TIMEOUT = 'algoliasearch_advanced/advanced/write_timeout';
public const SHOW_OUT_OF_STOCK = 'cataloginventory/options/show_out_of_stock';
@@ -1174,6 +1178,33 @@ public function getIndexPrefix($storeId = null)
return $this->configInterface->getValue(self::INDEX_PREFIX, ScopeInterface::SCOPE_STORE, $storeId);
}
+ /**
+ * @param $storeId
+ * @return mixed'
+ */
+ public function getConnectionTimeout($storeId = null)
+ {
+ return $this->configInterface->getValue(self::CONNECTION_TIMEOUT, ScopeInterface::SCOPE_STORE, $storeId);
+ }
+
+ /**
+ * @param $storeId
+ * @return mixed'
+ */
+ public function getReadTimeout($storeId = null)
+ {
+ return $this->configInterface->getValue(self::READ_TIMEOUT, ScopeInterface::SCOPE_STORE, $storeId);
+ }
+
+ /**
+ * @param $storeId
+ * @return mixed'
+ */
+ public function getWriteTimeout($storeId = null)
+ {
+ return $this->configInterface->getValue(self::WRITE_TIMEOUT, ScopeInterface::SCOPE_STORE, $storeId);
+ }
+
/**
* @param $storeId
* @return array|bool|float|int|mixed|string
@@ -1685,6 +1716,19 @@ public function getMaxRecordSizeLimit($storeId = null)
);
}
+ /**
+ * @param $storeId
+ * @return string
+ */
+ public function getAnalyticsRegion($storeId = null)
+ {
+ return $this->configInterface->getValue(
+ self::ANALYTICS_REGION,
+ ScopeInterface::SCOPE_STORE,
+ $storeId
+ );
+ }
+
/**
* @param $storeId
* @return bool
diff --git a/Model/Source/AnalyticsRegion.php b/Model/Source/AnalyticsRegion.php
new file mode 100644
index 000000000..4b2a1c155
--- /dev/null
+++ b/Model/Source/AnalyticsRegion.php
@@ -0,0 +1,16 @@
+ 'us', 'label' => __('United States')],
+ ['value' => 'de', 'label' => __('Europe (Germany)')],
+ ];
+ }
+}
diff --git a/Observer/Insights/CustomerLogout.php b/Observer/Insights/CustomerLogout.php
index 1db5b4f0a..eefe06e96 100644
--- a/Observer/Insights/CustomerLogout.php
+++ b/Observer/Insights/CustomerLogout.php
@@ -9,6 +9,7 @@
class CustomerLogout implements ObserverInterface
{
+ public const UNSET_AUTHENTICATION_USER_TOKEN_COOKIE_NAME = "unset_authentication_token";
/**
* @var PhpCookieManager
*/
@@ -42,9 +43,15 @@ public function __construct(
public function execute(\Magento\Framework\Event\Observer $observer)
{
if ($this->cookieManager->getCookie(InsightsHelper::ALGOLIA_CUSTOMER_USER_TOKEN_COOKIE_NAME)) {
+ $metaDataUnset = $this->cookieMetadataFactory->createPublicCookieMetadata()
+ ->setDurationOneYear()
+ ->setPath('/')
+ ->setHttpOnly(false)
+ ->setSecure(false);
+ $this->cookieManager->setPublicCookie(self::UNSET_AUTHENTICATION_USER_TOKEN_COOKIE_NAME, 1, $metaDataUnset);
$metadata = $this->cookieMetadataFactory->createCookieMetadata();
$metadata->setPath('/');
$this->cookieManager->deleteCookie(InsightsHelper::ALGOLIA_CUSTOMER_USER_TOKEN_COOKIE_NAME, $metadata);
}
}
-}
\ No newline at end of file
+}
diff --git a/README.md b/README.md
index 30d703588..a882d663b 100755
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
Algolia Search & Discovery extension for Magento 2
==================================================
-
+


@@ -81,7 +81,8 @@ Knowing the version of the library will help you understand what is available in
| v3.x | [0.38.0](https://github.com/algolia/autocomplete.js/tree/v0.38.0) | [4.15.0](https://github.com/algolia/instantsearch.js/tree/v4.15.0) | [1.7.1](https://github.com/algolia/search-insights.js/tree/v1.7.1) | NA |
| v3.9.1 | [1.6.3](https://github.com/algolia/autocomplete.js/tree/v1.6.3) | [4.41.0](https://github.com/algolia/instantsearch.js/tree/v4.41.0) | [1.7.1](https://github.com/algolia/search-insights.js/tree/v1.7.1) | [1.5.0](https://github.com/algolia/recommend/tree/v1.5.0) |
| v3.10.x | [1.6.3](https://github.com/algolia/autocomplete.js/tree/v1.6.3) | [4.41.0](https://github.com/algolia/instantsearch.js/tree/v4.41.0) | [1.7.1](https://github.com/algolia/search-insights.js/tree/v1.7.1) | [1.8.0](https://github.com/algolia/recommend/tree/v1.8.0) |
-| >=v3.11.0 | [1.6.3](https://github.com/algolia/autocomplete.js/tree/v1.6.3) | [4.41.0](https://github.com/algolia/instantsearch.js/tree/v4.41.0) | [2.6.0](https://github.com/algolia/search-insights.js/tree/v2.6.0) | [1.8.0](https://github.com/algolia/recommend/tree/v1.8.0) |
+| v3.11.0 | [1.6.3](https://github.com/algolia/autocomplete.js/tree/v1.6.3) | [4.41.0](https://github.com/algolia/instantsearch.js/tree/v4.41.0) | [2.6.0](https://github.com/algolia/search-insights.js/tree/v2.6.0) | [1.8.0](https://github.com/algolia/recommend/tree/v1.8.0) |
+| >=v3.12.1 | [1.6.3](https://github.com/algolia/autocomplete.js/tree/v1.6.3) | [4.41.0](https://github.com/algolia/instantsearch.js/tree/v4.41.0) | [2.11.0](https://github.com/algolia/search-insights.js/tree/v2.11.0) | [1.8.0](https://github.com/algolia/recommend/tree/v1.8.0) |
The autocomplete and instantsearch libraries are accessible in the `algoliaBundle` global. This bundle is a prepackage javascript file that contains it's dependencies. What is included in this bundle can be seen here:
diff --git a/ViewModel/Recommend/Cart.php b/ViewModel/Recommend/Cart.php
index 6a0c8e6fe..da24d7537 100644
--- a/ViewModel/Recommend/Cart.php
+++ b/ViewModel/Recommend/Cart.php
@@ -3,9 +3,12 @@
namespace Algolia\AlgoliaSearch\ViewModel\Recommend;
use Algolia\AlgoliaSearch\Helper\ConfigHelper;
+use Algolia\AlgoliaSearch\Helper\Entity\ProductHelper;
use Magento\Checkout\Model\Session;
+use Magento\Framework\Exception\LocalizedException;
+use Magento\Framework\Exception\NoSuchEntityException;
use Magento\Framework\View\Element\Block\ArgumentInterface;
-use Magento\Framework\View\Element\Template\Context;
+use Magento\Store\Model\StoreManagerInterface;
class Cart implements ArgumentInterface
{
@@ -20,34 +23,49 @@ class Cart implements ArgumentInterface
protected $configHelper;
/**
- * @param Context $context
+ * @var ProductHelper
+ */
+ protected $productHelper;
+
+ /**
+ * @param StoreManagerInterface $storeManager
* @param Session $checkoutSession
* @param ConfigHelper $configHelper
- * @param array $data
+ * @param ProductHelper $productHelper
*/
public function __construct(
- Context $context,
+ StoreManagerInterface $storeManager,
Session $checkoutSession,
ConfigHelper $configHelper,
- array $data = []
+ ProductHelper $productHelper
) {
+ $this->storeManager = $storeManager;
$this->checkoutSession = $checkoutSession;
$this->configHelper = $configHelper;
+ $this->productHelper = $productHelper;
}
/**
* @return array
- * @throws \Magento\Framework\Exception\LocalizedException
- * @throws \Magento\Framework\Exception\NoSuchEntityException
+ * @throws LocalizedException
+ * @throws NoSuchEntityException
*/
public function getAllCartItems()
{
$cartItems = [];
+ $visibleCartItem = [];
$itemCollection = $this->checkoutSession->getQuote()->getAllVisibleItems();
foreach ($itemCollection as $item) {
$cartItems[] = $item->getProductId();
}
- return array_unique($cartItems);
+ $storeId = $this->storeManager->getStore()->getId();
+ $cartProductCollection = $this->productHelper->getProductCollectionQuery($storeId, array_unique($cartItems));
+ if ($cartProductCollection->getSize() > 0 ){
+ foreach ($cartProductCollection as $product) {
+ $visibleCartItem[] = $product->getId();
+ }
+ }
+ return $visibleCartItem;
}
/**
diff --git a/composer.json b/composer.json
index 382cd167d..82037b874 100644
--- 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.12.0",
+ "version": "3.12.1",
"require": {
"magento/framework": "~102.0|~103.0",
"algolia/algoliasearch-client-php": "3.3.2",
diff --git a/etc/adminhtml/system.xml b/etc/adminhtml/system.xml
index c96f06f28..fadf67510 100755
--- a/etc/adminhtml/system.xml
+++ b/etc/adminhtml/system.xml
@@ -111,13 +111,13 @@
-
+
1
General > Web > Default Cookie Settings > Cookie Restriction Mode is set to "No," we will consider it as Implicit Cookie Consent. In this case, the useCookie will be set to True by default for all insight events. Conversely, if Cookie Restriction Mode is set to 'Yes,' Insight events will not be allowed without explicit cookie consent.
]]>
-
+
@@ -1170,7 +1170,7 @@
Magento\Config\Model\Config\Source\Yesno
- Algolia\AlgoliaSearch\Model\Backend\Replica
+ Algolia\AlgoliaSearch\Model\Backend\Replica
+
+
+ Algolia\AlgoliaSearch\Model\Source\AnalyticsRegion
+
+
+
+
+
+
+
+
+
+
diff --git a/etc/config.xml b/etc/config.xml
index 0418318d3..d5e6bb415 100644
--- a/etc/config.xml
+++ b/etc/config.xml
@@ -81,6 +81,10 @@
10000
+ us
+ 2
+ 30
+ 30300
diff --git a/etc/module.xml b/etc/module.xml
index f4c0f9f39..39eabe93b 100755
--- a/etc/module.xml
+++ b/etc/module.xml
@@ -1,6 +1,6 @@
-
+
diff --git a/i18n/de_DE.csv b/i18n/de_DE.csv
new file mode 100644
index 000000000..71fa40db5
--- /dev/null
+++ b/i18n/de_DE.csv
@@ -0,0 +1,653 @@
+label,label
+"Base Image","Hauptbild"
+"Small Image","Kleines Bild"
+Thumbnail,Thumbnail
+None,None
+AllOptional,AllOptional
+LastWords,LastWords
+FirstWords,FirstWords
+"Search for products, categories, ...","Suche nach Produkten, Kategorien, ..."
+Search,Suche
+Search:,Suchen:
+in,in
+Categories,Kategorien
+Products,Produkte
+"Search by","Suche von"
+Refine,Verbessern
+"Current search","Aktuelle Suche"
+"Search for products","Suche nach Produkten"
+"SORT BY","SORTIEREN NACH"
+"Add to Cart","In den Warenkorb"
+result,Ergebnis
+"results found","Ergebnisse gefunden"
+seconds,Sekunden
+Relevance,Relevanz
+"No products for query","Keine Produkte für diesen Suchbegriff"
+"You can try one of the popular search queries","Probieren Sie einen beliebten Suchbegriff"
+or,or
+"See all products","Alle Produkte ansehen"
+"Selected Filters","Ausgewählte Filter"
+"Clear all","Alles löschen"
+"Previous page","Vorherige Seite"
+"Next page","Nächste Seite"
+to,to
+Go,Los
+"No results","Keine Ergebnisse"
+"See products in","Produkte anzeigen in"
+"All departments","allen Kategorien"
+"or in","oder in"
+"out of","von"
+"
+
+ Algolia Search
+
+ ","
+
+ Algolia Search
+
+ "
+"Credentials and Setup","Zugangsdaten und Einrichtung"
+"Enable Indexing","Indexierung aktivieren"
+"
+
+ If set to No, Algolia extension will simply be disabled.
+
+ ","
+
+ Bei der Einstellung Nein wird die Algolia-Erweiterung einfach deaktiviert.
+
+ "
+"Enable Search","Suche aktivieren"
+"
+
+ If set to No, search will be done by Algolia but renderered by Magento
+
+ ","
+
+ Bei der Einstellung Nein wird die Suche von Algolia durchgeführt, aber von Magento gerendert.
+
+ "
+"Enable Logging","Logging aktivieren"
+"
+
+ NOTICE: Debug logging generates a significant amount of data and can affect performance of indexing
+
+ ","
+
+ HINWEIS: Die Debug-Protokollierung erzeugt eine beträchtliche Menge an Daten und kann die Leistung der Indizierung beeinträchtigen
+
+ "
+"Application ID","Application ID"
+"
+
+ Your Application ID, which can be found in the Credentials section of your Algolia account.
+
+ ","
+
+ Ihre Application ID, die Sie in Ihrem Algolia-Konto unter ""Credentials"" finden.
+
+ "
+"Search-only (public) API key","(öffentlicher) API-Schlüssel nur für die Suche"
+"
+
+ A search-only API key (will be included in the public JavaScript code)
+
+ ","
+
+ Ein API-Schlüssel nur für die Suche (wird in den öffentlichen JavaScript-Code aufgenommen)
+
+ "
+"Admin API key","Admin API-Schlüssel"
+"
+
+ Your administration API key (kept private)
+
+ ","
+
+ Ihr API-Schlüssel für die Administration (privat)
+
+ "
+"Index Name Prefix","Index Name Prefix"
+"
+
+ If configured, all indices created by the Algolia search extension will be prefixed by this value.
+
+ ","
+
+ Falls konfiguriert, wird allen Indizes, die von der Algolia-Such-Erweiterung erstellt werden, dieser Wert vorangestellt.
+
+ "
+"Enable Auto-completion Menu","Menü für automatische Vervollständigung aktivieren"
+"
+
+ If set to Yes, the seach box will display a search-as-you-type drop-down menu. It requires your theme to expose a top.search and content block.
+
+ ","
+
+ Wenn diese Option auf Ja gesetzt ist, zeigt das Suchfeld ein Dropdown-Menü für die Suche an. Dazu muss Ihr Theme einen top.search und einen content Block beinhalten.
+
+ "
+"Enable Instant Search Results Page","Instant Search Ergebnisseite aktvieren"
+"
+
+ If set to Yes, the products inside the results pages will be searchable the refined results updated as-you-type. It requires your theme to expose a top.search and content block.
+
+ ⚠ Enabling instant search can potentially break your design, some work will be required to have a good integration into your theme
+ products.
+
+ ","
+
+ Wenn diese Option auf Ja gesetzt ist, können die Produkte auf den Ergebnisseiten durchsucht und die verfeinerten Ergebnisse nach und nach aktualisiert werden. Dazu muss Ihr Theme einen top.search und einen content Block beinhalten.
+
+ ⚠ Die Aktivierung der Sofortsuche kann Ihr Design möglicherweise zerstören, und es wird einige Arbeit erforderlich sein, um eine gute Integration in Ihr Theme zu erreichen.
+
+ "
+Autocomplete,Autocomplete
+"Number of products","Anzahl der Produkte"
+"
+
+ The number of products (>=1) suggested in the autocomplete dropdown. Default value is 6
+
+ ","
+
+ Die Anzahl der Produkte (>=1), die im Autocomplete-Dropdown anzeigt werden. Der Standardwert ist 6
+
+ "
+"Number of categories","Anzahl der Kategorien"
+"
+
+ The number of categories (>=1) suggested in the autocomplete dropdown. Default value is 2
+
+ ","
+
+ Die Anzahl der Kategorien (>=1), die im Autocomplete-Dropdown angezeigt werden. Der Standardwert ist 2
+
+ "
+"Number of queries","Anzahl der Suchanfragen"
+"
+
+ The number of queries suggestions (0 to disabled it) suggested in the autocomplete dropdown. Default value is 0
+
+ ","
+
+ Die Anzahl der Suchvorschläge (0 zum Deaktivieren), die im Autocomplete-Dropdown angezeigt werden. Der Standardwert ist 0
+
+ "
+"Min query popularity","Minimale Popularität der Suchanfrage"
+"
+
+ The min number of times a query has been performed in order to be suggested. Default value is 1000.
+
+ ","
+
+ Die Mindestanzahl von Suchanfragen, die durchgeführt wurden, um vorgeschlagen zu werden. Der Standardwert ist 1000.
+
+ "
+"Min number of products per query","Minimale Anzahl an Produkten pro Suchanfrage"
+"
+
+ The min number of results a query needs to return to be suggested. Default value is 2.
+
+ ","
+
+ Die Mindestanzahl von Ergebnissen, die eine Anfrage liefern muss, um vorgeschlagen zu werden. Der Standardwert ist 2.
+
+ "
+"Additional Sections","Weitere Abschnitte"
+"
+
+ Configure here the additional auto-completion menu sections you want include in the dropdown menu (Ex. Suggestions, Pages, Manufacturer, Colors).
+ ⚠ All attributes used here must have been initially included in the Attributes Configuration panel and configured as a facet in the Instant Search Results Page Configuration panel to be able to refine on the specific attribute.
+
+ ","
+
+ Konfigurieren Sie hier die zusätzlichen Abschnitte des Autovervollständigungsmenüs, die Sie in das Dropdown-Menü aufnehmen möchten (z. B. Vorschläge, Seiten, Hersteller, Farben).
+ ⚠ Alle Attribute, die hier verwendet werden, müssen ursprünglich in der Attributkonfiguration enthalten und als Facette in der Instant Suchergebnisseiten-Konfiguration konfiguriert worden sein, um das spezifische Attribut verfeinern zu können.
+
+ "
+"Excluded Pages","Ausgeschlossene Seiten"
+"
+
+ Configure here the pages you don't want to search in.
+ ⚠ Do not forget to trigger the Algolia Search indexers whenever you modify those settings.
+
+ ","
+
+ Konfigurieren Sie hier die Seiten, auf denen Sie nicht suchen möchten.
+ ⚠ Vergessen Sie nicht, die Algolia Search Indexer auszuführen, wenn Sie diese Einstellungen ändern.
+
+ "
+"Render template directives","Template-Render-Richtlinien"
+"
+
+ For CMS pages, template directives (e.g. {{block type=""core/template"" ...}}) will be processed by default. Set this to ""No"" if you don't want to have template content indexed.
+ ⚠ Do not forget to trigger the Algolia Search indexers whenever you modify those settings.
+
+ ","
+
+ Für CMS-Seiten werden Template-Richlinien (z.B. {{block type=""core/template"" ...}}) standardweise verarbeitet. Setzen Sie diese Option auf ""Nein"", wenn Sie nicht möchten, dass der Inhalt der Vorlage indiziert wird.
+ ⚠ Vergessen Sie nicht, die Algolia Search Indexer auszuführen, wenn Sie diese Einstellungen ändern.
+
+ "
+"Instant Search Results Page","Instant Suchergebnisseite"
+"DOM Selector","DOM Selektor"
+"
+
+ The DOM selector used to inject the results using JavaScript.
+
+ ","
+
+ Der DOM-Selektor, der zur Einspeisung der Ergebnisse mit JavaScript verwendet wird.
+
+ "
+Facets,Facetten
+"
+
+ Configure here the filtering options you want to display on your search results page.
+ Choose Disjunctive to allow the selection of different values of a facet (e.g. hotels with 4 OR 5 stars).
+ Choose Conjunctive to allow the selection of only one value of a facet (e.g. only ""Size M"").
+
+ ","
+
+ Konfigurieren Sie hier die Filteroptionen, die Sie auf Ihrer Suchergebnisseite anzeigen möchten.
+ Wählen Sie Disjunktiv, um die Auswahl verschiedener Werte einer Facette zu ermöglichen (z.B. Hotels mit 4 ODER 5 Sternen).
+ Wählen Sie Konjunktiv, um die Auswahl nur eines Wertes einer Facette zu ermöglichen (z. B. nur ""Größe M"").
+
+ "
+"Number of values per facet","Anzahl der Werte pro Facette"
+"
+
+ The number of values each facet can display. Default value is 10.
+
+ ","
+
+ Die Anzahl der Werte, die jede Facette anzeigen kann. Der Standardwert ist 10.
+
+ "
+Sorts,Sortierung
+"
+
+ Configure here the different sorting options you want to offer.
+
+ The extension will create :
+ - 1 index/store
+ - 1 index/store/sort
+ Which means that for an instance with:
+ - 2 stores (2 languages for example)
+ - 100 products
+ - 2 sorts on price (asc, desc)
+ - 2 sorts on date (asc, desc)
+ You have 100 * 2 + 100 * 4 * 2 = 1000 product records
+ You can reduce the number of records by removing some sort
+
+ ","
+
+ Konfigurieren Sie hier die verschiedenen Sortieroptionen, die Sie anbieten möchten.
+
+ Die Erweiterung wird erzeugen :
+ - 1 Index pro Store
+ - 1 Index pro Store pro Sortierung
+ Das bedeutet für einen Shop beispielsweise:
+ - 2 Stores (2 Sprachen zum Beispiel)
+ - 100 Produkte
+ - 2 Sortierungen nach Preis (aufsteigend, absteigend)
+ - 2 Sortierungen nach Datum (aufsteigend, absteigend)
+ 100 * 2 + 100 * 4 * 2 = 1000 Produktdatensätze
+ Sie können die Anzahl der Datensätze reduzieren, indem Sie Sortierungen entfernen.
+
+ "
+"Replace categories page","Kategorieseiten ersetzen"
+"
+
+ Choose here if you want the default Magento category pages to be replaced by an instant-search
+ results page when a category is selected either in the menu of categories or in the drop-down menu.
+
+ ","
+
+ Wählen Sie hier, ob die Standard-Kategorieseiten von Magento durch eine Seite mit instant Suchergebnissen ersetzt
+ werden sollen, wenn eine Kategorie entweder im Kategorienmenü oder im Dropdown-Menü ausgewählt wird.
+
+ "
+"
+
+ Choose here if you want to add an ""add to cart"" button in the template.
+
+ ","
+
+ Wählen Sie hier ob sie einen ""In den Warenkorb""-Button in das Template einfügen möchten.
+
+ "
+"Number of products per page in the instant result page","Anzahl der Produkte pro Seite auf der Instant-Suchergebnisseite"
+"
+
+ The number of products displayed on the instant search results page. Default value is 9.
+
+ ","
+
+ Die Anzahl der Produkte pro Seite auf der Instant-Suchergebnisseite. Der Standardwert ist 9.
+
+ "
+Attributes,Attribute
+"
+
+ Choose here the product attributes your users can search on, the ones you want to use as filters and sorts options and the ones required to display the search results.
+ The order of the searchable attributes matters: a query matching the first searchable attribute of a product will put this product before the others in the results. Chose ""Ordered"" if you want the position of the matching word(s) inside the attribute to matter. A match at the beginning of an attribute will be considered more important: for the query ""iPhone"", ""iPhone 5s"" will be ranked before ""case for iPhone"".
+ ⚠ Do not forget to reindex your Algolia Search index after you've modified this panel.
+
+ ","
+
+ Wählen Sie hier die Produktattribute aus, nach denen Ihre Nutzer suchen können, die Sie als Filter und Sortieroptionen verwenden möchten und die für die Anzeige der Suchergebnisse erforderlich sind.
+ Die Reihenfolge der durchsuchbaren Attribute spielt eine Rolle: Eine Abfrage, die auf das erste durchsuchbare Attribut eines Produkts zutrifft, führt dazu, dass dieses Produkt in den Ergebnissen vor den anderen erscheint. Wählen Sie ""Geordnet"", wenn Sie möchten, dass die Position des/der übereinstimmenden Wortes/Wörter innerhalb des Attributs eine Rolle spielt. Eine Übereinstimmung am Anfang eines Attributs wird als wichtiger angesehen: für die Abfrage ""iPhone"" wird ""iPhone 5s"" vor ""Tasche für iPhone"" angezeigt.
+ ⚠ Vergessen Sie nicht, die Algolia Search Indexer auszuführen, wenn Sie diese Einstellungen ändern.
+
+ "
+Ranking,Ranking
+"
+
+ Configure here the attributes that reflect the popularity of your product (number of orders, number of likes, number of views, ...).
+ ⚠ All attributes used here must have been initially included in the Attributes configuration panel.
+
+ ","
+
+ Konfigurieren Sie hier die Attribute, die die Popularität Ihres Produkts widerspiegeln (Anzahl der Bestellungen, Anzahl der Likes, Anzahl der Views, ...).
+ ⚠ Alle Attribute, die hier verwendet werden, müssen ursprünglich in das Konfigurationspanel für Attribute aufgenommen worden sein.
+
+ "
+"Show most popular queries suggestions when there are no results","Vorschläge für die beliebtesten Suchanfragen anzeigen, wenn es keine Ergebnisse gibt"
+"
+
+ Choose here if you want to show most popular queries suggestions when there are no results/
+
+ ","
+
+ Wählen Sie hier, ob Sie Vorschläge für die beliebtesten Suchanfragen anzeigen möchten, wenn es keine Ergebnisse gibt/
+
+ "
+"Index out of stock options for configurable products","Index für nicht vorrätige Optionen für konfigurierbare Produkte"
+"
+
+ Choose here if you want to index out of stock options for configurable products
+
+ ","
+
+ Wählen Sie hier aus, wenn Sie nicht vorrätige Optionen für konfigurierbare Produkte indizieren möchten
+
+ "
+"
+
+ Configure here the category attributes your users can search on. The order of these attributes matters: the higher in the list, the more important to rank the results.
+
+ ","
+
+ Konfigurieren Sie hier die Kategorieattribute, nach denen Ihre Benutzer suchen können. Die Reihenfolge dieser Attribute ist wichtig: je weiter oben in der Liste, desto wichtiger für die Rangfolge der Ergebnisse.
+
+ "
+"
+
+ Choose here the attributes that reflect the popularity of your categories (number of products, total number of sales of the category,etc.).
+ ⚠ All attributes used here must have been included before in the ""Attributes"" configuration.
+
+ ⚠ Do not forget to reindex your Algolia Search index after you've modified this panel.
+
+ ","
+
+ Wählen Sie hier die Attribute aus, die die Beliebtheit Ihrer Kategorien widerspiegeln (Anzahl der Produkte, Gesamtzahl der Verkäufe in der Kategorie usw.).
+ ⚠ Alle hier verwendeten Attribute müssen zuvor in der Konfiguration ""Attribute"" eingetragen worden sein.
+
+ ⚠ Vergessen Sie nicht, die Algolia Search Indexer auszuführen, wenn Sie diese Einstellungen ändern.
+
+ "
+"Show categories that are not included in the navigation menu","Kategorien anzeigen, die nicht im Navigationsmenü enthalten sind"
+"
+
+ If set to Yes, Algolia will display all categories in both the autocomplete menu and instant search page ignoring the setting: ""Include in navigation menu"". Default value: No
+
+ ","
+
+ Wenn diese Option auf ""Ja"" gesetzt ist, zeigt Algolia alle Kategorien sowohl im Autovervollständigungsmenü als auch auf der Sofortsuchseite an, ohne die Einstellung ""In Navigationsmenü einschließen"" zu berücksichtigen. Standardwert: Nein
+
+ "
+Images,Bilder
+Width,Breite
+Height,Höhe
+"
+
+ You can specify the size of the images used at the Search Results Page.
+ If your images are already present in some size, eg. 265x265, Algolia's index job may not have to resize those, potentially saving time and resources.
+
+ ","
+
+ Sie können die Größe der auf der Suchergebnisseite verwendeten Bilder festlegen.
+ Wenn Ihre Bilder bereits in einer bestimmten Größe vorliegen, z.B. 265x265, muss Algolia's Index-Job diese nicht neu skalieren, was Zeit und Ressourcen sparen kann.
+
+ "
+Type,Typ
+"
+
+ The image used at the Search Results Page.
+
+ ","
+
+ Das auf der Suchergebnisseite verwendete Bild.
+
+ "
+"Indexing Queue / Cron","Indexing Queue / Cron"
+"Queue Enabled","Queue aktiv"
+"
+
+ If enabled, all indexing operations (add, remove & update operations) will be done asynchronously using the CRON mechanism.
+
+ To schedule the run you need to add this in your crontab:
+ */5 * * * * php /absolute/path/to/magento/bin/magento indexer:reindex algolia_queue_runner
+
+ ⚠ Enabling this option is recommended in production or if your store has a lot of products.
+
+ ","
+
+ Wenn diese Option aktiviert ist, werden alle Indexierungsvorgänge (Hinzufügen, Entfernen und Aktualisieren) asynchron mit Hilfe des CRON-Mechanismus durchgeführt.
+
+ Um die Ausführung zu planen, müssen Sie dies in Ihrer crontab hinzufügen:
+ */5 * * * * php /absolute/path/to/magento/bin/magento indexer:reindex algolia_queue_runner
+
+ ⚠ Es wird empfohlen, diese Option in der Produktion oder bei einer großen Anzahl von Produkten in Ihrem Shop zu aktivieren.
+
+ "
+"Number of jobs to run each time the cron is run","Anzahl der Jobs, die jedes Mal ausgeführt werden, wenn der Cron gestartet wird"
+"
+
+ Number of jobs to run each time the cron is run. Default value is 10.
+
+ ⚠ Each time the cron runs it will process (""Max number of element per indexing job"" * ""Number of jobs to run each time the cron is run"")
+ products.
+
+ ","
+
+ Anzahl der Jobs, die jedes Mal ausgeführt werden, wenn der Cron gestartet wird. Standardwert ist 10.
+
+ ⚠ Jedes Mal, wenn der Cron läuft, wird er (""Maximale Anzahl von Elementen pro Indexierungsjob"" * ""Anzahl der Aufträge, die bei jedem Cron-Lauf ausgeführt werden"") Produkte
+ verarbeiten.
+
+ "
+Synonyms,Synonyme
+"
+
+ Synonyms are defined by a comma-separated list of words that should be considered equivalent by the Algolia engine.
+ For instance: tv, television, tv set
+ Using that set, if a record contains “television” and a user searches for “TV”, this record will be returned.
+ Documentation: https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms
+
+ ","
+
+ Synonyme werden durch eine kommagetrennte Liste von Wörtern definiert, die von der Algolia-Engine als gleichwertig angesehen werden sollen.
+ Zum Beispiel: TV, Television, TV Set
+ Wenn ein Datensatz ""Fernsehen"" enthält und ein Benutzer nach ""TV"" sucht, wird dieser Datensatz zurückgegeben.
+ Dokumentation (englisch): https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms
+
+ "
+"
+
+ One-way synonyms allow you to define alternative words for a search term, which are not synonyms to each others.
+ Let’s take an example: when a user searches for “tablet”, you want him to be able to find iPads and Galaxy Note tablets alike, but you might not want Android tablets to show up when he searches for “iPad”.
+ To do this, you’d define a one-way synonyms set between tablet (as input) and ipad, galaxy note (as synonyms). When the user types in “tablet”, records containing “iPad” and “Galaxy Note” will be returned. However records containing only “tablet” or “Galaxy Note” won’t be returned if he searches for “iPad”.
+ Documentation: https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#one-way-synonyms
+
+
+ Algolia offers more synonymys’ types - placeholders and alternative corrections. These types can be managed directly from your Algolia’s dashboard.
+ Any changes you will make to placeholders and alternative corrections in Algolia’s dashboard won’t be overridden.
+
+ ","
+
+ Einseitige Synonyme ermöglichen es Ihnen, alternative Wörter für einen Suchbegriff zu definieren, die keine Synonyme zueinander sind.
+ Nehmen wir ein Beispiel: Wenn ein Nutzer nach ""Tablet"" sucht, soll er sowohl iPads als auch Galaxy Note-Tablets finden können, aber Sie möchten vielleicht nicht, dass Android-Tablets angezeigt werden, wenn er nach ""iPad"" sucht.
+ Dazu definieren Sie einen einseitigen Synonymsatz zwischen Tablet (als Eingabe) und ipad, Galaxy Note (als Synonyme). Wenn der Benutzer ""Tablet"" eingibt, werden Datensätze zurückgegeben, die ""iPad"" und ""Galaxy Note"" enthalten. Wenn er jedoch nach ""iPad"" sucht, werden keine Datensätze zurückgegeben, die nur ""Tablet"" oder ""Galaxy Note"" enthalten.
+ Dokumentation: (englisch) https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#one-way-synonyms
+
+
+ Algolia bietet weitere Synonymtypen - Platzhalter und alternative Korrekturen. Diese Typen können direkt im Algolia Dashboard bearbeitet werden.
+ Alle Änderungen, die Sie an Platzhaltern und alternativen Korrekturen in Algolias Dashboard vornehmen, werden nicht überschrieben.
+
+ "
+"Synonyms File","Synonymdatei"
+"
+
+ If you have large amount of synonyms (appr. more than hundred), you don't have to fill it into inputs above and you can upload a JSON file with synonyms instead.
+ The documentation with the file structure can be found here.
+ ⚠
+ When you upload a JSON file, all the synonyms settings from above will be ignored and only synonyms from the JSON file will be pushed to Algolia.
+
+ ","
+
+ Wenn Sie eine große Anzahl von Synonymen haben (etwa mehr als hundert), müssen Sie diese nicht in die obigen Eingaben eingeben und können stattdessen eine JSON-Datei mit Synonymen hochladen.
+ Die Dokumentation mit der Dateistruktur findet man hier (englisch).
+ ⚠
+ Wenn Sie eine JSON-Datei hochladen, werden alle obigen Synonym-Einstellungen ignoriert und nur die Synonyme aus der JSON-Datei werden an Algolia übermittelt.
+
+ "
+Advanced,Fortgeschritten
+"Max number of element per indexing job","Max Anzahl an Elementen pro Indexjob"
+"
+
+ The max number of element by indexing job. Default value is 100.
+
+ ","
+
+ Die maximale Anzahl an Elementen pro Indexjob. Standardwert ist 100.
+
+ "
+"Remove Words If No Result","Entferne Wörter bei leerem Ergebnis"
+"
+ Optional property to avoid empty result pages.
+ By default, Algolia performs ""AND"" queries, which can lead to no results pages when queries are too long or too detailed. To avoid this, you can select among the following options:
+ LastWords: when a query does not return any result, the last word will be considered as optional and the query will be automatically performed again (the process is repeated with the n-1 word, n-2 word, ... until there is results).
+ FirstWords: when a query does not return any result, the first word will be considered as optional and the query will be automatically performed again (the process is repeated with the second word, third word, ... until there is results).
+ allOptional: when a query does not return any result, all words will be optional.
+ None: No specific processing is done when a query does not return any result.
+ ","
+ Optionale Einstellungen, um leere Ergebnisseiten zu vermeiden.
+ Standardmäßig führt Algolia ""AND""-Abfragen durch, was bei zu langen oder zu detaillierten Abfragen zu keinen Ergebnisseiten führen kann. Um dies zu vermeiden, können Sie eine der folgenden Optionen wählen:
+ LastWords: wenn eine Abfrage kein Ergebnis liefert, wird das letzte Wort als optional betrachtet und die Abfrage wird automatisch erneut durchgeführt (der Prozess wird mit dem n-1 Wort, n-2 Wort, ... wiederholt, bis ein Ergebnis vorliegt).
+ FirstWords: wenn eine Abfrage kein Ergebnis liefert, wird das erste Wort als optional betrachtet und die Abfrage wird automatisch erneut durchgeführt (der Prozess wird mit dem zweiten Wort, dem dritten Wort, ... wiederholt, bis ein Ergebnis vorliegt).
+ allOptional: wenn eine Abfrage kein Ergebnis liefert, sind alle Wörter optional.
+ None: wenn eine Abfrage kein Ergebnis liefert, wird keine spezifische Verarbeitung vorgenommen.
+ "
+"Partial Updates","Partielle Updates"
+"
+
+ If enabled, all add/update operations will use partialUpdateObjects instead of addObjects. You should enable this option if you update some attributes of your records from an external source in addition to Magento to avoid any overriding.
+
+ ","
+
+ Wenn diese Option aktiviert ist, werden alle Hinzufügungs-/Aktualisierungsvorgänge partialUpdateObjects anstelle von addObjects verwenden. Sie sollten diese Option aktivieren, wenn Sie einige Attribute Ihrer Datensätze zusätzlich zu Magento aus einer externen Quelle aktualisieren, um ein Überschreiben zu vermeiden.
+
+ "
+"Customer Groups","Kundengruppen"
+"
+
+ If enabled, the extension will take into account your customer groups and display the price of the logged-in group instead of the default price. Enabling this option creates an index per customer group.
+
+ ","
+
+ Wenn diese Option aktiviert ist, berücksichtigt die Erweiterung Ihre Kundengruppen und zeigt den Preis der angemeldeten Gruppe anstelle des Standardpreises an. Die Aktivierung dieser Option erstellt einen Index pro Kundengruppe.
+
+ "
+"Make SEO request","SEO-Anfrage stellen"
+"
+
+ Choose if a query to Algolia is done by the backend for SEO when instant search is enabled
+
+ ","
+
+ Legen Sie fest, ob bei aktivierter Sofortsuche eine Abfrage bei Algolia im Backend für SEO erfolgen soll
+
+ "
+"Remove branding logo","Brandinglogo entfernen"
+"
+
+ Choose here if the algolia logo is added to the drop-down template.
+
+ ","
+
+ Wählen Sie hier, ob das algolia-Logo dem Dropdown-Template hinzugefügt werden soll.
+
+ "
+"Search input DOM Selector","Sucheingabe DOM Selektor"
+"
+
+ If you don't have the top.search block you can specify the selector of your search input here to use it. Default value is .algolia-search-input
+
+ ","
+
+ Wenn Sie den top.search-Block nicht haben, können Sie hier den Selektor Ihrer Sucheingabe angeben, um ihn zu verwenden. Standardwert ist .algolia-search-input
+
+ "
+"Update product on category products update","Produkt aktualisieren, wenn die Kategorieprodukte aktualisiert werden"
+"
+
+ This feature enables the extension to automatically update the product index when a product is added to or removed from a category via the ""Catalog > Categories"" menu.
+ By default the feature is turned on.
+
+ ","
+
+ Diese Funktion ermöglicht es der Erweiterung, den Produktindex automatisch zu aktualisieren, wenn ein Produkt über das Menü ""Katalog > Kategorien"" zu einer Kategorie hinzugefügt oder aus einer Kategorie entfernt wird.
+ Standardmäßig ist die Funktion aktiviert.
+
+ "
+"Algolia Search Products","Algolia Suche Produkte"
+"
+ Rebuild products index.
+ ","
+ Produktindex neu aufbauen.
+ "
+"Algolia Search Categories","Algolia Suche Kategorien"
+"
+ Rebuild categories index.
+ ","
+ Kategorieindex neu aufbauen.
+ "
+"Algolia Search Pages","Algolia Suche Seiten"
+"
+ Rebuild pages index.
+ ","
+ Seitenindex neu aufbauen.
+ "
+"Algolia Search Suggestions","Algolia Suche Vorschläge"
+"
+ Rebuild suggestion index.
+ ","
+ Vorschlägeindex neu aufbauen.
+ "
+"
+ Rebuild additional sections index.
+ ","
+ Index für zusätzliche Sektionen neu aufbauen.
+ "
+"Algolia Search Queue Runner","Algolia Suche Queue Runner"
+"
+ Processes the indexing queue if enabled. This allows to run jobs in the indexing queues.
+ ","
+ Verarbeitet die Indexerqueue wenn aktiv. Dies erlaubt Jobs in den Indexerqueues auszuführen.
+ "
+"Search for other ...","Suche nach weiteren ..."
+"Show more products","Zeige mehr Produkte"
+"As low as","Ab"
+"Rating","Bewertung"
diff --git a/view/frontend/web/insights.js b/view/frontend/web/insights.js
old mode 100644
new mode 100755
index 069f5aeca..decc580ea
--- a/view/frontend/web/insights.js
+++ b/view/frontend/web/insights.js
@@ -3,7 +3,8 @@ define(
'jquery',
'algoliaAnalytics',
'algoliaBundle',
- 'algoliaCommon'
+ 'algoliaCommon',
+ 'mage/cookies'
],
function ($, algoliaAnalyticsWrapper, algoliaBundle) {
algoliaAnalytics = algoliaAnalyticsWrapper.default;
@@ -58,8 +59,13 @@ define(
algoliaAnalytics.addAlgoliaAgent(userAgent);
var userToken = getCookie('aa-search');
- if (userToken && userToken !== '') algoliaAnalytics.setUserToken(userToken);
-
+ var unsetAuthenticationToken = getCookie('unset_authentication_token');
+ if (userToken && userToken !== '') {
+ algoliaAnalytics.setAuthenticatedUserToken(userToken);
+ } else if (unsetAuthenticationToken && unsetAuthenticationToken !== '') {
+ algoliaAnalytics.setAuthenticatedUserToken('undefined');
+ $.mage.cookies.clear('unset_authentication_token');
+ }
},
addSearchParameters: function () {
diff --git a/view/frontend/web/instantsearch.js b/view/frontend/web/instantsearch.js
index 08b334ea2..1a371e9db 100644
--- a/view/frontend/web/instantsearch.js
+++ b/view/frontend/web/instantsearch.js
@@ -113,7 +113,7 @@ define(
}
if (algoliaConfig.instant.isVisualMerchEnabled && algoliaConfig.isCategoryPage ) {
- searchParameters.filters = `${algoliaConfig.instant.categoryPageIdAttribute}:'${algoliaConfig.request.path}'`;
+ searchParameters.filters = `${algoliaConfig.instant.categoryPageIdAttribute}:"${algoliaConfig.request.path.replace(/"/g, '\\"')}"`;
}
instantsearchOptions = algolia.triggerHooks('beforeInstantsearchInit', instantsearchOptions, algoliaBundle);
diff --git a/view/frontend/web/internals/search-insights.js b/view/frontend/web/internals/search-insights.js
index 21b7df9b4..598a388fb 100644
--- a/view/frontend/web/internals/search-insights.js
+++ b/view/frontend/web/internals/search-insights.js
@@ -1 +1 @@
-!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e=e||self).AlgoliaAnalytics={})}(this,function(e){"use strict";function n(){"function"!=typeof Object.assign&&(Object.assign=function(e,n){var t=arguments;if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var i=Object(e),o=1;o0;)t[i]=arguments[i+1];e&&c(n[e])?n[e].apply(n,t):console.warn("The method `"+e+"` doesn't exist.")}),o=e[t];o.queue=o.queue||[];var r=o.queue;r.forEach(function(e){var n=[].slice.call(e),t=n[0],o=n.slice(1);i.apply(void 0,[t].concat(o))}),r.push=function(e){var n=[].slice.call(e),t=n[0],o=n.slice(1);i.apply(void 0,[t].concat(o))}}}function C(e){var n=new j({requestFn:e});return"object"==typeof window&&P.call(n,window),n.version=h,n}var U=C(function(){if(r())return w;if(s())return A;throw new Error("Could not find a supported HTTP request client in this environment.")}());e.createInsightsClient=C,e.default=U,Object.defineProperty(e,"__esModule",{value:!0})});
+!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).AlgoliaAnalytics={})}(this,function(e){"use strict";var t="2.11.0";function o(e){return e.reduce(function(e,t){var n=e.events,e=e.additionalParams;return"index"in t?{additionalParams:e,events:n.concat([t])}:{events:n,additionalParams:t}},{events:[],additionalParams:void 0})}function n(){try{return Boolean(navigator.cookieEnabled)}catch(e){return}}function l(e){return void 0===e}function r(e){return"number"==typeof e}function s(e){return"function"==typeof e}function i(e){var n,i,t=e.AlgoliaAnalyticsObject;t&&(i=this,n=function(e){for(var t=[],n=arguments.length-1;0