Review Frontend Query filter

Help for integrating the Laravel package
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!
User avatar
bilginkilic
Posts: 34
Joined: 05 Jul 2020, 07:08

Review Frontend Query filter

Post by bilginkilic » 02 Aug 2020, 16:24

we developed a simple review plugin, so that we can filter with the product and user id as below in the admin section (Image-1)
We want to do the same in the front-end. Filtering works with review ID in the front-end. (Image-2)
How can we query the product_id and user_id filtering parameters from the URL? What sort of arrangement should we make in which class or method. Please kindly suggest.

image 1 : https://prnt.sc/tsqva8
image 2: https://prnt.sc/tsqvit
image 3:https://prnt.sc/tsqvnn
@bilginkilic_ (twitter)

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

Re: Review Frontend Query filter

Post by aimeos » 03 Aug 2020, 07:31

The Aimeos dev-master branch already contains a JSON REST API endpoint for retrieving reviews.
We can join forces to get the rest implemented :-)
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
bilginkilic
Posts: 34
Joined: 05 Jul 2020, 07:08

Re: Review Frontend Query filter

Post by bilginkilic » 03 Aug 2020, 10:28

Yes we can empower it together. Just tell us how can we work together. We are in rush to make a review module ready .
We only need information and examples for adding filters in JSON REST API. kindly asked
@bilginkilic_ (twitter)

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

Re: Review Frontend Query filter

Post by aimeos » 03 Aug 2020, 10:51

The admin panel for the implementation in the core is missing. If you can migrate your implemenation to use the Aimeos review manager and create a pull request on Github, this would help getting the job done.

For the core JSON endpoint, you can use the filter parameter:

Code: Select all

/jsonapi/review?filter[%26%26][][%3D%3D][review.domain]=product&filter[%26%26][][%3D%3D][review.refid]=11&sort=-review.ctime
or for sort by rating:

Code: Select all

/jsonapi/review?filter[%26%26][][%3D%3D][review.domain]=product&filter[%26%26][][%3D%3D][review.refid]=11&sort=-review.rating
You can also filter by customer ID:

Code: Select all

/jsonapi/review?filter[%26%26][][%3D%3D][review.domain]=product&filter[%26%26][][%3D%3D][review.customerid]=1&sort=-review.mtime
More information is available here:
https://aimeos.org/docs/Developers/Clie ... the_result
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
bilginkilic
Posts: 34
Joined: 05 Jul 2020, 07:08

Re: Review Frontend Query filter

Post by bilginkilic » 13 Aug 2020, 12:41

Please give swordbros user on github to make a pull request for review. Thank you. We get access denied error.
@bilginkilic_ (twitter)

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

Re: Review Frontend Query filter

Post by aimeos » 13 Aug 2020, 12:54

You have to fork the repository, commit your changes there and create a pull request.
More details are described here: https://aimeos.org/docs/Developers/Git_workflow
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply