RealURL setup - fixedPostVars
Posted: 27 Apr 2015, 12:37
As an option to get rid of too-long URL, created a setting for RealURL:
Where
aimeosListConfiguration - settings for the page with List of products and Filter plugin
aimeosDetailConfiguration - settings for the page with Detail of product
28 - ID page with Detail of product
29 - ID page with List of products and Filter plugin
Accordingly, get rid of these settings postVarSets:
At the same time we get a short URL, like this:
.../list/name/
.../list/-name/
.../detail/1/0/
and so on...
But was unable to configure the URL to filter by attributes:
/list/name/?ai%5Bf_search%5D=&ai%5Bf_attrid%5D%5B56%5D=в+наличии
That is, the parameters are still there ai[f_search]=
How to remove empty ai[f_search] ?
and I do not know how to configure attributes: ai[f_attrid][56]=в+наличии
That is how to take account this:
List of attribute IDs and names the user has filtered for. They are of the form "f_attrid[<id>]=<name>"
It turns out that for each attribute you need to do their setting?
ai[f_attrid][1]
ai[f_attrid][2]
...
ai[f_attrid][ID_n]
Or something like this can be avoided
Code: Select all
...
'fixedPostVars' =>
array(
'aimeosListConfiguration' => array(
array(
'GETvar' => 'ai[f_catid]',
'noMatch' => 'bypass',
),
array(
'GETvar' => 'ai[f_name]',
'noMatch' => 'bypass',
),
array(
'GETvar' => 'ai[f_sort]',
'valueMap' =>
array(
'name' => 'name',
'-name' => '-name',
'price' => 'price',
'-price' => '-price',
'relevance' => 'relevance',
),
'noMatch' => 'bypass',
),
// array (
// 'GETvar' => 'ai[f_search]',
//// 'noMatch' => 'bypass',
// ),
// array (
// 'GETvar' => 'ai[f_attrid][57]',
// 'noMatch' => 'bypass',
// ),
array(
'GETvar' => 'ai[l_page]',
'noMatch' => 'bypass',
),
),
'aimeosDetailConfiguration' => array(
0 =>
array(
'GETvar' => 'ai[d_prodid]',
),
1 =>
array(
'GETvar' => 'ai[d_name]',
'noMatch' => 'bypass',
),
2 =>
array(
'GETvar' => 'ai[l_pos]',
),
),
'28' => 'aimeosDetailConfiguration',
'29' => 'aimeosListConfiguration',
),
...
aimeosListConfiguration - settings for the page with List of products and Filter plugin
aimeosDetailConfiguration - settings for the page with Detail of product
28 - ID page with Detail of product
29 - ID page with List of products and Filter plugin
Accordingly, get rid of these settings postVarSets:
Code: Select all
'postVarSets' =>
array (
'_DEFAULT' =>
array (
'aimeos' =>
array (
0 =>
array (
'GETvar' => 'ai[controller]',
'noMatch' => 'bypass',
),
1 =>
array (
'GETvar' => 'ai[action]',
'noMatch' => 'bypass',
),
),
// 'f' =>
// array (
// 0 =>
// array (
// 'GETvar' => 'ai[f_catid]',
// ),
// 1 =>
// array (
// 'GETvar' => 'ai[f_name]',
// ),
// 2 =>
// array (
// 'GETvar' => 'ai[f_sort]',
// 'valueMap' =>
// array (
// 'name' => 'name',
// '-name' => '-name',
// 'price' => 'price',
// '-price' => '-price',
// 'relevance' => 'relevance',
// ),
// 'noMatch' => 'bypass',
// ),
// 3 =>
// array (
// 'GETvar' => 'ai[l_page]',
// ),
// ),
// 'd' =>
// array (
// 0 =>
// array (
// 'GETvar' => 'ai[d_prodid]',
// ),
// 1 =>
// array (
// 'GETvar' => 'ai[d_name]',
// ),
// 2 =>
// array (
// 'GETvar' => 'ai[l_pos]',
// ),
// ),
.../list/name/
.../list/-name/
.../detail/1/0/
and so on...
But was unable to configure the URL to filter by attributes:
/list/name/?ai%5Bf_search%5D=&ai%5Bf_attrid%5D%5B56%5D=в+наличии
That is, the parameters are still there ai[f_search]=
How to remove empty ai[f_search] ?
and I do not know how to configure attributes: ai[f_attrid][56]=в+наличии
That is how to take account this:
List of attribute IDs and names the user has filtered for. They are of the form "f_attrid[<id>]=<name>"
It turns out that for each attribute you need to do their setting?
ai[f_attrid][1]
ai[f_attrid][2]
...
ai[f_attrid][ID_n]
Or something like this can be avoided