- Модуль: rest
- Путь к файлу: ~/bitrix/modules/rest/lib/marketplace/notification.php
- Класс: BitrixRestMarketplaceNotification
- Вызов: Notification::get
static function get()
{
$result = false;
$option = Option::get(static::MODULE_ID, static::OPTION_ACCESS_NOTIFICATION, '');
if (static::$codeToNotification[$option])
{
$option = static::$codeToNotification[$option];
}
if ($option !== '')
{
$url = Option::get(static::MODULE_ID, static::OPTION_NOTIFICATION_URL, '');
if ($url === '')
{
$url = Loc::getMessage('REST_MARKETPLACE_NOTIFICATION_' . $option . '_URL');
if ($option === 'REST_BUY' && Loader::includeModule('bitrix24'))
{
$prefix = CBitrix24::getLicensePrefix();
if ($prefix === 'by')
{
$url = 'https://goodbye-2020.bitrix24.site/';
}
elseif ($prefix === 'kz')
{
$url = 'https://goodbye2020.bitrix24.site/';
}
elseif ($prefix === 'ua')
{
$url = 'https://skilky-mozhna.bitrix24site.ua/';
}
elseif ($prefix === 'ru')
{
$url = 'https://goodbye2020.bitrix24.tech/';
}
elseif ($prefix === 'en')
{
$url = 'https://www.bitrix24.com/promo/sales/holiday-sale/';
}
elseif ($prefix === 'jp')
{
$url = 'https://www.bitrix24.jp/promo/sales/holiday-sale/';
}
elseif ($prefix === 'pl')
{
$url = 'https://www.bitrix24.pl/promo/sales/holiday-sale/';
}
elseif ($prefix === 'it')
{
$url = 'https://www.bitrix24.it/promo/sales/holiday-sale/';
}
elseif ($prefix === 'br')
{
$url = 'https://www.bitrix24.com.br/promo/sales/holiday-sale/';
}
elseif ($prefix === 'fr')
{
$url = 'https://www.bitrix24.fr/promo/sales/holiday-sale/';
}
elseif ($prefix === 'de')
{
$url = 'https://www.bitrix24.de/promo/sales/holiday-sale/';
}
elseif ($prefix === 'in')
{
$url = 'https://www.bitrix24.in/promo/sales/holiday-sale/';
}
elseif ($prefix === 'eu')
{
$url = 'https://www.bitrix24.eu/promo/sales/holiday-sale/';
}
elseif ($prefix === 'es' || $prefix === 'la')
{
$url = 'https://www.bitrix24.es/promo/sales/holiday-sale/';
}
}
if ($option === 'SUBSCRIPTION_MARKET_TRIAL_END')
{
$url = BitrixRestMarketplaceUrl::getSubscriptionBuyUrl();
}
}
$urlBtn = '';
if ($url !== '')
{
$urlBtn = ''
. Loc::getMessage('REST_MARKETPLACE_NOTIFICATION_' . $option . '_BTN')
. '';
}
$message = Loc::getMessage(
'REST_MARKETPLACE_NOTIFICATION_' . $option . '_MESS',
[
'#BTN#' => $urlBtn
]
);
if ($message !== '')
{
$result = [
'PANEL_MESSAGE' => $message
];
}
else
{
static::reset();
}
}
return $result;
}