Product Filters not showing Custom page

HI,

In my_changes addon , created custom page for product list with products_multicolumns as layout.

the product filters are not showing in the page.

How to show product filters for custom page .

Thanks

As far I know so far is possible only by doing a core modification

please add to file

app/functions/fn.filters.php

add new location to array

            #CORE Modification
            'my_changes.products',

final code

...
function fn_product_filters_validate_location(array $params = [])
{
    if (!empty($params['check_location'])) { // FIXME: this is bad style, should be refactored
        $valid_locations = [
            'categories.view',
            'product_features.view',
            'companies.products',
            'products.search',

            #CORE Modification
            'my_changes.products',
        ];

        if (!in_array($params['dispatch'], $valid_locations)) {
            return false;
        }
    }

    return true;
}
...

PS: With this occasion I recommend CS-Cart team to add a hook for it

Hi,

Thanks for explanation.
added dispatch to fn_product_filters_validate_location and it is working.

but it return all the feature and variants .
the added page also returns products using category ids and if possible to limit only available filter variants for search result.
Thanks

You can use the get_filters_products_count_pre hook as the workaround. Set up the necessary conditions when the

$params['check_location']

should be unset.

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.