0

I have a custom stock status attribute with 4 options.

array(
    4 => 'In Stock',
    3 => 'Soon',
    2 => 'Out Of Stock',
    1 => 'Discontinued',
);

I want change the way of price filter in layered navigation applied.
I want only products that has value "4" (In Stock) for stock status attribute displayed after applying price filter.

How can I do this?

1

You can rewrite the method Mage_Catalog_Model_Resource_Layer_Filter_Price::applyPriceRange or (Mage_Catalog_Model_Layer_Filter_Price::applyPriceRange - one is a wrapper for the other). Both are called when applying the price filter to collection.
You can add in your new method an additional filter by your attribute.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.