Skip to content

Pagination parameter being added to query parameter when navigating to subcategory #341

Description

@LeonidasJP

Affects Version: v8.8.0
Magento Version: 2.4.6-p13, 2.4.8-p3

We're using the QueryParameter filter strategy. This strategy appends all search parameters to the query string, including the current page.
Our client also uses a filter view that renders subcategories. The links that this filter view generate, also receive the full query string, including the Pagination Parameter.

When the Customer uses filters, goes to a later page in a Category and then moves over to another Category using the filter view, this triggers an additional redirect; for example, Customer goes to page 10 of the category "Swimwear", then moves over to the "Speedos", but Speedos has only five pages, you get redirected from Speedos page 10 to Speedos page 5.
swimwear/?p=10 > swimwear/speedos/?p=10 > swimwear/speedos/?p=5

This additional redirect is negatively influencing the SEO of our Client, and we also notice this additional redirect triggers some additional, preventable load. Is it possible to eliminate the Pagination parameter from the URLs that are used in the Category Filter? For example by adding the parameter to the ignoredQueryParameters property?

The links in the filter are generated through \Tweakwise\Magento2Tweakwise\Model\Catalog\Layer\Url\Strategy\QueryParameterStrategy::getCategoryFilterSelectUrl(), and specifically the call to getAttributeFilters() in there, adds the full query string, including the p parameter which is responsible for setting the active page.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions