Reference > Shop flow URLs > Catalog subsystem URLs > Attributes
AttributeValueUpdate URL
This URL updates an existing attribute value.
Restriction: This URL must only be used for defining attributes. Descriptive attributes are not supported.
URL structure
- http:// host_name/path/
- The fully qualified name of the WebSphere Commerce Server and the configuration path.
name-value pair with the & character. For a detailed description of the parameters and their values, see the list entitled Parameter values." />
Parameter values
- attrivalueId
- Required: The reference number of the attribute value. You must specify either attrivalueId, or attributeId combined with catentryId and name.
- attributeId
- Required: The reference number of the attribute. The attribute ID cannot be changed and is only used as a reference. If attribute value ID is not supplied, then attribute value ID and catalog entry ID must be supplied or exception will be thrown. You must specify either attributeId combined with catentryId and name, or attrivalueId.
- catentryId
- Required: The reference number of the catalog entry. If the catalog entry ID is the item ID (or 0), then the attribute value for that item will be updated (for all languages). The product attribute value will be modified, with all associated items attribute values. You must specify either catentryId combined with attributeId and name, or attrivalueId.
- name
- Required: The name of the attribute value. You must specify either name combined with catentryId and attributeId, or attrivalueId.
- field1
- A customizable field.
- field2
- A customizable field.
- field3
- A customizable field.
- image1
- An image path for this attribute value.
- image2
- An image path for this attribute value.
- seq
- The sequence determining the display order of the attribute value for a given attribute. A change in sequence in the product attribute value will not be reflected in the item attribute values.
- value
- The value of the attribute value.
- descLangId
- The description of the language's reference number.
- URL
- The URL to be called when the command completes successfully.
Example 1
The following example updates attribute value 10001, with INTEGER as the type, in the logon language for catalog entry 10001, with attribute value name changed to test float attribute value, and the attribute value changed to 2:
http://host_name/webapp/wcs/stores/servlet/AttributeValueUpdate? attrvalueId=10001&catentryId=10001&attrtypeId=INTEGER& field1=1&field2=afield2&field3=afield3&value=2& image1=aimage1.gif&image2=aimage2.gif&name=test float attribute value&URL=LogonForm
Example 2
The following example updates attribute value 10067, with FLOAT as the type, in the logon language to catalog entry 10067, with attribute value name changed to test attribute 1 and the attribute value changed to 1.1:
http://host_name/webapp/wcs/stores/servlet/AttributeValueUpdate? attrvalueId=10067&catentryId=10007&attrtypeId=FLOAT& field1=1&field2=afield2&field3=afield3&value=1.1& image1=aimage1.gif&image2=aimage2.gif&name=test attribute 1 &URL=LogonForm
Behavior
- Update the attribute value in one language will update all languages. For example, changing an item's attribute value from "red" to "blue" in English will also change the attribute value of the same item in French.
- If the catalog entry ID is not supplied, then the attribute value will be assigned to catentryId = 0.
- If description language ID is not supplied, then the logon language ID will be used.
- Update a parent product attribute value. All the item attribute value will be updated. The item attribute values will have the same attribute ID, language ID, and attribute value (depending on the attribute value type, it can be string value or float value or integer value) as the parent product attribute value.
- If you update the parent item attribute value:
- If the parent item attribute value does not exist, it will be created.
- If the parent item attribute value exists, and the unique index is being updated:
- The command recreates the attribute value using the new key (attribute value ID) and create the rest of the attribute value in the other supported languages. Then delete the old attribute value for all languages.
- If the parent item attribute value exists, and the unique index is not being updated:
- The command updates the item attribute value.
- If you update the child product attribute value:
- If the child product attribute value does not exist, it will be created.
- If the child product attribute value exists, then the command will update it. All the changes will be reflected in the child item attribute value.
- If you update a child item attribute value:
- If the child item attribute value does not exist, it will be created.
- If the child item attribute value exists:
- If the parent item attribute value does not exist, it will be created.
Exception conditions
An error with the attribute value, such as assigning a non-existing attribute value to an item.
Related concepts
Related reference