How To Make Default Filter?

Hi i want an filter value set default for search result and categories page,

Which hook can be used ? And how can i set pre filter ? Thank you


get_products_before_select Its the correct hook?

Yes, you can use this hook. Also take into account what you should extend the fn_get_filters_products_count function (app/functions/fn.catalog.php)

    $join .= db_quote(" INNER JOIN ?:product_features_values as c_var ON c_var.product_id = products.product_id AND c_var.lang_code = ?s AND c_var.variant_id = ?i", $lang_code, '750');

i added this code before_select hook. its worked but

search result filters worked true

but category pages show some filters, its not included product list.

nothing doesnt work stable.

i think i have to add just some where just

$params['variant_id'] = $variand_id;

but where ?

nothing doesnt work stable.

i think i have to add just some where just

$params['variant_id'] = $variand_id;

but where ?

Try to use first hook in the mentioned function

fixed