Page 1 of 1

How to redirect to a page from category filter?

Posted: 27 Sep 2019, 14:22
by t_csaba
Hi,

I have a small problem with redirecting the catalog filter to a certain page.
This is my whole setup right now, i would like to redirect everyone who clicks on a category to a certain page, where i have my catalog list. Could you please help me out? What am I missing here?

Code: Select all

#header category menu
lib.navcat = COA
lib.navcat.10 = USER
lib.navcat.10 {
        userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
        vendorName = Aimeos
        extensionName = Aimeos
        pluginName = catalog-filter
        controller = Catalog
        action = filter
        settings.controller.frontend.catalog.levels-always = 5
        settings.controller.frontend.catalog.levels-only = 10
        settings.client.html.catalog.filter.standard.template-body = catalog/filter/body-navcats
        settings.client.html.catalog.filter.standard.subparts{
            0 > #search
            1 = tree
            2 > #supplier
            3 > #attribute
        }
        settings.client.html.catalog.lists.url.target = 17
        settings.client.html.catalog.suggest.url.target = 10
        settings.client.html.catalog.count.url.target = 9
        settings.client.jsonapi.url.target = 2
}
typo3: 9.5.8
aimeos: 19.7.1
php: 7.2.5, Linux

Re: How to redirect to a page from category filter?

Posted: 27 Sep 2019, 15:19
by aimeos
You have to select the page you want to redirect in the flexform configuration of the catalog filter plugin. Setting it in the Setup TypoScript doesn't work because TYPO3 overwrites that with the empty flexform value if not set in the flexform.

Re: How to redirect to a page from category filter?

Posted: 30 Sep 2019, 07:42
by t_csaba
I use the same setup for a search bar in the header, where the page target is the same, and there the url redirect is working. Could it be something else?

Re: How to redirect to a page from category filter?

Posted: 01 Oct 2019, 13:58
by t_csaba
Also, i have noticed that in the generated html, the form is rendered like this:

Code: Select all

<form method="GET" action="/shop?ai%5Bcontroller%5D=Catalog&amp;ai%5Baction%5D=list">
But the individual links are rendered like this:

Code: Select all

<a class="cat-item" href="/?ai%5Bf_name%5D=Laptops,_tablets_and_mobile&amp;ai%5Bf_catid%5D=2&amp;ai%5Bcontroller%5D=Catalog&amp;ai%5Baction%5D=list">
So I know that the typoscript config is OK ( "shop" is the page where i want to redirect )

Re: How to redirect to a page from category filter?

Posted: 01 Oct 2019, 14:07
by t_csaba
Fixed it, I had to add this to my setup:

Code: Select all

settings.client.html.catalog.tree.url.target = 17