Question

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') );
Was it helpful?

Solution

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")')) {
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top