<<

NAME

ProductOpener::APIProductWrite - implementation of WRITE API for creating and updating products

DESCRIPTION

skip_protected_field($product_ref, $field, $moderator = 0)

Return 1 if we should ignore a field value sent by a user because we already have a value sent by the producer.

update_field_with_0_or_1_value($request_ref, $product_ref, $field, $value)

Update a field that takes only 0 or 1 as a value (e.g. packagings_complete).

update_packagings($request_ref, $product_ref, $field, $add_to_existing_components, $value)

Update packagings.

update_tags_fields ($request_ref, $product_ref, $field, $add_to_existing_tags, $value)

Update packagings.

update_product_fields ($request_ref, $product_ref, $response_ref)

Update product fields based on input product data.

write_product_api($request_ref)

Process API v3 WRITE product requests.

TODO: v0 / v1 / v2 WRITE product requests are still handled by cgi/product_jqm_multilingual.pl which contains similar code. Internally, we should be able to upgrade those requests to v3, and then customize the response to make it return the v2 expected response.

<<