Skip to content

Commit

Permalink
Merge pull request #1447 from algolia/release/3.12.0
Browse files Browse the repository at this point in the history
Release/3.12.0
  • Loading branch information
mohitalgolia authored Dec 7, 2023
2 parents b3b50e3 + ada53c6 commit df6bd9a
Show file tree
Hide file tree
Showing 33 changed files with 959 additions and 268 deletions.
8 changes: 7 additions & 1 deletion Block/Algolia.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use Algolia\AlgoliaSearch\Helper\Entity\ProductHelper;
use Algolia\AlgoliaSearch\Helper\Entity\SuggestionHelper;
use Algolia\AlgoliaSearch\Helper\LandingPageHelper;
use Algolia\AlgoliaSearch\Registry\CurrentCategory;
use Magento\Catalog\Model\Product;
use Magento\Checkout\Model\Session as CheckoutSession;
use Magento\Customer\Model\Context as CustomerContext;
Expand Down Expand Up @@ -97,6 +98,9 @@ class Algolia extends Template implements CollectionDataSourceInterface
*/
protected $date;

/** @var CurrentCategory */
protected CurrentCategory $currentCategory;

protected $priceKey;

/**
Expand Down Expand Up @@ -139,6 +143,7 @@ public function __construct(
PersonalizationHelper $personalizationHelper,
CheckoutSession $checkoutSession,
DateTime $date,
CurrentCategory $currentCategory,
array $data = []
) {
$this->config = $config;
Expand All @@ -158,6 +163,7 @@ public function __construct(
$this->personalizationHelper = $personalizationHelper;
$this->checkoutSession = $checkoutSession;
$this->date = $date;
$this->currentCategory = $currentCategory;

parent::__construct($context, $data);
}
Expand Down Expand Up @@ -255,7 +261,7 @@ public function getStoreId()

public function getCurrentCategory()
{
return $this->registry->registry('current_category');
return $this->currentCategory->get();
}

/** @return Product */
Expand Down
6 changes: 6 additions & 0 deletions Block/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,12 @@ public function getConfiguration()
'urls' => [
'logo' => $this->getViewFileUrl('Algolia_AlgoliaSearch::images/algolia-logo-blue.svg'),
],
'cookieConfiguration' => [
'consentCookieName' => $config->getDefaultConsentCookieName(),
'cookieAllowButtonSelector' => $config->getAllowCookieButtonSelector(),
'cookieRestrictionModeEnabled' => $config->isCookieRestrictionModeEnabled(),
'cookieDuration' =>$config->getAlgoliaCookieDuration()
],
'ccAnalytics' => [
'enabled' => $config->isClickConversionAnalyticsEnabled(),
'ISSelector' => $config->getClickConversionAnalyticsISSelector(),
Expand Down
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# CHANGE LOG

## 3.12.0

### Updates
- Updated code to consider user’s cookie consent to send events to Algolia by using ‘useCookie’ parameter
- Updated references to [email protected] to new ticket link
- Updated code to refactor the deprecated registry for categories
- Updated code to ensure compatibility with NeuralSearch
- Updated AlgoliaBundle by eliminating the unnecessary jQuery library
- Included the promotion class in autocomplete menu when a product has any promotions

### Bug Fixes
- Fixed formatting issue in product object related to CategoryPageId attribute
- Fixed issue with Clear Refinements button in InstantSearch page
- Fixed issue with custom banner functionality via merchandising dashboard in admin
- Fixed issue with hierarchicalMenu widget when utilizing transformItems when the number of categories exceeded the limit
- Fixed issue with indexing text field attributes with a value of 0
- Fixed issue with user cookies not clearing upon customer logout
- Fixed back button issue with pagination in instant search page and category pages

## 3.11.0

### Updates
Expand Down
Loading

0 comments on commit df6bd9a

Please sign in to comment.