当前位置: 首页>>代码示例>>PHP>>正文


PHP CSalePaySystem::Add方法代码示例

本文整理汇总了PHP中CSalePaySystem::Add方法的典型用法代码示例。如果您正苦于以下问题:PHP CSalePaySystem::Add方法的具体用法?PHP CSalePaySystem::Add怎么用?PHP CSalePaySystem::Add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CSalePaySystem的用法示例。


在下文中一共展示了CSalePaySystem::Add方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: ensureQuotePaySystemsCreated

 public static function ensureQuotePaySystemsCreated()
 {
     if (!Loader::includeModule('sale')) {
         return;
     }
     $siteID = '';
     $languageID = '';
     $dbSites = \CSite::GetList($by = 'sort', $order = 'desc', array('DEFAULT' => 'Y', 'ACTIVE' => 'Y'));
     $defaultSite = is_object($dbSites) ? $dbSites->Fetch() : null;
     if (is_array($defaultSite)) {
         $siteID = $defaultSite['LID'];
         $languageID = $defaultSite['LANGUAGE_ID'];
     }
     if ($siteID === '') {
         $siteID = 's1';
     }
     if ($languageID === '') {
         $languageID = 'ru';
     }
     $paySysName = "quote_{$languageID}";
     $paySystems = array();
     $customPaySystemPath = \COption::GetOptionString('sale', 'path2user_ps_files', '');
     if ($customPaySystemPath === '') {
         $customPaySystemPath = BX_ROOT . '/php_interface/include/sale_payment/';
     }
     $personTypeIDs = \CCrmPaySystem::getPersonTypeIDs();
     if (isset($personTypeIDs['COMPANY'])) {
         $paySystems[] = array('NAME' => Loc::getMessage('CRM_PS_QUOTE_COMPANY', null, $languageID), 'SORT' => 200, 'DESCRIPTION' => '', 'CODE_TEMP' => $paySysName, 'ACTION' => array(array('PERSON_TYPE_ID' => $personTypeIDs['COMPANY'], 'NAME' => Loc::getMessage('CRM_PS_QUOTE_COMPANY', null, $languageID), 'ACTION_FILE' => "{$customPaySystemPath}{$paySysName}", 'RESULT_FILE' => '', 'NEW_WINDOW' => 'Y', 'PARAMS' => serialize(array('DATE_INSERT' => array('TYPE' => 'ORDER', 'VALUE' => 'DATE_BILL_DATE'), 'DATE_PAY_BEFORE' => array('TYPE' => 'ORDER', 'VALUE' => 'DATE_PAY_BEFORE'), 'BUYER_NAME' => array('TYPE' => 'PROPERTY', 'VALUE' => 'COMPANY'), 'BUYER_INN' => array('TYPE' => 'PROPERTY', 'VALUE' => 'INN'), 'BUYER_ADDRESS' => array('TYPE' => 'PROPERTY', 'VALUE' => 'COMPANY_ADR'), 'BUYER_PHONE' => array('TYPE' => 'PROPERTY', 'VALUE' => 'PHONE'), 'BUYER_FAX' => array('TYPE' => 'PROPERTY', 'VALUE' => 'FAX'), 'BUYER_PAYER_NAME' => array('TYPE' => 'PROPERTY', 'VALUE' => 'CONTACT_PERSON'), 'COMMENT1' => array('TYPE' => 'ORDER', 'VALUE' => 'USER_DESCRIPTION'))), 'HAVE_PAYMENT' => 'Y', 'HAVE_ACTION' => 'N', 'HAVE_RESULT' => 'N', 'HAVE_PREPAY' => 'N', 'HAVE_RESULT_RECEIVE' => 'N')));
     }
     if (isset($personTypeIDs['CONTACT'])) {
         $paySystems[] = array('NAME' => Loc::getMessage('CRM_PS_QUOTE_CONTACT', null, $languageID), 'SORT' => 300, 'DESCRIPTION' => '', 'CODE_TEMP' => $paySysName, 'ACTION' => array(array('PERSON_TYPE_ID' => $personTypeIDs['CONTACT'], 'NAME' => Loc::getMessage('CRM_PS_QUOTE_CONTACT', null, $languageID), 'ACTION_FILE' => "{$customPaySystemPath}{$paySysName}", 'RESULT_FILE' => '', 'NEW_WINDOW' => 'Y', 'PARAMS' => serialize(array('DATE_INSERT' => array('TYPE' => 'ORDER', 'VALUE' => 'DATE_BILL_DATE'), 'DATE_PAY_BEFORE' => array('TYPE' => 'ORDER', 'VALUE' => 'DATE_PAY_BEFORE'), 'BUYER_NAME' => array('TYPE' => 'PROPERTY', 'VALUE' => 'FIO'), 'BUYER_INN' => array('TYPE' => 'PROPERTY', 'VALUE' => 'INN'), 'BUYER_ADDRESS' => array('TYPE' => 'PROPERTY', 'VALUE' => 'ADDRESS'), 'BUYER_PHONE' => array('TYPE' => 'PROPERTY', 'VALUE' => 'PHONE'), 'BUYER_FAX' => array('TYPE' => '', 'VALUE' => ''), 'BUYER_PAYER_NAME' => array('TYPE' => 'PROPERTY', 'VALUE' => 'FIO'), 'COMMENT1' => array('TYPE' => 'ORDER', 'VALUE' => 'USER_DESCRIPTION'))), 'HAVE_PAYMENT' => 'Y', 'HAVE_ACTION' => 'N', 'HAVE_RESULT' => 'N', 'HAVE_PREPAY' => 'N', 'HAVE_RESULT_RECEIVE' => 'N')));
     }
     $currencyID = \CCrmCurrency::GetBaseCurrencyID();
     foreach ($paySystems as $paySystem) {
         $dbSalePaySystem = \CSalePaySystem::GetList(array(), array('LID' => $siteID, 'NAME' => $paySystem['NAME']), false, false, array('ID'));
         if (!$dbSalePaySystem->Fetch()) {
             $paySystemID = \CSalePaySystem::Add(array('NAME' => $paySystem['NAME'], 'DESCRIPTION' => $paySystem['DESCRIPTION'], 'SORT' => $paySystem['SORT'], 'LID' => $siteID, 'CURRENCY' => $currencyID, 'ACTIVE' => 'Y'));
             if ($paySystemID > 0) {
                 foreach ($paySystem['ACTION'] as &$action) {
                     $action['PAY_SYSTEM_ID'] = $paySystemID;
                     \CSalePaySystemAction::Add($action);
                 }
                 unset($action);
             }
         }
     }
     unset($paySystem);
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:48,代码来源:salemanager.php

示例2: GetMessage

     if (strlen($LID) > 0) {
         $arFields["LID"] = $LID;
     }
     if (strlen($CURRENCY) > 0) {
         $arFields["CURRENCY"] = $CURRENCY;
     }
     if ($ID > 0) {
         if (!CSalePaySystem::Update($ID, $arFields)) {
             if ($ex = $APPLICATION->GetException()) {
                 $errorMessage .= $ex->GetString() . ".<br>";
             } else {
                 $errorMessage .= GetMessage("ERROR_EDIT_PAY_SYS") . ".<br>";
             }
         }
     } else {
         $ID = CSalePaySystem::Add($arFields);
         if ($ID <= 0) {
             if ($ex = $APPLICATION->GetException()) {
                 $errorMessage .= $ex->GetString() . ".<br>";
             } else {
                 $errorMessage .= GetMessage("ERROR_ADD_PAY_SYS") . ".<br>";
             }
         }
     }
 }
 if (strlen($errorMessage) <= 0) {
     $arPersonTypes = array();
     $dbPersonType = CSalePersonType::GetList(array("SORT" => "ASC", "NAME" => "ASC"), array());
     while ($arPersonType = $dbPersonType->GetNext()) {
         $errorMessage1 = "";
         $arPersonTypes[] = IntVal($arPersonType["ID"]);
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:pay_system_edit.php

示例3: addPaysys

 protected function addPaysys()
 {
     return CSalePaySystem::Add(array("NAME" => Loc::getMessage("DEVTM_ERIP_PS_NAME"), "DESCRIPTION" => Loc::getMessage("DEVTM_ERIP_PS_DESC"), "ACTIVE" => "Y", "SORT" => 100));
 }
开发者ID:dimabresky,项目名称:bitrix-Erip-module,代码行数:4,代码来源:index.php

示例4:

						{
							$action["LOGOTIP"] = CFile::MakeFileArray($_SERVER["DOCUMENT_ROOT"].$action["ACTION_FILE"]."/logo.gif");
						}

						CSalePaySystemAction::Add($action);
					}
				}
			}
		}
		else
		{
			$id = CSalePaySystem::Add(
				Array(
					"LID" => WIZARD_SITE_ID,
					"CURRENCY" => $defCurrency,
					"NAME" => $val["NAME"],
					"ACTIVE" => ($val["ACTIVE"] == "N") ? "N" : "Y",
					"SORT" => $val["SORT"],
					"DESCRIPTION" => $val["DESCRIPTION"]
				)
			);

			foreach($val["ACTION"] as &$action)
			{
				$arGeneralInfo["paySystem"][$val["CODE_TEMP"]][$action["PERSON_TYPE_ID"]] = $id;
				$action["PAY_SYSTEM_ID"] = $id;

				if (strlen($action["ACTION_FILE"]) > 0
						&& file_exists($_SERVER["DOCUMENT_ROOT"].$action["ACTION_FILE"]."/logo.gif"))
				{
					$action["LOGOTIP"] = CFile::MakeFileArray($_SERVER["DOCUMENT_ROOT"].$action["ACTION_FILE"]."/logo.gif");
				}
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:32,代码来源:step1.php

示例5: foreach

            foreach ($val["ACTION"] as $action) {
                $arGeneralInfo["paySystem"][$val["CODE_TEMP"]][$action["PERSON_TYPE_ID"]] = $arSalePaySystem["ID"];
                $action["PAY_SYSTEM_ID"] = $arSalePaySystem["ID"];
                $dbSalePaySystemAction = CSalePaySystemAction::GetList(array(), array("PAY_SYSTEM_ID" => $arSalePaySystem["ID"], "PERSON_TYPE_ID" => $action["PERSON_TYPE_ID"]), false, false, array("ID"));
                if ($arSalePaySystemAction = $dbSalePaySystemAction->GetNext()) {
                    CSalePaySystemAction::Update($arSalePaySystemAction["ID"], $action);
                } else {
                    if (strlen($action["ACTION_FILE"]) > 0 && file_exists($_SERVER["DOCUMENT_ROOT"] . $action["ACTION_FILE"] . "/logo.gif")) {
                        $action["LOGOTIP"] = CFile::MakeFilearray($_SERVER["DOCUMENT_ROOT"] . $action["ACTION_FILE"] . "/logo.gif");
                    }
                    CSalePaySystemAction::Add($action);
                }
            }
        }
    } else {
        $id = CSalePaySystem::Add(array("LID" => $currentSiteID, "CURRENCY" => $defCurrency, "NAME" => $val["NAME"], "ACTIVE" => $val["ACTIVE"] == "N" ? "N" : "Y", "SORT" => $val["SORT"], "DESCRIPTION" => $val["DESCRIPTION"]));
        foreach ($val["ACTION"] as &$action) {
            $action["PAY_SYSTEM_ID"] = $id;
            if (strlen($action["ACTION_FILE"]) > 0 && file_exists($_SERVER["DOCUMENT_ROOT"] . $action["ACTION_FILE"] . "/logo.gif")) {
                $action["LOGOTIP"] = CFile::MakeFilearray($_SERVER["DOCUMENT_ROOT"] . $action["ACTION_FILE"] . "/logo.gif");
            }
            CSalePaySystemAction::Add($action);
        }
    }
}
if (!Main\ModuleManager::isModuleInstalled('catalog')) {
    $CModule = new CModule();
    if ($Module = $CModule->CreateModuleObject("catalog")) {
        OnModuleInstalledEvent('catalog');
        $result = true;
        if (!Main\ModuleManager::isModuleInstalled('bitrix24') || !defined('BX24_HOST_NAME')) {
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:sale_link.php


注:本文中的CSalePaySystem::Add方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。