File tree Expand file tree Collapse file tree 3 files changed +54
-0
lines changed
app/code/Magento/CatalogSearch/view/adminhtml Expand file tree Collapse file tree 3 files changed +54
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" ?>
2
+ <!--
3
+ /**
4
+ * Copyright 2024 Adobe
5
+ * All Rights Reserved.
6
+ */
7
+ -->
8
+ <page xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" urn:magento:framework:View/Layout/etc/page_configuration.xsd" >
9
+ <body >
10
+ <referenceContainer name =" js" >
11
+ <block class =" Magento\Backend\Block\Template" name =" custom.config.js" template =" Magento_CatalogSearch::custom_comment.phtml" />
12
+ </referenceContainer >
13
+ </body >
14
+ </page >
Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * Copyright 2024 Adobe
4
+ * All Rights Reserved.
5
+ */
6
+ ?>
7
+ <script type="text/x-magento-init">
8
+ {
9
+ "*": {
10
+ "Magento_CatalogSearch/js/custom-comment": {}
11
+ }
12
+ }
13
+ </script>
Original file line number Diff line number Diff line change
1
+ /**
2
+ * Copyright 2024 Adobe
3
+ * All Rights Reserved.
4
+ */
5
+ require ( [
6
+ 'jquery' ,
7
+ 'domReady!'
8
+ ] , function ( $ ) {
9
+ 'use strict' ;
10
+
11
+ $ ( function ( ) {
12
+ const engineField = $ ( '#catalog_search_engine' ) ,
13
+ commentContainer = $ ( '#row_catalog_search_engine p' ) ;
14
+
15
+ engineField . change ( ( ) => {
16
+ const engineValue = engineField . val ( ) ;
17
+ let commentText = 'If not specified, Default Search Engine will be used.' ;
18
+
19
+ if ( [ 'elasticsearch7' , 'elasticsearch8' ] . includes ( engineValue ) ) {
20
+ commentText = 'This search engine option is no longer supported by Adobe. ' +
21
+ 'It is recommended to use OpenSearch as a search engine instead.' ;
22
+ }
23
+
24
+ commentContainer . text ( commentText ) ;
25
+ } ) ;
26
+ } ) ;
27
+ } ) ;
You can’t perform that action at this time.
0 commit comments