Вопрос

Is anyone know how I can add custom block to price filter in layered navigation?

I curently moved my block with jQuery, but what if someone add more attributes? Maybe I could add class to price filter?

$('#narrow-by-list > div:nth-child(7)').append( $('#myBlock') );
Это было полезно?

Решение

I set my price attribute to be last one and staid with my jQuery

<script>
    require(
        [
            'jquery'
        ],
        function(
            $
        ) {
            $('#narrow-by-list > div:last-child .filter-options-content').append( $('#myDiv') );


        }

    );

</script>

also can be done with if statement

if ($(".filter-current").is(':contains("Price")')) {
Лицензировано под: CC-BY-SA с атрибуция
Не связан с magento.stackexchange
scroll top