Jump to content

Prestashop Api


Recommended Posts

Just tested how Prestashop Api work.

try {
        require_once( Yii::app()->basePath.'/modules/PSWebService/PSWebServiceLibrary.php' );
        $webService = new PrestaShopWebservice('http://myweb.net', $api_key, false);

        $opt = array('resource' => 'customers');s
        //Retrieving the XML data
        $xml = $webService->get($opt);

        $resources = $xml->customers->children();

        //From there, you can easily access client IDs. Here's an example with a path from identifiers:
        foreach ($resources as $resource)
            echo $resource->attributes() . '<br />';

        catch (PrestaShopWebserviceException $ex) {
           // Shows a message related to the error
           echo 'Other error: <br />' . $ex->getMessage();

and to this point it is ok, but if I change request for products.

  $opt = array('resource' => 'products',
                  'display' => 'full');

server return Error.


API Webservice Key has all privileges for product.

This call to PrestaShop Web Services failed and returned an HTTP status of 500. That means: Internal Server Error.

what can be the cause of this conflict.?



Link to comment
Share on other sites

Found this:
Failed loading /usr/local/php54/lib/php/extensions/ioncube.so: /usr/local/php54/lib/php/extensions/ioncube.so: undefined symbol: zend_new_interned_string
Failed loading /usr/local/php54/lib/php/extensions/ZendOptimizer.so: /usr/local/php54/lib/php/extensions/ZendOptimizer.so: undefined symbol: zend_new_interned_string
X-Powered-By: PHP/5.3.26
Content-type: text/html

this mean two libraries are missing:


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

it means that those extensions are trying to be loaded but cannot be.  If also says that you are using PHP 5.3.26 and trying to load extensions from PHP 5.4


I DON'T know if that is causing the issue with your webservice, not enough detail is provided to determine that

Link to comment
Share on other sites

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...