Disable force-search not working
					Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
	Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
- PedroLópezAndradas
- Posts: 22
- Joined: 16 Jan 2023, 11:30
Disable force-search not working
Hi!
I'm trying to diable force-search on aimeos_head_search section.
I have tried setting force-search to "0" on:
client/html/catalog/filter/tree/force-search
and on
client/html/catalog/filter/search/force-search
But when I'm on a category, search results are always from that category instead of full catalogue.
It happens even when I override search-body.php template and set $enforce = false
Maybe I'm missing something?
Thanks!
			
			
			
									
									
						I'm trying to diable force-search on aimeos_head_search section.
I have tried setting force-search to "0" on:
client/html/catalog/filter/tree/force-search
and on
client/html/catalog/filter/search/force-search
But when I'm on a category, search results are always from that category instead of full catalogue.
It happens even when I override search-body.php template and set $enforce = false
Maybe I'm missing something?
Thanks!
Re: Disable force-search not working
It's this setting:PedroLópezAndradas wrote: ↑09 Mar 2023, 09:15 I'm trying to diable force-search on aimeos_head_search section.
I have tried setting force-search to "0" on:
client/html/catalog/filter/tree/force-search
and on
client/html/catalog/filter/search/force-search
Code: Select all
client/html/catalog/filter/search/force-search
Code: Select all
	'client' => [
		'html' => [
			'catalog' => [
				'filter' => [
					'search' => [
						'force-search' => true,
					],
				],
			],
		],
	],
https://aimeos.org/docs/latest/laravel/ ... figuration
It will do the same but you have another template you overwrite in your project.PedroLópezAndradas wrote: ↑09 Mar 2023, 09:15 It happens even when I override search-body.php template and set $enforce = false
Professional support and custom implementation are available at  Aimeos.com
If you like Aimeos, give us a star
 give us a star
						If you like Aimeos,
 give us a star
 give us a star- PedroLópezAndradas
- Posts: 22
- Joined: 16 Jan 2023, 11:30
Re: Disable force-search not working
Hi @aimeos, thank you for your help.
I've removed all the templates that I had overrided, and it still is searching only on current category.
			
			
			
									
									
						I've removed all the templates that I had overrided, and it still is searching only on current category.
Code: Select all
	'client' => [
		'html' => [
			'catalog' => [
				'filter' => [
					'search' => [
						'force-search' => true
					],
					'tree' => [
						'force-search' => true
					]
				]
			]
		]
	]
Re: Disable force-search not working
In that case it's "client/html/catalog/filter/tree/force-search" which must be FALSE.
			
			
			
									
									Professional support and custom implementation are available at  Aimeos.com
If you like Aimeos, give us a star
 give us a star
						If you like Aimeos,
 give us a star
 give us a star- PedroLópezAndradas
- Posts: 22
- Joined: 16 Jan 2023, 11:30
Re: Disable force-search not working
Dear aimeos, thank you for your help.
I've tested all possible combinations, and the behaviour is just the same.
When inside a category, pressing search button adds the query to de current category url:
https://midomain.xxx/shop/category~40?f_search=mammo
And the result are obviously empty. 
 
Is that the expected behaviour? I think it should search on full shop, like:
https://midomain.xxx/shop/?f_search=mammo
Thanks.
			
			
			
									
									
						I've tested all possible combinations, and the behaviour is just the same.
When inside a category, pressing search button adds the query to de current category url:
https://midomain.xxx/shop/category~40?f_search=mammo
And the result are obviously empty.
 
 Is that the expected behaviour? I think it should search on full shop, like:
https://midomain.xxx/shop/?f_search=mammo
Thanks.
Re: Disable force-search not working
If you overwrite this template and remove adding parameters at all, it may work as you want:
https://github.com/aimeos/ai-client-htm ... dy.php#L83
The two options are only for including the f_search resp. f_catid/f_name parameters in the URL or POST when searching.
			
			
			
									
									https://github.com/aimeos/ai-client-htm ... dy.php#L83
The two options are only for including the f_search resp. f_catid/f_name parameters in the URL or POST when searching.
Professional support and custom implementation are available at  Aimeos.com
If you like Aimeos, give us a star
 give us a star
						If you like Aimeos,
 give us a star
 give us a star- PedroLópezAndradas
- Posts: 22
- Joined: 16 Jan 2023, 11:30
Re: Disable force-search not working
I never got back to you.
Thank you so much for your guidance, it was totally helpful.
<3
			
			
			
									
									
						Thank you so much for your guidance, it was totally helpful.
<3
 Star Repo
					Star Repo
				
