Jump to content

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

Api Product Query Rate Topic   - - - - -

 
  • Ed Newman
  • Advanced Member
  • Members
  • Join Date: 02-Mar 13
  • 136 posts

Posted 23 May 2016 - 09:11 PM #1

We are working on a point of sale to work with CS Cart 4.x.  It will primarily use UPC to look up products, but sometimes there will be a situation where there is not a UPC and we need to search by words.  Here is what I have found with the API in 4.3.6...

 

My product name is "Dark Storm DS9 Typhoon Standard 9mm Rifle Blk"

 

If I search: /api.php?_d=products&q=typhoon%standard

 

It will return the product I am looking for and a few others.

 

BUT, if I search for: /api.php?_d=products&q=standard%typhoon

 

It will not return the result I want because the words are not in order.  The match must be exact and in order.

 

So I tired to search: /api.php?_d=products&q=typhoon&q=standard, but now I get EVERY product that has EITHER work.

 

Any suggestions to get it to search for both words (or sometimes could be 3 or 4 or 5 words) but without regard to order?

 


Ed Newman
Dark Storm Industries LLC
www.dark-storm.com


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

Posted 24 May 2016 - 08:27 AM #2

Not sure if the parameter will be processed by the API, but please try to add match=all parameter. E.g.

 /api.php?_d=products&q=standard%typhoon&match=all

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    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • Ed Newman
  • Advanced Member
  • Members
  • Join Date: 02-Mar 13
  • 136 posts

Posted 24 May 2016 - 09:03 PM #3

Negative.  Did not work.


Ed Newman
Dark Storm Industries LLC
www.dark-storm.com


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

Posted 25 May 2016 - 07:20 AM #4

app/Tygh/Api/Entities/Products.php

 

Try to add

$params['match'] = $this->safeGet($params, 'match', 'all');

after this line:

$params['features_display_on'] = 'A';


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    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • Ed Newman
  • Advanced Member
  • Members
  • Join Date: 02-Mar 13
  • 136 posts

Posted 31 May 2016 - 10:56 PM #5

negative.


Ed Newman
Dark Storm Industries LLC
www.dark-storm.com


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

Posted 01 June 2016 - 07:22 AM #6

Hm.. Just tested first solution on mu local installation and it works correctly.  Test on demo data

 

api/products/?q=pants%20100g

 

0 product found

 

api/products/?q=pants%20100g&match=all

 

1 product found


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    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • proodie
  • Member
  • Members
  • Join Date: 07-Dec 19
  • 35 posts

Posted 02 October 2020 - 05:57 AM #7

In product API how I can get thumbnails of products



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

Posted 02 October 2020 - 01:17 PM #8

Try to add &get_additional=true to the request URL


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    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • proodie
  • Member
  • Members
  • Join Date: 07-Dec 19
  • 35 posts

Posted 15 October 2020 - 05:30 PM #9

Please help, How we can get only active vendor products in Product API

Now I am getting all vendor products if they are disabled.

 

function fn_get_products 

 



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

Posted 16 October 2020 - 05:11 AM #10

try to add &status=A to the URL


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    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • proodie
  • Member
  • Members
  • Join Date: 07-Dec 19
  • 35 posts

Posted 16 October 2020 - 06:45 AM #11

It is not working

Thanks



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

Posted 16 October 2020 - 01:32 PM #12

Try  &status[]=A


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    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)