JSONAPI search for subcategories

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
User avatar
mefailing
Posts: 7
Joined: 15 Feb 2022, 14:15

JSONAPI search for subcategories

Post by mefailing » 22 Apr 2022, 13:45

Hello,

If i search with "&ai[filter][f_catid]=1" the results for the subcategories are missing. Is there a way to get subcategories as well?
  • Categorie 1 (Chairs)
    - Subcategorie 2 (Wooden Chairs)
    - Subcategorie 2 (Steel Chairs)
i tried this but i get a endless loop: "/shop/json-api?ai[action]=options&ai[controller]=Jsonapi&ai[resource]=produc&ai[filter][%7C%7C][f_catid]=5&ai[filter][%7C%7C][f_catid]=33&ai[filter][%7C%7C][f_catid]=34&ai[filter][%26%26][f_search]=chair"

i also tried &ai[filter][%7C%7C][][f_catid]=33 or i also tried &ai[filter][%7C%7C][][][f_catid]=33

thx

User avatar
aimeos
Administrator
Posts: 7893
Joined: 01 Jan 1970, 00:00

Re: JSONAPI search for subcategories

Post by aimeos » 22 Apr 2022, 20:13

Set "client/html/catalog/lists/levels = 3" in your ./config/shop.php to get products from sub-categories too:
https://aimeos.org/docs/latest/config/c ... ts/#levels
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
mefailing
Posts: 7
Joined: 15 Feb 2022, 14:15

Re: JSONAPI search for subcategories

Post by mefailing » 24 Apr 2022, 13:13

thx alot

Post Reply