1

I add some custom attributes to our products, like "product_processing_status". Now we have a order with some products.

I read the products from the order with the SOAP V2 API. How i can retrieve the custom attribute "product_processing_status" with SOAP V2 and update them with a new value in the order?

1

you need to have a Std class and add to it.

I don't know if I got your mean right or wrong, but if you want the order id and then get product id from it, you can do it and then you can change the product attribute from it as below, hope I get what you meant, i assummed your order number is 100000073, you can change it:

$client = new SoapClient('http://localhost/magentodev/api/v2_soap?wsdl');
$username = 'user';
$apikey = 'pass';
$session = $client->login($username, $apikey);
$result = $client->salesOrderInfo($session, '100000073');
$productid = $result->items[0]->product_id;
$pro_status = new stdClass();
$pro_status->additional_attributes = array('product_processing_status');
$catpro = $client->catalogProductInfo($session, $productid, null, $pro_status);
var_dump($catpro);
| improve this answer | |
  • With your class you change product attributes in the catalog_product_entity table. We need to change the products from the order in the sales_flat_order_item table. Do you have any idea? – Tommy Oct 20 '15 at 5:04
  • can you show me your code please as of now? – Nickool Oct 20 '15 at 17:31
  • I updated my answer, I don't know if you mean that or not. – Nickool Oct 20 '15 at 21:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.