Jump to content

PSWebServiceLibrary: error tring to get products id_default_image


Marco Marongiu

Recommended Posts

Hi all,
i keep getting this error when i try to get all the products with default images, even if i try to set limit the display.

Here's an example of the code: 


       try
        {
            $webService = new \PrestaShopWebservice(PS_SHOP_PATH, PS_WS_AUTH_KEY, DEBUG);
            $opt = array( 'resource' => 'products',                       
                'display'  => '[id_default_image]'                
            );                       
            $xml = $webService->get($opt);
                      
        } catch (PrestaShopWebserviceException $e) {
            echo 'Error:' . $e->getMessage();
        }

Here is the error:

<error>
<code><![CDATA[5]]></code> <message><![CDATA[[PHP Notice #8] Trying to access array offset on value of type bool  (/home/shop/classes/Product.php, line 6203)]]></message>
</error>

 

Any advice ?

Thanks

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