4use Bitrix\Main\Localization\Loc;
8use Bitrix\Sale\Reservation\Configuration\ReservationSettings;
9use Bitrix\Sale\Reservation\Configuration\ReservationSettingsService;
10use Bitrix\Sale\Reservation\Configuration\ReserveCondition;
12Loc::loadMessages(__FILE__);
20 private static bool $enableAutomaticReservation;
35 $extendedMode = ($extendedMode ===
true);
39 ReserveCondition::ON_CREATE => Loc::getMessage(
'SALE_CONFIGURATION_RESERVE_ON_CREATE'),
40 ReserveCondition::ON_FULL_PAY => Loc::getMessage(
'SALE_CONFIGURATION_RESERVE_ON_FULL_PAY'),
41 ReserveCondition::ON_PAY => Loc::getMessage(
'SALE_CONFIGURATION_RESERVE_ON_PAY'),
42 ReserveCondition::ON_ALLOW_DELIVERY => Loc::getMessage(
'SALE_CONFIGURATION_RESERVE_ON_ALLOW_DELIVERY'),
43 ReserveCondition::ON_SHIP => Loc::getMessage(
'SALE_CONFIGURATION_RESERVE_ON_SHIP')
47 ReserveCondition::ON_CREATE,
48 ReserveCondition::ON_FULL_PAY,
49 ReserveCondition::ON_PAY,
50 ReserveCondition::ON_ALLOW_DELIVERY,
51 ReserveCondition::ON_SHIP
80 return self::getReservationSettings()->getReserveCondition();
88 if (!isset(self::$enableAutomaticReservation))
90 self::$enableAutomaticReservation = self::getReservationSettings()->isEnableAutomaticReservation();
92 return self::$enableAutomaticReservation;
97 self::$enableAutomaticReservation =
true;
102 self::$enableAutomaticReservation =
false;
113 return self::getReservationSettings()->getClearPeriod();
123 $condition = static::getProductReservationCondition();
124 return in_array($condition,
array(ReserveCondition::ON_SHIP, ReserveCondition::ON_ALLOW_DELIVERY));
135 if (Loader::includeModule(
'bitrix24'))
137 $lang = \CBitrix24::getLicensePrefix();
139 elseif (Loader::includeModule(
'intranet'))
141 $lang = \CIntranetUtils::getPortalZone();
144 return in_array(
$lang, [
'ru',
'ua',
'by',
'kz'],
true);
155 if (Loader::includeModule(
'bitrix24'))
157 $lang = \CBitrix24::getLicensePrefix();
159 elseif (Loader::includeModule(
'intranet'))
161 $lang = \CIntranetUtils::getPortalZone();
164 return in_array(
$lang, [
'ru',
'ua',
'by',
'kz'],
true);
175 if (Loader::includeModule(
'bitrix24'))
177 $lang = \CBitrix24::getLicensePrefix();
179 elseif (Loader::includeModule(
'intranet'))
181 $lang = \CIntranetUtils::getPortalZone();
184 return in_array(
$lang, [
'ru',
'ua',
'by',
'kz'],
true);
206 $condition = static::getAllowDeliveryOnPayCondition();
207 return in_array($condition,
array(static::ALLOW_DELIVERY_ON_PAY, ReserveCondition::ON_ALLOW_DELIVERY));
229 self::ALLOW_DELIVERY_ON_PAY => Loc::getMessage(
'SALE_CONFIGURATION_ON_PAY'),
230 self::ALLOW_DELIVERY_ON_FULL_PAY => Loc::getMessage(
'SALE_CONFIGURATION_ON_FULL_PAY'),
234 self::ALLOW_DELIVERY_ON_PAY,
235 self::ALLOW_DELIVERY_ON_FULL_PAY,
262 if (!Loader::includeModule(
'catalog'))
275 !Loader::includeModule(
'catalog')
276 || !self::useStoreControl()
static isUsedInventoryManagement()
static getDefaultStoreId()
static get($moduleId, $name, $default="", $siteId=false)
static isAvailableOrdersImportFromB24()
static disableAutomaticReservation()
const ALLOW_DELIVERY_ON_FULL_PAY
static getDefaultStoreId()
const ALLOW_DELIVERY_ON_PAY
static getProductReserveClearPeriod()
static isEnableAutomaticReservation()
static isCanUsePersonalization()
static getAllowDeliveryOnPayCondition()
static isAllowedSeparatelyDiscountCalculation()
static getStatusPaidCondition()
static enableAutomaticReservation()
static getReservationConditionList($extendedMode=false)
static getAllowDeliveryAfterPaidConditionList($extendedMode=false)
static isEnabledReservation()
static getStatusAllowDeliveryCondition()
static needShipOnAllowDelivery()
static needAllowDeliveryOnPay()
static getProductReservationCondition()
static isReservationDependsOnShipment()
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
if(!defined('SITE_ID')) $lang
if( $daysToExpire >=0 &&$daysToExpire< 60 elseif)( $daysToExpire< 0)