- Модуль: sale
- Путь к файлу: ~/bitrix/modules/sale/lib/controller/property.php
- Класс: BitrixSaleControllerProperty
- Вызов: Property::getRelationSettings
protected function getRelationSettings()
{
$paymentOptions = array();
$result = CSalePaySystem::GetList(
array("SORT"=>"ASC", "NAME"=>"ASC"),
array("ACTIVE" => "Y"),
false,
false,
array("ID", "NAME", "ACTIVE", "SORT", "LID")
);
while ($row = $result->Fetch())
$paymentOptions[$row['ID']] = $row['NAME'] . ($row['LID'] ? " ({$row['LID']}) " : ' ') . "[{$row['ID']}]";
// delivery system options
$deliveryOptions = array();
foreach(BitrixSaleDeliveryServicesManager::getActiveList(true) as $deliveryId => $deliveryFields)
{
$name = $deliveryFields["NAME"]." [".$deliveryId."]";
$sites = BitrixSaleDeliveryRestrictionsManager::getSitesByServiceId($deliveryId);
if(!empty($sites))
$name .= " (".implode(", ", $sites).")";
$deliveryOptions[$deliveryId] = $name;
}
return [
'P' => ['TYPE' => 'ENUM', 'LABEL' => Loc::getMessage('SALE_PROPERTY_PAYSYSTEM'), 'OPTIONS' => $paymentOptions , 'MULTIPLE' => 'Y', 'SIZE' => '5'],
'D' => ['TYPE' => 'ENUM', 'LABEL' => Loc::getMessage('SALE_PROPERTY_DELIVERY' ), 'OPTIONS' => $deliveryOptions, 'MULTIPLE' => 'Y', 'SIZE' => '5'],
];
}