2namespace Bitrix\Sale\Helpers;
4use Bitrix\Main\Config\Option,
6 Bitrix\Main\Application,
21 $guestStatuses = Option::get(
"sale",
"allow_guest_order_view_status",
"");
37 $context = Application::getInstance()->getContext();
38 $scheme =
$context->getRequest()->isHttps() ?
'https' :
'http';
39 $siteData = SiteTable::getList(
array(
42 $site = $siteData->fetch();
44 $paths = unserialize(Option::get(
"sale",
"allow_guest_order_view_paths"), [
'allowed_classes' =>
false]);
47 if (isset(
$path) && mb_strpos(
$path,
'#order_id#'))
49 $accountNumber = urlencode(urlencode(
$order->getField(
'ACCOUNT_NUMBER')));
50 $path = str_replace(
'#order_id#', $accountNumber,
$path);
51 if (mb_strpos(
$path,
'/') !== 0)
57 $path .=
"access=".$order->getHash();
64 return $scheme.
'://'.
$site[
'SERVER_NAME'].$path;
static getPublicLink(Sale\Order $order)
static isAllowGuestView(Sale\Order $order)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
htmlspecialcharsbx($string, $flags=ENT_COMPAT, $doubleEncode=true)