Jump to content

Modificar precio de un producto dado su id vía webservice


dcervantesr

Recommended Posts

Hola, quisiera me ayudaran a ver como es posible modificar el precio de un producto partiendo de su id  utilizando los webservice de prestashop. Les pongo mi código de ejemplo, que por alguna razón no me funciona.

$webService = new PrestaShopWebservice(PS_SHOP_PATH, PS_WS_AUTH_KEY, DEBUG);
$opt['resource'] = 'products';
$opt['id'] = 4;
$xml = $webService->get($opt);
$xml->product->children()->price = 10;
$opt['putXml'] = $xml->asXML();
$xml = $webService->edit($opt);

 

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