• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/discount/preset/basepreset.php
  • Класс: BitrixSaleDiscountPresetBasePreset
  • Вызов: BasePreset::processShowCommonSettingsInternal
protected function processShowCommonSettingsInternal(State $state)
{
	$groupList = $this->getAllowableUserGroups();

	switch(LANGUAGE_ID)
	{
		case 'en':
		case 'ru':
		case 'de':
			$hintLastDiscountImageName = 'hint_last_discount_' . LANGUAGE_ID .  '.png';
			break;
		default:
			$hintLastDiscountImageName = 'hint_last_discount_' . MainLocalizationLoc::getDefaultLang(LANGUAGE_ID) .  '.png';
			break;
	}

	$periodValue = '';
	if ($state->get('discount_active_from') || $state->get('discount_active_to'))
	{
		$periodValue = CAdminCalendar::PERIOD_INTERVAL;
	}

	return '
		
' . Loc::getMessage('SALE_BASE_PRESET_ORDERAMOUNT_USER_GROUPS') . ': ' . HtmlHelper::generateMultipleSelect('discount_groups[]', $groupList, $state->get('discount_groups', array()), array('size=8')) . '
' . Loc::getMessage('SALE_BASE_PRESET_ACTIVE_PERIOD') . ': ' . CAdminCalendar::CalendarPeriodCustom( 'discount_active_from', 'discount_active_to', $state->get('discount_active_from'), $state->get('discount_active_to'), true, 19, true, array( CAdminCalendar::PERIOD_EMPTY => Loc::getMessage('SALE_BASE_PRESET_CALENDAR_PERIOD_EMPTY'), CAdminCalendar::PERIOD_INTERVAL => Loc::getMessage('SALE_BASE_PRESET_CALENDAR_PERIOD_INTERVAL') ), $periodValue ) . '
' . Loc::getMessage('SALE_BASE_PRESET_ORDERAMOUNT_FIELD_PRIORITY') . ':
' . Loc::getMessage('SALE_BASE_PRESET_ORDERAMOUNT_FIELD_SORT') . ':
' . Loc::getMessage('SALE_BASE_PRESET_LAST_LEVEL_DISCOUNT_LABEL') . ': get('discount_last_level_discount', 'N') == 'Y'? 'checked' : '') . '>
' . Loc::getMessage('SALE_BASE_PRESET_LAST_DISCOUNT_LABEL') . ': get('discount_last_discount', 'Y') == 'Y'? 'checked' : '') . '>
'; }