Documentation

CancelOrder

int
CSaleOrder::CancelOrder(
  int ID,
  string Val,
  string Descr = ""
);

The method CancelOrder modifies the value of the CANCELED field of the specified order. Besides, it sets the fields DATE_CANCELED (date when the order was canceled) and EMP_CANCELED_ID (the ID of a user (web shop member) who sets this flag). Order cancellation description also can be specified.

Parameters

ParameterDescription
ID The order ID.
Val New value of the order cancellation flag (Y/N).
Descr Text description of the order cancellation reason.

Returned values

Returns the order ID on success, or false otherwise.

Example


<?
CSaleOrder::CancelOrder(25, "Y", "Decided not to buy");
?>
© «Bitrix24», 2001-2024
Up