Documentation

GetByID

Description and parameters

mixed
CCatalogDiscountCoupon::GetByID (
int $ID
);

Method returns information about the coupon with specified ID. Non-static method.

Call parameters

Parameter Description
ID Coupon code (ID).

Returned value

Method returns array with coupon parameters or false, if coupon with such ID is not found.

See Also

Examples

Coupon selection

$ID = 40;
$arCoupon = CCatalogDiscountCoupon::GetByID($ID);
if (empty($arCoupon))
{
	ShowError('Coupon is not found');
}
else
{
	echo 'Coupon code: '.$arCoupon['COUPON'];
}

© «Bitrix24», 2001-2024
Up