AttributeValueAdd command

This command adds a new attribute value to an existing catalog entry. This command is called by the Product Management tools in the WebSphere Commerce Accelerator.

Command structure

http://host_name/path/
The fully qualified name of your WebSphere Commerce Server and the configuration path.

Diagram of the command structure: the command starts with the fully qualified name of your WebSphere Commerce Server and the configuration path, followed by the command name, AttributeValueAdd  and the ? character. End the command with a list of parameters in the form of name value pairs. Separate each name value pair with the & character. For a detailed description of the parameters and their values, refer to the list entitled Parameter values.

Parameter values

attributeId
(Required) The reference number of the attribute.
name
(Required) The name of the attribute value. If you do not specify the name, then the value of the attribute value will be used as the name.
catentryId
The reference number of the catalog entry. If the catalog entry ID is not supplied, then the attribute value will be assigned to catentryId = 0, meaning that it is a product attribute value.
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.
descLangId
The description of the language's reference number. If you do not specify the language reference ID, the language ID from the WebSphere Commerce Accelerator log on is used.
value
(Required) The value of the attribute value.
URL
The redirect URL.

Example 1

The following example adds an attribute value, with value 1 as the type and testattribute as the name, to the catalog entry 10001 and attribute 10001:

http://host_name/webapp/wcs/stores/servlet/AttributeValueAdd?
catentryId=10001&attributeId=10001&descLangId=-1&field1
=0&field2=field2&field3=field3&image1=image1.gif&
image2=image2.gif&name=testattribute value&value=1&URL=
LogonForm

Example 2

The following example adds attribute value 12345 to product attribute 10002:

http://host_name/webapp/wcs/stores/servlet/AttributeValueAdd?
attributeId=10002&value=12345&sequence=0&field1=1&
field2=field2&field3=field3&image1=image1.gif&image2=
image2.gif&URL=LogonForm

Example 3

The following example adds a product attribute, with testattribute as the name, to attribute 10004. The assigned float value is 2.2, the integer value is 1, and the string value is string. Depending on the type of attribute (string, float, or integer), the corresponding value will be used as the value for the attribute value:

http://host_name/webapp/wcs/stores/servlet/AttributeValueAdd?
attributeId=10004&sequence=0&field1=0&field2=field2&
field3=field3&floatValue=2.2&image1=image1.gif&image2=
image2.gif&integerValue=1&name=test attribute&stringValue=
string&URL=LogonForm

Behavior

Exception conditions

The attribute value type should be different than the attribute type.

Note: Before creating an attribute value for an item attribute, you must first create the product attribute value. For example, if the attribute is "Color", create the values, such as "Red", "Blue", and "Yellow" for the product attribute value first.