Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Catalog] Show the 'is_filterable_in_search' independently of 'is_sea… #3354

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?php
/**
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer versions in the future.
*
* @category Smile
* @package Smile\ElasticsuiteCatalog
* @author Richard BAYET <[email protected]>
* @copyright 2024 Smile
* @license Open Software License ("OSL") v. 3.0
*/

namespace Smile\ElasticsuiteCatalog\Observer\Edit\Tab\Front;

use Magento\Framework\Event\Observer;
use Magento\Framework\Event\ObserverInterface;

/**
* Overriding the product attribute edit form prepare field observer introduced in 2.4.7
* to address the weird logic of ACP2E-1854.
* (see https://github.com/magento/magento2/commit/40b649f1c392fa6e075e76302b4077db0eb48f32)
*
* @category Smile
* @package Smile\ElasticsuiteCatalog
* @SuppressWarnings(PHPMD.LongClassName)
*/
class ProductAttributeFormBuildFormFieldDependenciesObserver implements ObserverInterface
{
/**
* Do nothing. (That observer is supposed to be disabled in config anyway.)
* This is to replace the observer introduced for 2.4.7 for fixing ACP2E-1854 (which we don't need to fix).
*
* @param Observer $observer Observer.
*
* @return void
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function execute(Observer $observer)
{
;
}
}
8 changes: 8 additions & 0 deletions src/module-elasticsuite-catalog/etc/adminhtml/events.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,12 @@
<!-- Adds an export button to the header of the product attribute grid -->
<observer name="smile_elasticsuite_product_attribute_grid_export" instance="Smile\ElasticsuiteCatalog\Observer\Grid\ProductAttributeGridExportObserver" />
</event>

<event name="adminhtml_catalog_product_attribute_edit_frontend_prepare_field_dependencies">
<!--
Circumventing the strange logic of ACP2E-1854. The specific class in addition of the disabled is to avoid
a warning/an error on 2.4.6 where the observer class does not exist.
-->
<observer disabled="true" name="layeredNavigation" instance="Smile\ElasticsuiteCatalog\Observer\Edit\Tab\Front\ProductAttributeFormBuildFormFieldDependenciesObserver" />
</event>
</config>
Loading