2

I have products that appear in the catalog view with the attribute "minimal_price" and the LayeredNavegation filters them for the "price" attribute. I want the filter to use the "minimal price" instead of price.

Atributes of the product:

[273]=> array(37) {
            ["entity_id"]=> string(3) "273"         
            ["price"]=> string(7) "59.9000"       
            ["final_price"]=> string(7) "59.9000" 
            ["minimal_price"]=> string(7) "49.5074" 
            ["min_price"]=> string(7) "59.9000" 
            ["max_price"]=> string(7) "59.9000" 
            ["tier_price"]=> string(7) "49.5074" 
}

Filter: (I have tried changing the value "price" to "minimal_price" but it doesn't work.)

$this->getLayer()->getProductCollection()->addFieldToFilter(
        'price',
        ['from' => $from, 'to' => $to]
);

enter image description here

How to change this?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.