Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Api Query Format For Products With Variant Id's Rate Topic   - - - - -

 
  • mattza
  • Member
  • Trial users
  • Join Date: 19-Jun 16
  • 26 posts

Posted 09 March 2017 - 09:02 AM #1

Hi,

 

I have setup an api request via $POST data with multiple variant_id's which works fine in displaying json data however I can't seem to get exact filtered matches of the submitted values in the url string. The results include all products with any of those variants but not matching the exact string of variants requested. I have tried multiple combinations but can't seem to narrow down the results like one would be able to filter on the front end of the website with the sidebar checkboxes.

 

The query url format is:

 

http://example.com/a...=y&variant_id=z. etc

 

Since the products have multiple features, there are multiple variant_id's which are used to try filter a response and can vary between 4 and 6 variant_id's in the request which results in loads of products displaying since they contain any of those variants.

 

The Features are loaded as Multiple Checkbox options and some products do have multiple options per Feature.

 

Has anyone encountered a similar problem and found a format which returns exact matches or can perhaps suggest a better format?

 

Thanks

Matt



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19051 posts

Posted 09 March 2017 - 02:15 PM #2

Try to make search by feature variants in the admin panel and check which parameters are used in the search query. Then copy them to your URL and check the result


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • mattza
  • Member
  • Trial users
  • Join Date: 19-Jun 16
  • 26 posts

Posted 09 March 2017 - 02:34 PM #3

Try to make search by feature variants in the admin panel and check which parameters are used in the search query. Then copy them to your URL and check the result

Thanks eComLabs,

Not sure what you mean by search in the admin panel?



 
  • mattza
  • Member
  • Trial users
  • Join Date: 19-Jun 16
  • 26 posts

Posted 09 March 2017 - 02:54 PM #4

Try to make search by feature variants in the admin panel and check which parameters are used in the search query. Then copy them to your URL and check the result

Not to worry eComLabs, I figured out the search. Thanks for the help. I'll let you know if it works with the api.



 
  • mattza
  • Member
  • Trial users
  • Join Date: 19-Jun 16
  • 26 posts

Posted 09 March 2017 - 05:14 PM #5

Try to make search by feature variants in the admin panel and check which parameters are used in the search query. Then copy them to your URL and check the result

Thanks eComLabs, results are now parsing correctly. Appreciate your assistance.



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19051 posts

Posted 10 March 2017 - 06:52 AM #6

We were glad to help you!


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.