product filter jsonapi
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!
product filter jsonapi
Hello sir
I used laravel aimeos
aimeos/aimeos-core 2021.07.*
php ~7.1||~8.0
In my product list
some product has Texts => name/description in en/ar/fr three languages
some has 2 en/ar, and some has only one language en
when i go in fronted with en in url like domain.com/en/usd/shop/....
then its display all products with en name on list page (because all product has en translate text name )
when i go with ar like domain.com/ar/usd/shop/....
its display all product with ar name which product has ar translate text
otherwise show en name text, but display all products either has ar translate product name or not
here i want, if we go with ar in url
than show only products which has ar translate name Texts, otherwise skip on list page
and if we go with fr than show products which has fr translate text name not all products
like we can add include=text with language filter also in this url
http://localhost:8000/jsonapi/product?include=text
thanks
I used laravel aimeos
aimeos/aimeos-core 2021.07.*
php ~7.1||~8.0
In my product list
some product has Texts => name/description in en/ar/fr three languages
some has 2 en/ar, and some has only one language en
when i go in fronted with en in url like domain.com/en/usd/shop/....
then its display all products with en name on list page (because all product has en translate text name )
when i go with ar like domain.com/ar/usd/shop/....
its display all product with ar name which product has ar translate text
otherwise show en name text, but display all products either has ar translate product name or not
here i want, if we go with ar in url
than show only products which has ar translate name Texts, otherwise skip on list page
and if we go with fr than show products which has fr translate text name not all products
like we can add include=text with language filter also in this url
http://localhost:8000/jsonapi/product?include=text
thanks
Re: product filter jsonapi
Sorry, there's no way to filter by language ID for product name in the JSON REST API.
If you add the available languages as product properties, you can filter by the property.
Required properties:
- type: langid, langid=en, value=1
- type: langid, langid=ar, value=1
JSON API filter:
If you add the available languages as product properties, you can filter by the property.
Required properties:
- type: langid, langid=en, value=1
- type: langid, langid=ar, value=1
JSON API filter:
Code: Select all
/product?filter[!=][product:prop("langid","ar",1)]=
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