public static function OnSaleOrderBeforeSavedHandler(\Bitrix\Main\Event $event)
{
$order = $event->getParameter('ENTITY');
$basket = $order->getBasket();
$basket_items = $basket->getBasketItems();
foreach ($basket_items as $Item) {
$rsItem = CIblockElement::GetList(
[],
array("ID" => $Item->getField('PRODUCT_ID'), "!PROPERTY_SPECIALOFFER" => false),
false,
false,
array("ID", "PROPERTY_SPECIALOFFER")
);
if($itemSale = $rsItem->Fetch() && strpos($Item->getField('NAME'),"(SALE)") === false){
$Item->setFields(array(
'NAME' => "(SALE)".$Item->getField('NAME')
));
}
$basket->save();
}
}