Skip to content

Commit 7576249

Browse files
authored
Merge pull request #1450 from algolia/develop
release/3.12.0
2 parents 80ab7c0 + df6bd9a commit 7576249

33 files changed

+959
-268
lines changed

Block/Algolia.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use Algolia\AlgoliaSearch\Helper\Entity\ProductHelper;
1111
use Algolia\AlgoliaSearch\Helper\Entity\SuggestionHelper;
1212
use Algolia\AlgoliaSearch\Helper\LandingPageHelper;
13+
use Algolia\AlgoliaSearch\Registry\CurrentCategory;
1314
use Magento\Catalog\Model\Product;
1415
use Magento\Checkout\Model\Session as CheckoutSession;
1516
use Magento\Customer\Model\Context as CustomerContext;
@@ -97,6 +98,9 @@ class Algolia extends Template implements CollectionDataSourceInterface
9798
*/
9899
protected $date;
99100

101+
/** @var CurrentCategory */
102+
protected CurrentCategory $currentCategory;
103+
100104
protected $priceKey;
101105

102106
/**
@@ -139,6 +143,7 @@ public function __construct(
139143
PersonalizationHelper $personalizationHelper,
140144
CheckoutSession $checkoutSession,
141145
DateTime $date,
146+
CurrentCategory $currentCategory,
142147
array $data = []
143148
) {
144149
$this->config = $config;
@@ -158,6 +163,7 @@ public function __construct(
158163
$this->personalizationHelper = $personalizationHelper;
159164
$this->checkoutSession = $checkoutSession;
160165
$this->date = $date;
166+
$this->currentCategory = $currentCategory;
161167

162168
parent::__construct($context, $data);
163169
}
@@ -255,7 +261,7 @@ public function getStoreId()
255261

256262
public function getCurrentCategory()
257263
{
258-
return $this->registry->registry('current_category');
264+
return $this->currentCategory->get();
259265
}
260266

261267
/** @return Product */

Block/Configuration.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,12 @@ public function getConfiguration()
288288
'urls' => [
289289
'logo' => $this->getViewFileUrl('Algolia_AlgoliaSearch::images/algolia-logo-blue.svg'),
290290
],
291+
'cookieConfiguration' => [
292+
'consentCookieName' => $config->getDefaultConsentCookieName(),
293+
'cookieAllowButtonSelector' => $config->getAllowCookieButtonSelector(),
294+
'cookieRestrictionModeEnabled' => $config->isCookieRestrictionModeEnabled(),
295+
'cookieDuration' =>$config->getAlgoliaCookieDuration()
296+
],
291297
'ccAnalytics' => [
292298
'enabled' => $config->isClickConversionAnalyticsEnabled(),
293299
'ISSelector' => $config->getClickConversionAnalyticsISSelector(),

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
# CHANGE LOG
22

3+
## 3.12.0
4+
5+
### Updates
6+
- Updated code to consider user’s cookie consent to send events to Algolia by using ‘useCookie’ parameter
7+
- Updated references to [email protected] to new ticket link
8+
- Updated code to refactor the deprecated registry for categories
9+
- Updated code to ensure compatibility with NeuralSearch
10+
- Updated AlgoliaBundle by eliminating the unnecessary jQuery library
11+
- Included the promotion class in autocomplete menu when a product has any promotions
12+
13+
### Bug Fixes
14+
- Fixed formatting issue in product object related to CategoryPageId attribute
15+
- Fixed issue with Clear Refinements button in InstantSearch page
16+
- Fixed issue with custom banner functionality via merchandising dashboard in admin
17+
- Fixed issue with hierarchicalMenu widget when utilizing transformItems when the number of categories exceeded the limit
18+
- Fixed issue with indexing text field attributes with a value of 0
19+
- Fixed issue with user cookies not clearing upon customer logout
20+
- Fixed back button issue with pagination in instant search page and category pages
21+
322
## 3.11.0
423

524
### Updates

0 commit comments

Comments
 (0)