<?xml version="1.0"?>
<!--
/**
 * @author Amasty Team
 * @copyright Copyright (c) 2023 Amasty (https://www.amasty.com)
 * @package Mage 2.4.5 fix by Amasty for Magento 2 (System)
 */-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
    <system>
        <section id="amshopby">
            <group id="developer" translate="label" type="select" sortOrder="500" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Developer</label>
                <field id="is_magento_changes_disabled" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Disable Magento 2.4.5 Product Collection Changes</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                    <comment>
                        Skip mysql sort method \Magento\Elasticsearch\Model\ResourceModel\Fulltext\Collection\SearchResultApplier::categoryProductByCustomSortOrder()
                        which was added in 2.4.5 and causing errors. Magento will remove this method in future versions.
                        More information about errors in \Amasty\Mage245Fix\Model\ResourceModel\Fulltext\Collection\SearchResultApplier\Mage245Fix
                        class description.
                    </comment>
                </field>
            </group>
        </section>
        <section id="amsorting">
            <group id="developer" translate="label" type="select" sortOrder="500" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Developer</label>
                <field id="is_magento_changes_disabled" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Disable Magento 2.4.5 Product Collection Changes</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                    <comment>
                        Skip mysql sort method \Magento\Elasticsearch\Model\ResourceModel\Fulltext\Collection\SearchResultApplier::categoryProductByCustomSortOrder()
                        which was added in 2.4.5 and causing errors. Magento will remove this method in future versions.
                        More information about errors in \Amasty\Mage245Fix\Model\ResourceModel\Fulltext\Collection\SearchResultApplier\Mage245Fix
                        class description.
                    </comment>
                </field>
            </group>
        </section>
    </system>
</config>
