Add product property variant
Adds a variant for an existing property
Function AddProductPropertyVariant(Val Value, Val Property, Val Parameters = "") Export
Parameter | CLI option | Type | Required | Description |
---|---|---|---|---|
Value | --value | String | ✔ | Property value |
Property | --prop | String, Number | ✔ | Property ID where the variant is added |
Parameters | --auth | Structure Of String | ✖ | Authorization JSON or path to .json |
Returns: Map Of KeyAndValue - serialized JSON response from VK
1C:Enterprise/OneScript code example
Parameters = GetVKParameters();
Property = "1047";
OptionArray = New Array;
OptionArray.Add("Yellow");
OptionArray.Add("Blue");
OptionArray.Add("Red");
For Each Value In OptionArray Do
Result = OPI_VK.AddProductPropertyVariant(Value, Property, Parameters);
FunctionParameters.Insert(ParameterName, VariantID);
EndDo;
- Bash
- CMD/Bat
# JSON data can also be passed as a path to a .json file
oint vk AddProductPropertyVariant \
--value "Red" \
--prop "1053" \
--auth "{'access_token':'***','owner_id':'-218861756','app_id':'51694790','group_id':'218861756'}"
:: JSON data can also be passed as a path to a .json file
oint vk AddProductPropertyVariant ^
--value "Red" ^
--prop "1053" ^
--auth "{'access_token':'***','owner_id':'-218861756','app_id':'51694790','group_id':'218861756'}"
Result
{
"response": {
"variant_id": 2563
}
}