Filter products by category id
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!
- ahmed31916
- Advanced
- Posts: 148
- Joined: 14 Apr 2022, 12:15
Filter products by category id
Hello Aimeos,
Would you tell me how can I filter products by category id?
Attribute, supplier, and price filters are very clear to use. I just add f_attrid in the form and send it.
However, searching by category id need "f_catid" and "f_name"?
Why we need "f_name"!
Isn't "f_catid" enough to search?
How can I search by category just in "f_catid"?
Best Regards
Would you tell me how can I filter products by category id?
Attribute, supplier, and price filters are very clear to use. I just add f_attrid in the form and send it.
However, searching by category id need "f_catid" and "f_name"?
Why we need "f_name"!
Isn't "f_catid" enough to search?
How can I search by category just in "f_catid"?
Best Regards
Re: Filter products by category id
If you use the aimeos_shop_list route (the list/search page), you can use f_catid only. For aimeos_shop_tree (the category page), you need f_catid and f_name.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
- ahmed31916
- Advanced
- Posts: 148
- Joined: 14 Apr 2022, 12:15
Re: Filter products by category id
Unfortunately it does not work. It returns an error:
This is my form:
Code: Select all
/en/shop
Missing required parameter for [Route: aimeos_shop_tree] [URI: {locale}/shop/{f_name}~{f_catid}] [Missing parameter: f_name].
Code: Select all
<form method="GET" action="<?= airoute('aimeos_shop_list') ?>">
<select name="f_catid">
<?php foreach ($this->get('Model_categories') as $id => $item) : ?>
<option value="<?= $id ?>"><?= $item->label ?></option>
<?php endforeach ?>
</select>
</form>
- ahmed31916
- Advanced
- Posts: 148
- Joined: 14 Apr 2022, 12:15
Re: Filter products by category id
@aimeos help me, please!
Re: Filter products by category id
Somewhere, aimeos_shop_tree is still used and for that route, you need f_name too.
Try to find out where aimeos_shop_tree is used and see if you can remove it or add the f_name parameter.
Try to find out where aimeos_shop_tree is used and see if you can remove it or add the f_name parameter.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star