Jump to content

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

How To Pass The Value To Let Php Code Convert It To Php Array? Rate Topic   - - - - -

 
  • michael
  • Senior Member
  • Authorized Reseller
  • Join Date: 27-Oct 06
  • 229 posts

Posted 11 August 2020 - 07:59 AM #1

Error Description:

try to get products by filter, filter_variants. The value of filter_variants has to be array. The code

pass an array of '[5678]' to API 'products' via HTTP-GET.

 

response error as:

Error Message:array_keys() expects parameter 1 to be array, string given. Error at: app/functions/fn.catalog.php, line: 7064

 

Question

Anyone know how to pass the value to let php code convert it to php array?


Do whatever you want to do....

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

Posted 11 August 2020 - 01:22 PM #2

Please clarify your question with more details


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)

 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11745 posts

Posted 11 August 2020 - 05:13 PM #3

It would appear that you are not properly specifying your Features/Filters in the JSON you (or your application) is passing to the API.  Review your JSON data.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • michael
  • Senior Member
  • Authorized Reseller
  • Join Date: 27-Oct 06
  • 229 posts

Posted 13 August 2020 - 10:40 AM #4

Thanks for your reply, I can not find the feature/filters in the develop document, can you please guide me ? Very appreciate !


Do whatever you want to do....

 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11745 posts

Posted 13 August 2020 - 06:04 PM #5

Can only refer you to the API documentation....  Probably easiest is to GET a product with features and filters and look at how the JSON is structured.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • michael
  • Senior Member
  • Authorized Reseller
  • Join Date: 27-Oct 06
  • 229 posts

Posted 14 August 2020 - 01:25 PM #6

Thank you very much for your reply, the API document still not clear enough about filters/features, really need to improve.


Do whatever you want to do....