本文整理汇总了PHP中CSaleOrderProps::add方法的典型用法代码示例。如果您正苦于以下问题:PHP CSaleOrderProps::add方法的具体用法?PHP CSaleOrderProps::add怎么用?PHP CSaleOrderProps::add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CSaleOrderProps
的用法示例。
在下文中一共展示了CSaleOrderProps::add方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: DoInstall
public function DoInstall()
{
if ($GLOBALS['APPLICATION']->GetGroupRight('main') < 'W') {
return;
}
if (is_array($this->NEED_MODULES) && !empty($this->NEED_MODULES)) {
foreach ($this->NEED_MODULES as $module) {
if (!IsModuleInstalled($module)) {
$this->ShowForm('ERROR', $this->GetMessage('DDELIVERY_NEED_MODULES', array('#MODULE#' => $module, '#NEED#' => $this->NEED_MODULES)));
return;
}
include $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/' . $module . '/install/version.php';
if (!CheckVersion($arModuleVersion['VERSION'], $this->NEED_MAIN_VERSION)) {
$this->ShowForm('ERROR', $this->GetMessage('DDELIVERY_NEED_MODULES', array('#MODULE#' => $module, '#NEED#' => $this->NEED_MAIN_VERSION)));
return;
}
}
}
if (!function_exists('curl_init')) {
$this->ShowForm('ERROR', $this->GetMessage('DDELIVERY_NEED_MODULES_CURL', array('#MODULE#' => 'cURL')));
return;
}
if (CheckVersion(SM_VERSION, $this->NEED_MAIN_VERSION)) {
RegisterModuleDependences('sale', 'onSaleDeliveryHandlersBuildList', self::MODULE_ID, 'DDeliveryEvents', 'Init');
RegisterModuleDependences('sale', 'OnOrderNewSendEmail', self::MODULE_ID, 'DDeliveryEvents', 'OnOrderNewSendEmail');
RegisterModuleDependences('sale', 'OnSaleBeforeStatusOrder', self::MODULE_ID, 'DDeliveryEvents', 'OnSaleBeforeStatusOrder');
if (!symlink(__DIR__ . "/components/ddelivery", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/components/ddelivery")) {
CopyDirFiles(__DIR__ . "/components", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/components", true, true);
}
RegisterModule(self::MODULE_ID);
CModule::IncludeModule("sale");
$ddeliveryConfig = CSaleDeliveryHandler::GetBySID('ddelivery')->Fetch();
$ddeliveryConfig['ACTIVE'] = 'N';
CSaleDeliveryHandler::Set('ddelivery', $ddeliveryConfig, false);
include_once __DIR__ . '/../include.php';
include_once __DIR__ . '/../DDeliveryEvents.php';
include_once __DIR__ . '/../DDeliveryShop.php';
// Добавляем свойства в бд
CSaleOrderProps::add(array('PERSON_TYPE_ID' => '1', 'NAME' => 'DDelivery LocalID', 'TYPE' => 'TEXT', 'REQUIED' => 'N', 'DEFAULT_VALUE' => '', 'SORT' => '10000', 'USER_PROPS' => 'N', 'IS_LOCATION' => 'N', 'PROPS_GROUP_ID' => '2', 'IS_EMAIL' => 'N', 'IS_PROFILE_NAME' => 'N', 'IS_PAYER' => 'N', 'IS_LOCATION4TAX' => 'N', 'IS_ZIP' => 'N', 'CODE' => 'DDELIVERY_ID', 'IS_FILTERED' => 'Y', 'ACTIVE' => 'Y', 'UTIL' => 'Y', 'INPUT_FIELD_LOCATION' => '0', 'MULTIPLE' => 'N'));
$IntegratorShop = new DDeliveryShop($ddeliveryConfig['CONFIG']['CONFIG'], array(), array());
$ddeliveryUI = new DDeliveryUI($IntegratorShop, true);
$ddeliveryUI->createTables();
$this->ShowForm('OK', GetMessage('MOD_INST_OK'), true);
} else {
$this->ShowForm('ERROR', $this->GetMessage('DDELIVERY_NEED_RIGHT_VER', array('#NEED#' => $this->NEED_MAIN_VERSION)));
}
}