Jump to content

Unable to update quantity of product through Prestashop API


gauri13

Recommended Posts

Hello,

 

We are trying to update the quantity of product.

We have enabled the advanced inventory managment to track the inventory.

Now trying to update quantity of product through API.

 

E.G :- $zohoProductID1=16

 

 $opt = array('resource' => 'products',
                                  'display' => 'full',
                                
                                    'filter[id]' =>$zohoProductID1
                                
                                );
            
            $xml = $webService->get($opt);
            $Product= json_decode(json_encode($xml->products),true);
            //echo '<pre>';print_r($Product);exit;
         

// Here we get stock id for the particular product.//

 

 

$stockID = $Product['product']['associations']['stock_availables']['stock_available']['id'];
  
           $opt2 = array('resource' => 'stock_availables');
                $opt2['id'] = $stockID;
            $xml = $webService->get($opt2);
            

$Products= json_decode(json_encode($xml->stock_available),true);
        
           
                    $id=$Products['id'];
                      $opt1 = array('resource' => stock_availables'');
                      $opt1['putXml'] = $xml->asXML();
                    $xml1 = $webService->edit($opt1);

 

But we are unable to update the quantity as we are getting the error that class name is not found in var/www/html/prestashop/ webservice/WebserviceRequest.php

 

How to resolve this issue?

Please let us know asap

 

Link to comment
Share on other sites

  • 2 years later...
  • 4 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...