Jump to content

PSWebServiceLibrary for WebService 1.7.0


DevMvrht

Recommended Posts

Hello,
 
I am interested in playing with the WebService of Prestashop.
 
I have followed the  Web service tutorial which is targeting Prestashop in its 1.6 version. I have installed the version 1.7.0.5 of Prestashop and I am encountering issues at the  Chapter 3 - First steps - Accessing the web service and listing customers
 
I have downloaded the  PSWebServiceLibrary.php script into my root folder, created my own script to use the PrestaShopWebservice class :
 
 

try {
    // creating web service access
    $webService = new PrestaShopWebservice(PS_SHOP_PATH, PS_WS_AUTH_KEY, DEBUG);


    // call to retrieve all customers
    $xml = $webService->get(array('resource' => 'customers'));
}
catch (PrestaShopWebserviceException $ex) {
    // Shows a message related to the error
    echo 'Other error: <br />' . $ex->getMessage();
}

But unfortunately, I get the following error :
 


Other error
This library is not compatible with this version of PrestaShop.

Please upgrade/downgrade this library

 
Thus, I was wondering if there was the 1.7-compliant version of the  PSWebServiceLibrary script available somewhere.

 
I changed the value of the psCompatibleVersionsMax member of the PSWebServiceLibrary class but I don't think it's the way to go.

 

 

const psCompatibleVersionsMin = '1.4.0.0';
const psCompatibleVersionsMax = '1.7.1.0';

I didn't see anything related to WebService on the  documentation of Prestashop, nor on their new  Developers portal of Prestashop

 
Thanks in advance for your help, have a nice day.

Edited by DevMvrht (see edit history)
Link to comment
Share on other sites

  • 3 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...