carbonhoarder Posted June 8, 2016 Share Posted June 8, 2016 I'm loading each product with its own image in my catalogue using the web api. What key should I use in the POST array to load a description of the image? $ch = curl_init(); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:multipart/form-data','Expect:')); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, true); //curl_setopt($ch, CURLOPT_PUT, true); // Un-commet to edit an image curl_setopt($ch, CURLOPT_USERPWD, $key.':'); curl_setopt($ch, CURLOPT_POSTFIELDS, array('image' => new \CurlFile($image_path))); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $result = curl_exec($ch); $info = curl_getinfo($ch); curl_close($ch); Does anyone know? Thanks in advance! Link to comment Share on other sites More sharing options...
carbonhoarder Posted June 18, 2016 Author Share Posted June 18, 2016 Does anybody know? There's nothing in the documentation. Link to comment Share on other sites More sharing options...
varadipeter Posted September 5, 2020 Share Posted September 5, 2020 Not via API but if you're using the product name as image legend you could use this MySQL query: UPDATE ps_image_lang AS t1 INNER JOIN ps_image AS t2 ON t1.id_image = t2.id_image INNER JOIN ps_product_lang AS t3 ON t2.id_product = t3.id_product SET t1.legend = t3.name; 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