Skip to content

Commit 813c3c3

Browse files
authored
Added documentation links in configuration
1 parent d2c9435 commit 813c3c3

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

Helper/Configuration/NoticeHelper.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ class NoticeHelper extends \Magento\Framework\App\Helper\AbstractHelper
4444
'getClickAnalyticsNotice',
4545
'getPersonalizationNotice',
4646
'getRecommendNotice',
47+
'getCookieConfigurationNotice',
4748
];
4849

4950
/** @var array[] */
@@ -207,6 +208,27 @@ protected function getClickAnalyticsNotice()
207208
'message' => $noticeContent,
208209
];
209210
}
211+
212+
protected function getCookieConfigurationNotice()
213+
{
214+
$noticeContent = '';
215+
$selector = '';
216+
$method = 'after';
217+
218+
// If the feature is enabled in the Algolia dashboard but not activated on the Magento Admin
219+
$noticeContent = '
220+
<div class="algolia_block_cookie">
221+
Find out more about Algolia Cookie Configuration in <a href="https://www.algolia.com/doc/integration/magento-2/how-it-works/analytics-overview/?client=php#algolia-cookie-configuration?utm_source=magento&utm_medium=extension&utm_campaign=magento_2&utm_term=shop-owner&utm_content=doc-link" target="_blank">documentation</a>.
222+
</div>';
223+
$selector = '#algoliasearch_credentials_algolia_cookie_configuration';
224+
$method = 'after';
225+
226+
$this->notices[] = [
227+
'selector' => $selector,
228+
'method' => $method,
229+
'message' => $noticeContent,
230+
];
231+
}
210232

211233
protected function getPersonalizationNotice()
212234
{

0 commit comments

Comments
 (0)