alanfalcoski Posted September 11, 2017 Share Posted September 11, 2017 (edited) How can I update the products prices? I'm using the webservice to send information to Prestashop from the ERP, I can add a new product, but can't update the price.. There's another way to do it? My code: if( ERP information)....{ global $webService; $opt = array('resource' => 'products'); $opt['id'] = $rowRemota['id_product']; $xml = $webService->get($opt); $resources = $xml -> children() -> children(); unset($xml->children()->children()->manufacturer_name); unset($xml->children()->children()->position_in_category); unset($xml->children()->children()->quantity); unset($xml->children()->children()->type); $resources->name->language=$row['description']; $resources->price = $row['price']; $opt = array('resource' => 'products'); $opt['id'] = $rowRemota['id_product']; $opt['putXml'] = $xml->asXML(); $xml = $webService->edit($opt); } else{ echo "Insert->".$row['description']."</BR>"; ... "else" works fine, mas "if" not. Edited September 12, 2017 by alanfalcoski (see edit history) Link to comment Share on other sites More sharing options...
selectshop.at Posted September 12, 2017 Share Posted September 12, 2017 Prestashop Version in use is ? Link to comment Share on other sites More sharing options...
luprix Posted September 30, 2017 Share Posted September 30, 2017 Hello 1.7.2.2 same problem fix: https://github.com/PrestaShop/PrestaShop/pull/8275/files regards Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now