PrestaShop 1.6: error_name_name
I am using PrestaShop 1.6.13. I am using the product web service with id 10 ( http: // myserver / api / products / 10 ). When I update the attribute width, the error message appears:
Can you help me?
+3
source to share
1 answer
I download PSWebServiceLibrary.php file (URL: https://github.com/PrestaShop/PrestaShop-webservice-lib/blob/master/PSWebServiceLibrary.php ). After that I create a PHp file named product.php and paste this code:
define('DEBUG', true);
ini_set('display_errors','on');
define('PS_SHOP_PATH', 'http://myserver/');
define('PS_WS_AUTH_KEY', 'key');
require_once('PSWebServiceLibrary.php');
$webService = new PrestaShopWebservice(PS_SHOP_PATH, PS_WS_AUTH_KEY, DEBUG);
$xml = $webService->get(array('url' => PS_SHOP_PATH.'api/products?schema=synopsis'));
$opt = array('resource' => 'products');
$opt['id'] = 8;
$xml = $webService->get($opt);
$resources = $xml->children()->children();
$resources->quantity = 100;
$opt['putXml'] = $xml->asXML();
$xml = $webService->edit($opt);
+1
source to share