int
CSaleDiscount::Update(
int ID,
array arFields
);
The method Update updates parameters of the discount.
Parameters
Parameter | Description |
ID |
The discount ID. |
arFields |
Associated array whose keys are the names of the discount parameters to
be updated, and values are the new parameter values. You can specify keys
that require update only; other parameters remain will untouched.
The
following keys are possible:
- LID - the ID of the site to which this discount is bound;
- PRICE_FROM - minimum total order price to which this discount is applicable;
- PRICE_TO - maximum total order price to which this discount is
applicable;
- CURRENCY - currency in which all money values are specified in this record;
- DISCOUNT_VALUE - discount value;
- DISCOUNT_TYPE - type of the discount value (P - percentage, V - absolute
value);
- ACTIVE - flag indicating the discount is active (Y/N);
- SORT - sort weight. If more than one discount can be applied to an order
price, the discount with the less SORT is taken first.
|
Return Values
Returns the ID of the updated discount or false otherwise.