2024-06-05 10:19:46 +00:00
|
|
|
---
|
|
|
|
sidebar_position: 6
|
|
|
|
---
|
|
|
|
|
|
|
|
# Edit product property variant
|
|
|
|
Edits the value of an existing product property variant
|
|
|
|
|
|
|
|
|
2024-07-10 11:59:55 +03:00
|
|
|
|
2024-07-10 13:58:29 +03:00
|
|
|
`Function EditProductPropertyVariant(Val Value, Val Property, Val Option, Val Parameters = "") Export`
|
2024-06-05 10:19:46 +00:00
|
|
|
|
2024-08-13 15:52:26 +03:00
|
|
|
| Parameter | CLI option | Type | Description |
|
|
|
|
|-|-|-|-|
|
|
|
|
| Value | --value | String | New property value |
|
|
|
|
| Property | --prop | String, Number | Property ID |
|
|
|
|
| Option | --option | String, Number | Variant ID |
|
|
|
|
| Parameters | --auth | Structure Of String | Authorization JSON or path to .json |
|
2024-06-05 10:19:46 +00:00
|
|
|
|
2024-08-13 15:52:26 +03:00
|
|
|
|
|
|
|
Returns: Map Of KeyAndValue - Serialized JSON response from VK
|
2024-06-05 10:19:46 +00:00
|
|
|
|
2024-07-10 14:05:58 +03:00
|
|
|
<br/>
|
2024-07-10 11:59:55 +03:00
|
|
|
|
2024-07-10 13:58:29 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
2024-06-05 10:19:46 +00:00
|
|
|
```bsl title="Code example"
|
2024-08-13 15:52:26 +03:00
|
|
|
Parameters = GetVKParameters();
|
|
|
|
|
|
|
|
Property = FunctionParameters["VK_PropID"];
|
|
|
|
Option = FunctionParameters["VK_PropVarID1"];
|
|
|
|
Value = "New variant name";
|
|
|
|
|
|
|
|
Result = OPI_VK.EditProductPropertyVariant(Value
|
|
|
|
, Property
|
|
|
|
, Option
|
|
|
|
, Parameters);
|
2024-06-05 10:19:46 +00:00
|
|
|
```
|
2024-08-13 15:52:26 +03:00
|
|
|
|
2024-07-10 11:59:55 +03:00
|
|
|
|
2024-06-05 10:19:46 +00:00
|
|
|
|
|
|
|
```sh title="CLI command example"
|
2024-08-13 15:52:26 +03:00
|
|
|
|
|
|
|
oint vk EditProductPropertyVariant --value %value% --prop "648" --option "2054" --auth "GetVKParameters()"
|
2024-06-05 10:19:46 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
```json title="Result"
|
2024-07-10 14:11:17 +03:00
|
|
|
{
|
2024-08-13 15:52:26 +03:00
|
|
|
"response": 1
|
|
|
|
}
|
2024-06-05 10:19:46 +00:00
|
|
|
```
|