flanderp Posted August 6, 2019 Share Posted August 6, 2019 Hi, I am having difficulties understanding the help for getProducts, Passing Quote array( 'action' => 'getProducts', 'pid'=>'1', ); results in Quote ( [result] => error [message] => Error generating JSON encoded response: Malformed UTF-8 characters, possibly incorrectly encoded ) if i add module Quote array( 'action' => 'getProducts', 'pid'=>'1', 'module'=>'None', ); results in Quote stdClass Object ( [result] => success [totalresults] => 0 ) Although module according to the documentation is "optional" ? , also tried a number of different PID's for valid products. Essentially i am trying to retrieve a list of all products so that i can search through the names for a match in a CSV file then add the product to a specific client using the PID retrieved from "getProducts", or at least i thought that was the right way to go. WHMCS 7.7.1 Any help much appreciated Thanks Paul 0 Quote Link to comment Share on other sites More sharing options...
mfoland Posted August 7, 2019 Share Posted August 7, 2019 What exactly are you trying to use this on? I actually use this with the WHMCS Licensing Addon. 0 Quote Link to comment Share on other sites More sharing options...
flanderp Posted August 7, 2019 Author Share Posted August 7, 2019 Hi, I may be going about it the wrong way.... I have a large csv file which includes client , contacts , company and product I have created all products using the whmcs admin panel I have added the users using the API along with adding all the contacts Upto this point all is good ..... Now i need to search the list of products in WHMCS for a match against the name (Which corresponds to the name in my CSV) to retrieve the PID , i can then add the order to the client using this PID and change it from pending to active. The only part i am struggling with is retrieving a list including the PID of all products i thought getProducts excluding the PID might give me this information. Any help appreciated Thanks Paul 0 Quote Link to comment Share on other sites More sharing options...
flanderp Posted August 8, 2019 Author Share Posted August 8, 2019 Hi , I have found the issue. Its a problem with the data within the DB , it looks like the database has the wrong colation UTF-8 type which has resulted in data being stored in the wrong format. I need to now find a way to convert the data. Paul 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.