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


PHP CSalePaySystemAction::Add方法代码示例

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


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

示例1: addPaysysHandler

 protected function addPaysysHandler($psid)
 {
     $a_ps_act = array();
     $fields = array("PAY_SYSTEM_ID" => $psid, "NAME" => Loc::getMessage("DEVTM_ERIP_PS_ACTION_NAME"), "ACTION_FILE" => "/bitrix/php_interface/include/sale_payment/" . $this->MODULE_ID, "NEW_WINDOW" => "N", "HAVE_PREPAY" => "N", "HAVE_RESULT" => "N", "HAVE_ACTION" => "N", "HAVE_PAYMENT" => "Y", "HAVE_RESULT_RECEIVE" => "Y", "ENCODING" => "utf-8");
     $db_pt = CSalePersonType::GetList(array("SORT" => "ASC", "NAME" => "ASC"), array());
     while ($pt = $db_pt->Fetch()) {
         $fields["PERSON_TYPE_ID"] = $pt["ID"];
         $id = CSalePaySystemAction::Add($fields);
         if ($id != false) {
             $a_ps_act[] = $id;
         }
     }
     return $a_ps_act;
 }
开发者ID:dimabresky,项目名称:bitrix-Erip-module,代码行数:14,代码来源:index.php

示例2: 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

示例3: str_replace

                         $arFields["HAVE_RESULT_RECEIVE"] = "Y";
                     }
                 } else {
                     $arFields["HAVE_PAYMENT"] = "Y";
                 }
             }
             if ($actionID > 0) {
                 if (!CSalePaySystemAction::Update($actionID, $arFields)) {
                     if ($ex = $APPLICATION->GetException()) {
                         $errorMessage1 .= $ex->GetString() . ".<br>";
                     } else {
                         $errorMessage1 .= str_replace("#PLAT#", $arPersonType["NAME"], GetMessage("SPS_ERROR_UPDATE")) . ".<br>";
                     }
                 }
             } else {
                 if (!CSalePaySystemAction::Add($arFields)) {
                     if ($ex = $APPLICATION->GetException()) {
                         $errorMessage1 .= $ex->GetString() . ".<br>";
                     } else {
                         $errorMessage1 .= str_replace("#PLAT#", $arPersonType["NAME"], GetMessage("SPS_ERROR_ADD")) . ".<br>";
                     }
                 }
             }
         }
     }
     $errorMessage .= $errorMessage1;
 }
 $dbPSAction = CSalePaySystemAction::GetList(array(), array("PAY_SYSTEM_ID" => $ID, "!PERSON_TYPE_ID" => $arPersonTypes));
 while ($arPSAction = $dbPSAction->Fetch()) {
     if (!CSalePaySystemAction::Delete($arPSAction["ID"])) {
         if ($ex = $APPLICATION->GetException()) {
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:pay_system_edit.php

示例4: OnPostForm

 function OnPostForm()
 {
     $wizard =& $this->GetWizard();
     if ($wizard->IsNextButtonClick()) {
         $arResult = $wizard->GetVars(true);
         COption::SetOptionString("sale", "order_email", $arResult["orderEmail"]);
         COption::SetOptionString("sale", "delete_after", $arResult["saveBasket"]);
         COption::SetOptionString("sale", "default_currency", $arResult["currencyID"]);
         $arFields["LID"] = $arResult["siteID"];
         $arFields["CURRENCY"] = $arResult["currencyID"];
         CSaleLang::Update($arResult["siteID"], array("LID" => $arResult["siteID"], "CURRENCY" => $arResult["currencyID"]));
         CSaleGroupAccessToSite::DeleteBySite($arResult["siteID"]);
         foreach ($arResult["groupID"] as $v) {
             CSaleGroupAccessToSite::Add(array("SITE_ID" => $arResult["siteID"], "GROUP_ID" => $v));
         }
         if (!empty($arResult["1C_GROUP_PERMISSIONS"])) {
             COption::SetOptionString("catalog", "1C_GROUP_PERMISSIONS", implode(",", $arResult["1C_GROUP_PERMISSIONS"]));
         }
         COption::SetOptionString("catalog", "1C_ELEMENT_ACTION", $arResult["1C_ELEMENT_ACTION"]);
         COption::SetOptionString("catalog", "1C_SECTION_ACTION", $arResult["1C_SECTION_ACTION"]);
         COption::SetOptionString("catalog", "1C_INTERVAL", $arResult["1C_INTERVAL"]);
         COption::SetOptionString("catalog", "1C_FILE_SIZE_LIMIT", $arResult["1C_FILE_SIZE_LIMIT"]);
         COption::SetOptionString("catalog", "1C_SITE_LIST", $arResult["siteID"]);
         if (!empty($arResult["1C_GROUP_PERMISSIONS"])) {
             COption::SetOptionString("sale", "1C_SALE_GROUP_PERMISSIONS", implode(",", $arResult["1C_GROUP_PERMISSIONS"]));
         }
         COption::SetOptionString("sale", "1C_EXPORT_PAYED_ORDERS", $arResult["1C_EXPORT_PAYED_ORDERS"]);
         COption::SetOptionString("sale", "1C_EXPORT_ALLOW_DELIVERY_ORDERS", $arResult["1C_EXPORT_ALLOW_DELIVERY_ORDERS"]);
         COption::SetOptionString("sale", "1C_EXPORT_FINAL_ORDERS", $arResult["1C_EXPORT_FINAL_ORDERS"]);
         COption::SetOptionString("sale", "1C_FINAL_STATUS_ON_DELIVERY", $arResult["1C_FINAL_STATUS_ON_DELIVERY"]);
         COption::SetOptionString("sale", "1C_SALE_SITE_LIST", $arResult["siteID"]);
         foreach ($arResult["groupID"] as $v) {
             $perm = $GLOBALS["APPLICATION"]->GetGroupRight("sale", $v);
             if ($perm != "W") {
                 $GLOBALS["APPLICATION"]->SetGroupRight("sale", $v, "U");
             }
         }
         $dbStatus = CSaleStatus::GetList(array("SORT" => "ASC"), array("LID" => $arResult["siteID"]), false, false, array("ID", "LID", "SORT"));
         while ($arStatus = $dbStatus->Fetch()) {
             $arPerms = array();
             foreach ($arResult["groupID"] as $v) {
                 $arPerms[] = array("GROUP_ID" => $v, "PERM_VIEW" => $arResult["perm"][$arStatus["ID"]][$v]["PERM_DELETE"] == "Y" || $arResult["perm"][$arStatus["ID"]][$v]["PERM_UPDATE"] == "Y" || $arResult["perm"][$arStatus["ID"]][$v]["PERM_PAYMENT"] == "Y" || $arResult["perm"][$arStatus["ID"]][$v]["PERM_DELIVERY"] == "Y" || $arResult["perm"][$arStatus["ID"]][$v]["PERM_CANCEL"] == "Y" ? "Y" : $arResult["perm"][$arStatus["ID"]][$v]["PERM_VIEW"], "PERM_CANCEL" => $arResult["perm"][$arStatus["ID"]][$v]["PERM_CANCEL"], "PERM_MARK" => $arResult["perm"][$arStatus["ID"]][$v]["PERM_MARK"], "PERM_DEDUCTION" => $arResult["perm"][$arStatus["ID"]][$v]["PERM_DEDUCTION"], "PERM_DELIVERY" => $arResult["perm"][$arStatus["ID"]][$v]["PERM_DELIVERY"], "PERM_PAYMENT" => $arResult["perm"][$arStatus["ID"]][$v]["PERM_PAYMENT"], "PERM_STATUS" => $arResult["perm"][$arStatus["ID"]][$v]["PERM_STATUS"], "PERM_STATUS_FROM" => $arResult["perm"][$arStatus["ID"]][$v]["PERM_STATUS_FROM"], "PERM_UPDATE" => $arResult["perm"][$arStatus["ID"]][$v]["PERM_UPDATE"], "PERM_DELETE" => $arResult["perm"][$arStatus["ID"]][$v]["PERM_DELETE"]);
             }
             CSaleStatus::Update($arStatus["ID"], array("PERMS" => $arPerms, "SORT" => $arStatus["SORT"]));
         }
         $paySystemID = array();
         $paySystem = array();
         foreach ($arResult["paySystem"] as $pType => $pSystem) {
             if (!empty($pSystem)) {
                 foreach ($pSystem as $v) {
                     $paySystem[$v][] = $pType;
                     if (!in_array($v, $paySystemID)) {
                         $paySystemID[] = $v;
                     }
                 }
             }
         }
         $dbPaySys = CSalePaySystem::GetList(array(), array("ACTIVE" => "Y"), false, false, array("ID", "ACTIVE"));
         while ($arPaySys = $dbPaySys->Fetch()) {
             if (!in_array($arPaySys["ID"], $paySystemID)) {
                 CSalePaySystem::Update($arPaySys["ID"], array("ACTIVE" => "N"));
             }
         }
         foreach ($paySystem as $pID => $value) {
             $dbPaySysAction = CSalePaySystemAction::GetList(array(), array("PAY_SYSTEM_ID" => $pID));
             while ($arPaySysAction = $dbPaySysAction->Fetch()) {
                 if (!in_array($arPaySysAction["PERSON_TYPE_ID"], $value)) {
                     CSalePaySystemAction::Delete($arPaySysAction["ID"]);
                 }
             }
         }
         function LocalGetPSActionParams($fileName)
         {
             $arPSCorrespondence = array();
             if (file_exists($fileName) && is_file($fileName)) {
                 include $fileName;
             }
             return $arPSCorrespondence;
         }
         foreach ($paySystem as $pID => $value) {
             foreach ($value as $personID) {
                 $arFields = array();
                 $arPaySysAction = "";
                 $dbPaySysAction = CSalePaySystemAction::GetList(array(), array("PAY_SYSTEM_ID" => $pID, "PERSON_TYPE_ID" => $personID));
                 if ($arPaySysAction = $dbPaySysAction->Fetch()) {
                     $pathToAction = $_SERVER["DOCUMENT_ROOT"] . $arPaySysAction["ACTION_FILE"];
                 } else {
                     $dbPaySysAction = CSalePaySystemAction::GetList(array(), array("PAY_SYSTEM_ID" => $pID));
                     if ($arPaySysActionTmp = $dbPaySysAction->Fetch()) {
                         $pathToAction = $_SERVER["DOCUMENT_ROOT"] . $arPaySysActionTmp["ACTION_FILE"];
                     }
                 }
                 if (strlen($pathToAction) > 0) {
                     $arPSCorrespondence = LocalGetPSActionParams($pathToAction . "/.description.php");
                     $arParams = array();
                     foreach ($arPSCorrespondence as $k => $v) {
                         $typeTmp = $arResult[$pID . "_" . $k . "_" . $personID];
                         $valueTmp = $arResult["VALUE1_" . $pID . "_" . $k . "_" . $personID];
                         if (strlen($valueTmp) <= 0) {
                             $valueTmp = $arResult["VALUE2_" . $pID . "_" . $k . "_" . $personID];
//.........这里部分代码省略.........
开发者ID:Satariall,项目名称:izurit,代码行数:101,代码来源:wizard.php

示例5: file_exists

					"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");
				}

				CSalePaySystemAction::Add($action);
			}
		}
	}

	if (COption::GetOptionString("eshop", "wizard_installed", "N", WIZARD_SITE_ID) != "Y" || WIZARD_INSTALL_DEMO_DATA)
	{
		$bStatusP = false;
		$dbStatus = CSaleStatus::GetList(Array("SORT" => "ASC"));
		while($arStatus = $dbStatus->Fetch())
		{
			$arFields = Array();
			foreach($arLanguages as $langID)
			{
				WizardServices::IncludeServiceLang("step1.php", $langID);
				$arFields["LANG"][] = Array("LID" => $langID, "NAME" => GetMessage("WIZ_SALE_STATUS_".$arStatus["ID"]), "DESCRIPTION" => GetMessage("WIZ_SALE_STATUS_DESCRIPTION_".$arStatus["ID"]));
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:31,代码来源:step1.php


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