本文整理汇总了PHP中CSaleOrderProps类的典型用法代码示例。如果您正苦于以下问题:PHP CSaleOrderProps类的具体用法?PHP CSaleOrderProps怎么用?PHP CSaleOrderProps使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CSaleOrderProps类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: CheckFields
public static function CheckFields($ACTION, &$arFields, $ID = 0)
{
if ((is_set($arFields, "ORDER_ID") || $ACTION == "ADD") && IntVal($arFields["ORDER_ID"]) <= 0) {
$GLOBALS["APPLICATION"]->ThrowException(GetMessage("SKGOPV_EMPTY_ORDER_ID"), "EMPTY_ORDER_ID");
return false;
}
if ((is_set($arFields, "ORDER_PROPS_ID") || $ACTION == "ADD") && IntVal($arFields["ORDER_PROPS_ID"]) <= 0) {
$GLOBALS["APPLICATION"]->ThrowException(GetMessage("SKGOPV_EMPTY_PROP_ID"), "EMPTY_ORDER_PROPS_ID");
return false;
}
if (is_set($arFields, "ORDER_ID")) {
if (!($arOrder = CSaleOrder::GetByID($arFields["ORDER_ID"]))) {
$GLOBALS["APPLICATION"]->ThrowException(str_replace("#ID#", $arFields["ORDER_ID"], GetMessage("SKGOPV_NO_ORDER_ID")), "ERROR_NO_ORDER");
return false;
}
}
if (is_set($arFields, "ORDER_PROPS_ID")) {
if (!($arOrder = CSaleOrderProps::GetByID($arFields["ORDER_PROPS_ID"]))) {
$GLOBALS["APPLICATION"]->ThrowException(str_replace("#ID#", $arFields["ORDER_PROPS_ID"], GetMessage("SKGOPV_NO_PROP_ID")), "ERROR_NO_PROPERY");
return false;
}
if (is_set($arFields, "ORDER_ID")) {
$arFilter = array("ORDER_ID" => $arFields["ORDER_ID"], "ORDER_PROPS_ID" => $arFields["ORDER_PROPS_ID"]);
if (IntVal($ID) > 0) {
$arFilter["!ID"] = $ID;
}
$dbP = CSaleOrderPropsValue::GetList(array(), $arFilter);
if ($arP = $dbP->Fetch()) {
$GLOBALS["APPLICATION"]->ThrowException(GetMessage("SKGOPV_DUPLICATE_PROP_ID", array("#ID#" => $arFields["ORDER_PROPS_ID"], "#ORDER_ID#" => $arFields["ORDER_ID"])), "ERROR_DUPLICATE_PROP_ID");
return false;
}
}
}
return True;
}
开发者ID:rasuldev,项目名称:torino,代码行数:35,代码来源:order_props_values.php
示例2: DoSaveUserProfile
static function DoSaveUserProfile($userId, $profileId, $profileName, $personTypeId, $orderProps, &$arErrors)
{
$profileId = intval($profileId);
$arIDs = array();
if ($profileId > 0) {
$dbProfile = CSaleOrderUserProps::GetList(array(), array("ID" => $profileId), false, false, array("ID", "NAME", "USER_ID", "PERSON_TYPE_ID"));
$arProfile = $dbProfile->Fetch();
if (!$arProfile) {
$arErrors[] = array("CODE" => "PROFILE_NOT_FOUND", "TEXT" => GetMessage('SKGOUP_PROFILE_NOT_FOUND'));
return false;
}
if ($arProfile["USER_ID"] != $userId || $arProfile["PERSON_TYPE_ID"] != $personTypeId) {
$arErrors[] = array("CODE" => "PARAM", "TEXT" => GetMessage('SKGOUP_PARRAMS_ERROR'));
return false;
}
//if (strlen($profileName) > 0 && $profileName != $arProfile["NAME"])
if (strlen($profileName) > 0) {
$arFields = array("NAME" => $profileName, "USER_ID" => $userId);
CSaleOrderUserProps::Update($profileId, $arFields);
}
$dbUserPropsValues = CSaleOrderUserPropsValue::GetList(array(), array("USER_PROPS_ID" => $profileId), false, false, array("ID", "ORDER_PROPS_ID"));
while ($arUserPropsValue = $dbUserPropsValues->Fetch()) {
$arIDs[$arUserPropsValue["ORDER_PROPS_ID"]] = $arUserPropsValue["ID"];
}
}
if (!is_array($orderProps)) {
$dbOrderPropsValues = CSaleOrderPropsValue::GetList(array(), array("ORDER_ID" => intval($orderProps)), false, false, array("ORDER_PROPS_ID", "VALUE"));
$orderProps = array();
while ($arOrderPropsValue = $dbOrderPropsValues->Fetch()) {
$orderProps[$arOrderPropsValue["ORDER_PROPS_ID"]] = $arOrderPropsValue["VALUE"];
}
}
$dbOrderProperties = CSaleOrderProps::GetList(array(), array("PERSON_TYPE_ID" => $personTypeId, "ACTIVE" => "Y", "UTIL" => "N", "USER_PROPS" => "Y"), false, false, array("ID", "TYPE", "NAME", "CODE"));
while ($arOrderProperty = $dbOrderProperties->Fetch()) {
$curVal = $orderProps[$arOrderProperty["ID"]];
if ($arOrderProperty["TYPE"] == "MULTISELECT" && is_array($curVal)) {
$curVal = implode(",", $curVal);
}
if (strlen($curVal) > 0) {
if ($profileId <= 0) {
if (strlen($profileName) <= 0) {
$profileName = GetMessage("SOA_PROFILE") . " " . Date("Y-m-d");
}
$arFields = array("NAME" => $profileName, "USER_ID" => $userId, "PERSON_TYPE_ID" => $personTypeId);
$profileId = CSaleOrderUserProps::Add($arFields);
}
if (array_key_exists($arOrderProperty["ID"], $arIDs)) {
$arFields = array("NAME" => $arOrderProperty["NAME"], "VALUE" => $curVal);
CSaleOrderUserPropsValue::Update($arIDs[$arOrderProperty["ID"]], $arFields);
unset($arIDs[$arOrderProperty["ID"]]);
} else {
$arFields = array("USER_PROPS_ID" => $profileId, "ORDER_PROPS_ID" => $arOrderProperty["ID"], "NAME" => $arOrderProperty["NAME"], "VALUE" => $curVal);
CSaleOrderUserPropsValue::Add($arFields);
}
}
}
foreach ($arIDs as $id) {
CSaleOrderUserPropsValue::Delete($id);
}
}
开发者ID:rasuldev,项目名称:torino,代码行数:60,代码来源:order_user_props.php
示例3: GetOrderPropId
public static function GetOrderPropId($code)
{
$id = 0;
if (CModule::IncludeModule('sale')) {
$db_props = CSaleOrderProps::GetList(array("SORT" => "ASC"), array("CODE" => $code), false, false, array("ID"));
if ($props = $db_props->Fetch()) {
$id = $props["ID"];
}
} else {
Trace("Error: can't include module sale");
}
return $id;
}
开发者ID:rasuldev,项目名称:torino,代码行数:13,代码来源:BitrixHelpers.php
示例4: getOrderProps
protected function getOrderProps()
{
if ($this->orderProps === null) {
$this->orderProps = array();
if (isset($this->formData["PERSON_TYPE"])) {
$db_props = CSaleOrderProps::GetList(array(), array("PERSON_TYPE_ID" => $this->formData["PERSON_TYPE"]));
while ($prop = $db_props->Fetch()) {
$this->orderProps[] = $prop;
}
}
}
return $this->orderProps;
}
开发者ID:ASDAFF,项目名称:DDelivery,代码行数:13,代码来源:DDeliveryShop.php
示例5: translateLocationIDToCode
protected static function translateLocationIDToCode($id, $orderPropId)
{
if (!CSaleLocation::isLocationProMigrated()) {
return $id;
}
$prop = CSaleOrderProps::GetByID($orderPropId);
if (isset($prop['TYPE']) && $prop['TYPE'] == 'LOCATION') {
if ((string) $id === (string) intval($id)) {
return CSaleLocation::tryTranslateIDToCode($id);
}
}
return $id;
}
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:13,代码来源:order_user_props_value.php
示例6: Delete
function Delete($ID)
{
global $DB;
$ID = IntVal($ID);
$db_orderProps = CSaleOrderProps::GetList($by = "PROPS_GROUP_ID", $order = "ASC", array("PROPS_GROUP_ID" => $ID));
while ($arOrderProps = $db_orderProps->Fetch()) {
$DB->Query("DELETE FROM b_sale_order_props_variant WHERE ORDER_PROPS_ID = " . $arOrderProps["ID"] . "", true);
$DB->Query("UPDATE b_sale_order_props_value SET ORDER_PROPS_ID = NULL WHERE ORDER_PROPS_ID = " . $arOrderProps["ID"] . "", true);
$DB->Query("DELETE FROM b_sale_user_props_value WHERE ORDER_PROPS_ID = " . $arOrderProps["ID"] . "", true);
}
$DB->Query("DELETE FROM b_sale_order_props WHERE PROPS_GROUP_ID = " . $ID . "", true);
CSaleOrderUserProps::ClearEmpty();
return $DB->Query("DELETE FROM b_sale_order_props_group WHERE ID = " . $ID . "", true);
}
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:14,代码来源:order_props_group.php
示例7: AddOrderProperty
function AddOrderProperty($prop_id, $value, $order)
{
if (!strlen($prop_id)) {
return false;
}
if (CModule::IncludeModule('sale')) {
if ($arOrderProps = CSaleOrderProps::GetByID($prop_id)) {
$db_vals = CSaleOrderPropsValue::GetList(array(), array('ORDER_ID' => $order, 'ORDER_PROPS_ID' => $arOrderProps['ID']));
if ($arVals = $db_vals->Fetch()) {
return CSaleOrderPropsValue::Update($arVals['ID'], array('NAME' => $arVals['NAME'], 'CODE' => $arVals['CODE'], 'ORDER_PROPS_ID' => $arVals['ORDER_PROPS_ID'], 'ORDER_ID' => $arVals['ORDER_ID'], 'VALUE' => $value));
} else {
return CSaleOrderPropsValue::Add(array('NAME' => $arOrderProps['NAME'], 'CODE' => $arOrderProps['CODE'], 'ORDER_PROPS_ID' => $arOrderProps['ID'], 'ORDER_ID' => $order, 'VALUE' => $value));
}
}
}
}
开发者ID:VitaliiSestrenskyi,项目名称:sest,代码行数:16,代码来源:AddOrderProperty.php
示例8: getOrderProps
public static function getOrderProps($id = false)
{
static $result = null;
static $resultById = null;
static $resultByCode = null;
if($result === null)
{
$rs = \CSaleOrderProps::GetList(array(), array(), false, false, array('ID', 'NAME', 'CODE'));
while($ar = $rs->GetNext(true, false))
{
$obj = new OrderProp($ar);
$resultById[ $ar['ID'] ] = &$obj;
$resultByCode[ $ar['CODE'] ] = &$obj;
$result[] = &$obj;
unset($obj);
}
}
return $id ? (isset($resultById[$id]) ? $resultById[$id] : (isset($resultByCode[$id]) ? $resultByCode[$id] : false)) : $result;
}
开发者ID:ASDAFF,项目名称:bitrix_lib,代码行数:21,代码来源:OrderProp.class.php
示例9: CheckFields
function CheckFields($ACTION, &$arFields, $ID = 0)
{
global $DB, $USER;
if ((is_set($arFields, "VALUE") || $ACTION == "ADD") && strlen($arFields["VALUE"]) <= 0) {
$GLOBALS["APPLICATION"]->ThrowException(GetMessage("SKGOPV_EMPTY_VAR"), "ERROR_NO_VALUE");
return false;
}
if ((is_set($arFields, "NAME") || $ACTION == "ADD") && strlen($arFields["NAME"]) <= 0) {
$GLOBALS["APPLICATION"]->ThrowException(GetMessage("SKGOPV_EMPTY_NAME"), "ERROR_NO_NAME");
return false;
}
if ((is_set($arFields, "ORDER_PROPS_ID") || $ACTION == "ADD") && IntVal($arFields["ORDER_PROPS_ID"]) <= 0) {
$GLOBALS["APPLICATION"]->ThrowException(GetMessage("SKGOPV_EMPTY_CODE"), "ERROR_NO_ORDER_PROPS_ID");
return false;
}
if (is_set($arFields, "ORDER_PROPS_ID")) {
if (!($arOrder = CSaleOrderProps::GetByID($arFields["ORDER_PROPS_ID"]))) {
$GLOBALS["APPLICATION"]->ThrowException(str_replace("#ID#", $arFields["ORDER_PROPS_ID"], GetMessage("SKGOPV_NO_PROP")), "ERROR_NO_PROPERY");
return false;
}
}
return True;
}
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:23,代码来源:order_props_variant.php
示例10: array
*/
$userProfile = $arResultProps["USER_PROFILES"];
$arPropValues = array();
$arPropValues = $userProfile[$PROFILE_ID]["VALUES"];
$arFilter = array("PERSON_TYPE_ID" => $PERSON_TYPE, "ACTIVE" => "Y", "UTIL" => "N");
$dbProperties = CSaleOrderProps::GetList(array("SORT" => "ASC"), $arFilter, false, false, array("ID", "NAME", "TYPE", "REQUIED", "DEFAULT_VALUE", "IS_LOCATION", "PROPS_GROUP_ID", "SIZE1", "SIZE2", "DESCRIPTION", "IS_EMAIL", "IS_PROFILE_NAME", "IS_PAYER", "IS_LOCATION4TAX", "CODE", "GROUP_NAME", "GROUP_SORT", "SORT", "USER_PROPS", "IS_ZIP", "INPUT_FIELD_LOCATION", "SUBSCRIBE"));
$locationZipID = "";
$locationID = "";
$profileName = "";
$payerName = "";
$payerEMail = "";
//load location for the index if isset index
$locationForZip = "";
if (isset($_REQUEST["CHANGE_ZIP"]) && $_REQUEST["CHANGE_ZIP"] == "Y") {
$arFilterZip = array("PERSON_TYPE_ID" => $PERSON_TYPE, "IS_ZIP" => "Y", "ACTIVE" => "Y", "UTIL" => "N");
$dbPropertiesZip = CSaleOrderProps::GetList(array("SORT" => "ASC"), $arFilterZip, false, false, array("ID"));
$arPropZip = $dbPropertiesZip->GetNext();
$zipCode = htmlspecialcharsEx($_POST["ORDER_PROP_" . $arPropZip["ID"]]);
$arZip = CSaleLocation::GetByZIP($zipCode);
if (is_array($arZip) && count($arZip) > 1) {
$locationForZip = intval($arZip["ID"]);
}
}
while ($arProperties = $dbProperties->GetNext()) {
if ((isset($_POST["BasketOrder"]) || $requestAjax || $_REQUEST["form"] == "Y") && $PROFILE_ID_OLD == $PROFILE_ID) {
$curVal = htmlspecialcharsEx($_REQUEST["ORDER_PROP_" . $arProperties["ID"]]);
if (intval($_REQUEST["NEW_LOCATION_" . $arProperties["ID"]]) > 0) {
$curVal = intval($_POST["NEW_LOCATION_" . $arProperties["ID"]]);
}
} else {
$curVal = $arPropValues[intval($arProperties["ID"])];
开发者ID:webgksupport,项目名称:alpina,代码行数:31,代码来源:component.php
示例11: fGetLocationID
function fGetLocationID($PERSON_TYPE_ID)
{
$arResult = array();
$dbProperties = CSaleOrderProps::GetList(
array("SORT" => "ASC"),
array("PERSON_TYPE_ID" => $PERSON_TYPE_ID),
false,
false,
array("TYPE", "IS_ZIP", "ID", "SORT")
);
while ($arProperties = $dbProperties->Fetch())
{
if ($arProperties["TYPE"] == "TEXT")
{
if ($arProperties["IS_ZIP"] == "Y")
{
$arResult["LOCATION_ZIP_ID"] = $arProperties["ID"];
}
}
elseif ($arProperties["TYPE"] == "LOCATION")
{
$arResult["LOCATION_ID"] = $arProperties["ID"];
}
}
return $arResult;
}
开发者ID:akniyev,项目名称:arteva.ru,代码行数:27,代码来源:admin_tool.php
示例12: array
$tabControl->Begin(array("FORM_ACTION" => $APPLICATION->GetCurPage() . "?lang=" . LANG . $urlForm));
//TAB EDIT PROFILE
$tabControl->BeginNextFormTab();
if (!empty($arProfile) && !empty($arUser)) {
$dbPersonType = CSalePersonType::GetList(array(), array("ACTIVE" => "Y", "ID" => $PERSON_TYPE));
$arPersonType = $dbPersonType->GetNext();
$LID = $arPersonType["LID"];
$arFilterProps = array("PERSON_TYPE_ID" => $PERSON_TYPE, "ACTIVE" => "Y");
if ($saleModulePermissions >= "U" && $saleModulePermissions < "W") {
$arFilterProps["USER_PROPS"] = "Y";
$arFilterProps["UTIL"] = "N";
}
$tabControl->AddViewField("CODE_USER", GetMessage("BUYER_PE_USER") . ":", "[<a href=\"/bitrix/admin/user_edit.php?ID=" . $arUser["ID"] . "&lang=" . LANGUAGE_ID . "\">" . $arUser["ID"] . "</a>] (" . $arUser["LOGIN"] . ") " . $userFIO);
$tabControl->AddEditField("CODE_PROFILE_NAME", GetMessage("BUYER_PE_PROFILE_NAME") . ":", false, array("size" => 30, "maxlength" => 255), htmlspecialcharsEx($profileName));
$propertyGroupID = "";
$dbProperties = CSaleOrderProps::GetList(array("GROUP_SORT" => "ASC", "PROPS_GROUP_ID" => "ASC", "SORT" => "ASC", "NAME" => "ASC"), $arFilterProps, false, false, array("*"));
$userProfile = CSaleOrderUserProps::DoLoadProfiles($USER_ID, $PERSON_TYPE);
$curVal = "";
while ($arProperties = $dbProperties->Fetch()) {
$curVal = $userProfile[$ID]["VALUES"][IntVal($arProperties["ID"])];
$fieldValue = $curVal != "" ? $curVal : $arProperties["DEFAULT_VALUE"];
if (IntVal($arProperties["PROPS_GROUP_ID"]) != $propertyGroupID) {
$tabControl->AddSection("SECTION_" . $arProperties["PROPS_GROUP_ID"], $arProperties["GROUP_NAME"]);
}
$shure = false;
if ($arProperties["REQUIED"] == "Y" || $arProperties["IS_PROFILE_NAME"] == "Y" || $arProperties["IS_LOCATION"] == "Y" || $arProperties["IS_LOCATION4TAX"] == "Y" || $arProperties["IS_PAYER"] == "Y" || $arProperties["IS_ZIP"] == "Y") {
$shure = true;
}
/*fields*/
if ($arProperties["TYPE"] == "TEXT") {
$tabControl->AddEditField("CODE_" . IntVal($arProperties["ID"]), $arProperties["NAME"] . ":", $shure, array("size" => 30, "maxlength" => 255), $fieldValue);
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:buyers_profile_edit.php
示例13: htmlspecialcharsEx
<td valign="middle"><?
$arPersonType = CSalePersonType::GetByID($arOrder["PERSON_TYPE_ID"]);
echo htmlspecialcharsEx($arPersonType["NAME"]);
?>
</td>
</tr>
<?
//disabled town
$arTownOrderProps = array();
$dbProperties = CSaleOrderProps::GetList(
array(),
array(
"ORDER_ID" => $ID,
"PERSON_TYPE_ID" => $arPersonType["ID"],
"ACTIVE" => "Y",
">INPUT_FIELD_LOCATION" => 0
),
false,
false,
array("INPUT_FIELD_LOCATION")
);
while ($arProperties = $dbProperties->Fetch())
$arTownOrderProps[$arProperties["INPUT_FIELD_LOCATION"]] = $arProperties["INPUT_FIELD_LOCATION"];
$arEnableTownProps = array();
$arOrderPropsValue = array();
$dbOrderProps = CSaleOrderPropsValue::GetOrderProps($ID);
while ($arOrderProps = $dbOrderProps->Fetch())
{
$arOrderPropsValue[] = $arOrderProps;
if ($arOrderProps["TYPE"] == "LOCATION" && $arOrderProps["ACTIVE"] == "Y" && $arOrderProps["IS_LOCATION"] == "Y" && in_array($arOrderProps["INPUT_FIELD_LOCATION"], $arTownOrderProps))
开发者ID:akniyev,项目名称:arteva.ru,代码行数:32,代码来源:order_detail.php
示例14: GetRealPath2Report
$val["PRICE"] -= $val["DISCOUNT_RATION_VALUE"];
$arBasket[$key] = $val;
}
return $arBasket;
}
if (CModule::IncludeModule("sale")) {
if ($arOrder = CSaleOrder::GetByID($ORDER_ID)) {
$rep_file_name = GetRealPath2Report($doc . ".php");
if (strlen($rep_file_name) <= 0) {
ShowError("PRINT TEMPLATE NOT FOUND");
die;
}
$arOrderProps = array();
$dbOrderPropVals = CSaleOrderPropsValue::GetList(array(), array("ORDER_ID" => $ORDER_ID), false, false, array("ID", "CODE", "VALUE", "ORDER_PROPS_ID", "PROP_TYPE"));
while ($arOrderPropVals = $dbOrderPropVals->Fetch()) {
$arCurOrderPropsTmp = CSaleOrderProps::GetRealValue($arOrderPropVals["ORDER_PROPS_ID"], $arOrderPropVals["CODE"], $arOrderPropVals["PROP_TYPE"], $arOrderPropVals["VALUE"], LANGUAGE_ID);
foreach ($arCurOrderPropsTmp as $key => $value) {
$arOrderProps[$key] = $value;
}
}
if (CSaleLocation::isLocationProMigrated()) {
if (strlen($arOrderProps['LOCATION_VILLAGE']) && !strlen($arOrderProps['LOCATION_CITY'])) {
$arOrderProps['LOCATION_CITY'] = $arOrderProps['LOCATION_VILLAGE'];
}
// street added to the beginning of address, as it used to be before
if (strlen($arOrderProps['LOCATION_STREET']) && isset($arOrderProps['ADDRESS'])) {
$arOrderProps['ADDRESS'] = $arOrderProps['LOCATION_STREET'] . (strlen($arOrderProps['ADDRESS']) ? ', ' . $arOrderProps['ADDRESS'] : '');
}
}
$arBasketIDs = array();
$arQuantities = array();
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:print.php
示例15: OnOrderAddHandler
/**
* функция по собыитию изминению закааза
* функция добавляет значения-заглушку в свойство Адрес доставки
*/
function OnOrderAddHandler($ORDER_ID,$arOrder) {
if(CModule::IncludeModule("sale")){
$db_props = CSaleOrderPropsValue::GetOrderProps($ORDER_ID);
while ($arProps = $db_props->Fetch())
{
if($arProps['CODE']=='ADDRESS'){
$address=true;
}
}
if(!$address){
if ($arProp = CSaleOrderProps::GetList(array(), array('ORDER_ID'=>$ORDER_ID,'CODE' => 'ADDRESS'))->Fetch()) {
CSaleOrderPropsValue::Add(array(
'NAME' => $arProp['NAME'],
'CODE' => $arProp['CODE'],
'ORDER_PROPS_ID' => $arProp['ID'],
'ORDER_ID' => $ORDER_ID,
'VALUE' => '777'
));
}
}
}
}
开发者ID:ASDAFF,项目名称:gpbitrix,代码行数:32,代码来源:class.php
示例16: getLocationPropertyInfo
public static function getLocationPropertyInfo()
{
static $info;
if ($info === null) {
$info = array();
if (CSaleLocation::isLocationProMigrated()) {
$res = CSaleOrderProps::GetList(array(), array('TYPE' => 'LOCATION'), false, false, array('ID', 'CODE'));
while ($item = $res->fetch()) {
$info['ID'][$item['ID']] = $item['CODE'];
$info['CODE'][$item['CODE']] = $item['ID'];
}
}
}
return $info;
}
开发者ID:akniyev,项目名称:itprom_dobrohost,代码行数:15,代码来源:order.php
示例17: ShowStep
function ShowStep()
{
$wizard =& $this->GetWizard();
$paySystem = $wizard->GetVar("paySystem");
$siteID = $wizard->GetVar("siteID");
$personType = $wizard->GetVar("personType");
CModule::IncludeModule("sale");
function LocalGetPSActionParams($fileName)
{
$arPSCorrespondence = array();
if (file_exists($fileName) && is_file($fileName)) {
include $fileName;
}
return $arPSCorrespondence;
}
$dbPaySystem = CSalePaySystem::GetList(array("SORT" => "ASC"), array("ACTIVE" => "Y", "LID" => $siteID));
while ($arPaySystem = $dbPaySystem->GetNext()) {
$arPaySystems[$arPaySystem["ID"]] = $arPaySystem["NAME"];
}
$dbPersonType = CSalePersonType::GetList(array("SORT" => "ASC"), array("ACTIVE" => "Y", "LID" => $siteID));
while ($arPersonType = $dbPersonType->GetNext()) {
$arPersons[$arPersonType["ID"]] = $arPersonType["NAME"];
}
$arFieldsList["USER"] = array("ID" => GetMessage("SPS_USER_ID"), "LOGIN" => GetMessage("SPS_USER_LOGIN"), "NAME" => GetMessage("SPS_USER_NAME"), "LAST_NAME" => GetMessage("SPS_USER_LAST_NAME"), "EMAIL" => "EMail", "LID" => GetMessage("SPS_USER_SITE"), "PERSONAL_PROFESSION" => GetMessage("SPS_USER_PROF"), "PERSONAL_WWW" => GetMessage("SPS_USER_WEB"), "PERSONAL_ICQ" => GetMessage("SPS_USER_ICQ"), "PERSONAL_GENDER" => GetMessage("SPS_USER_SEX"), "PERSONAL_FAX" => GetMessage("SPS_USER_FAX"), "PERSONAL_MOBILE" => GetMessage("SPS_USER_PHONE"), "PERSONAL_STREET" => GetMessage("SPS_USER_ADDRESS"), "PERSONAL_MAILBOX" => GetMessage("SPS_USER_POST"), "PERSONAL_CITY" => GetMessage("SPS_USER_CITY"), "PERSONAL_STATE" => GetMessage("SPS_USER_STATE"), "PERSONAL_ZIP" => GetMessage("SPS_USER_ZIP"), "PERSONAL_COUNTRY" => GetMessage("SPS_USER_COUNTRY"), "WORK_COMPANY" => GetMessage("SPS_USER_COMPANY"), "WORK_DEPARTMENT" => GetMessage("SPS_USER_DEPT"), "WORK_POSITION" => GetMessage("SPS_USER_DOL"), "WORK_WWW" => GetMessage("SPS_USER_COM_WEB"), "WORK_PHONE" => GetMessage("SPS_USER_COM_PHONE"), "WORK_FAX" => GetMessage("SPS_USER_COM_FAX"), "WORK_STREET" => GetMessage("SPS_USER_COM_ADDRESS"), "WORK_MAILBOX" => GetMessage("SPS_USER_COM_POST"), "WORK_CITY" => GetMessage("SPS_USER_COM_CITY"), "WORK_STATE" => GetMessage("SPS_USER_COM_STATE"), "WORK_ZIP" => GetMessage("SPS_USER_COM_ZIP"), "WORK_COUNTRY" => GetMessage("SPS_USER_COM_COUNTRY"));
$arFieldsList["ORDER"] = array("ID" => GetMessage("SPS_ORDER_ID"), "DATE_INSERT" => GetMessage("SPS_ORDER_DATETIME"), "DATE_INSERT_DATE" => GetMessage("SPS_ORDER_DATE"), "SHOULD_PAY" => GetMessage("SPS_ORDER_PRICE"), "CURRENCY" => GetMessage("SPS_ORDER_CURRENCY"), "PRICE" => GetMessage("SPS_ORDER_SUM"), "LID" => GetMessage("SPS_ORDER_SITE"), "PRICE_DELIVERY" => GetMessage("SPS_ORDER_PRICE_DELIV"), "DISCOUNT_VALUE" => GetMessage("SPS_ORDER_DESCOUNT"), "USER_ID" => GetMessage("SPS_ORDER_USER_ID"), "PAY_SYSTEM_ID" => GetMessage("SPS_ORDER_PS"), "DELIVERY_ID" => GetMessage("SPS_ORDER_DELIV"), "TAX_VALUE" => GetMessage("SPS_ORDER_TAX"));
foreach ($personType as $personID) {
$dbOrderProps = CSaleOrderProps::GetList(array("SORT" => "ASC", "NAME" => "ASC"), array("PERSON_TYPE_ID" => $personID), false, false, array("ID", "CODE", "NAME", "TYPE", "SORT", "PERSON_TYPE_ID"));
while ($arOrderProps = $dbOrderProps->GetNext()) {
$arFieldsList["PROPERTY"][$arOrderProps["PERSON_TYPE_ID"]][strlen($arOrderProps["CODE"]) > 0 ? $arOrderProps["CODE"] : $arOrderProps["ID"]] = $arOrderProps["NAME"];
if ($arOrderProps["TYPE"] == "LOCATION") {
$arFieldsList["PROPERTY"][$arOrderProps["PERSON_TYPE_ID"]][(strlen($arOrderProps["CODE"]) > 0 ? $arOrderProps["CODE"] : $arOrderProps["ID"]) . "_COUNTRY"] = $arOrderProps["NAME"] . " (" . GetMessage("SPS_JCOUNTRY") . ")";
$arFieldsList["PROPERTY"][$arOrderProps["PERSON_TYPE_ID"]][(strlen($arOrderProps["CODE"]) > 0 ? $arOrderProps["CODE"] : $arOrderProps["ID"]) . "_CITY"] = $arOrderProps["NAME"] . " (" . GetMessage("SPS_JCITY") . ")";
}
}
}
?>
<script type="text/javascript">
var arUserFieldsList = new Array();
var arUserFieldsNameList = new Array();
var arOrderFieldsList = new Array();
var arOrderFieldsNameList = new Array();
var arPropFieldsList = new Array();
var arPropFieldsNameList = new Array();
<?php
$i = -1;
foreach ($arFieldsList["USER"] as $k => $v) {
$i++;
?>
arUserFieldsList[<?php
echo $i;
?>
] = "<?php
echo $k;
?>
";
arUserFieldsNameList[<?php
echo $i;
?>
] = "<?php
echo $v;
?>
";
<?php
}
$i = -1;
foreach ($arFieldsList["ORDER"] as $k => $v) {
$i++;
?>
arOrderFieldsList[<?php
echo $i;
?>
] = "<?php
echo $k;
?>
";
arOrderFieldsNameList[<?php
echo $i;
?>
] = "<?php
echo $v;
?>
";
<?php
}
$i = -1;
foreach ($arFieldsList["PROPERTY"] as $k => $v) {
?>
arPropFieldsList[<?php
echo $k;
?>
] = new Array();
arPropFieldsNameList[<?php
echo $k;
?>
] = new Array();
<?php
foreach ($v as $k1 => $v1) {
$i++;
?>
//.........这里部分代码省略.........
开发者ID:Satariall,项目名称:izurit,代码行数:101,代码来源:wizard.php
示例18: Array
{
$dbPS = CSalePaySystem::GetList(Array(), Array("LID" => WIZARD_SITE_ID));
if($arPS = $dbPS->Fetch())
$paySystem = $arPS["ID"];
}
if(IntVal($location) <= 0)
{
$dbLocation = CSaleLocation::GetList(Array("ID" => "ASC"), Array("LID" => $lang));
if($arLocation = $dbLocation->Fetch())
{
$location = $arLocation["ID"];
}
}
if(empty($arGeneralInfo["properies"][$personType]))
{
$dbProp = CSaleOrderProps::GetList(array(), Array("PERSON_TYPE_ID" => $personType));
while($arProp = $dbProp->Fetch())
$arGeneralInfo["properies"][$personType][$arProp["CODE"]] = $arProp;
}
if(WIZARD_INSTALL_DEMO_DATA)
{
$db_sales = CSaleOrder::GetList(array("DATE_INSERT" => "ASC"), array("LID" => WIZARD_SITE_ID), false, false, array("ID"));
while ($ar_sales = $db_sales->Fetch())
{
CSaleOrder::Delete($ar_sales["ID"]);
}
}
$arData = Array(
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:31,代码来源:step1.php
示例19: GetMessage
if ($str_IS_LOCATION == "Y") {
echo "checked";
}
echo $disMulti;
?>
><br>
<small><?php
echo GetMessage("F_IS_LOCATION_DESCR");
?>
</small><br>
</td>
</tr>
<?php
$arFilter = array("PERSON_TYPE_ID" => IntVal($arPersonType["ID"]), "TYPE" => "TEXT", "ACTIVE" => "Y");
$dbAlterLocList = CSaleOrderProps::GetList(array(), $arFilter, false, false, array("ID", "NAME"));
?>
<tr id="SHOW_TEXT_LOCATION">
<td width="40%"><?php
echo GetMessage("F_ANOTHER_LOCATION");
?>
:</td>
<td width="60%">
<select name="INPUT_FIELD_LOCATION" id="INPUT_FIELD_LOCATION">
<option value=""><?php
echo GetMessage("NULL_ANOTHER_LOCATION");
?>
</option>
<?php
while ($arAlterLocList = $dbAlterLocList->Fetch()) {
?>
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:order_props_edit.php
示例20: array
</td>
</tr>
<?
$tabControl->EndCustomField("ORDER_PAYED");
}
// order properties related to the delivery and payment systems
$html = "";
$arRelFilter = array();
$arRelFilter["RELATED"]["DELIVERY_ID"] = $str_DELIVERY_ID;
$arRelFilter["RELATED"]["PAYSYSTEM_ID"] = $str_PAY_SYSTEM_ID;
if (isset($arRelFilter["RELATED"]) && (strlen($arRelFilter["RELATED"]["DELIVERY_ID"]) > 0 || intval($arRelFilter["RELATED"]["PAYSYSTEM_ID"]) > 0))
{
$dbRelatedProps = CSaleOrderProps::GetList(array(), $arRelFilter, false, false, array("*"));
while ($arRelatedProps = $dbRelatedProps->GetNext())
$arProps[] = $arRelatedProps;
$arPropsValues = array();
if (!$bVarsFromForm)
{
$dbPropValue = CSaleOrderPropsValue::GetOrderRelatedProps($ID, $arRelFilter["RELATED"]);
while ($arValue = $dbPropValue->GetNext())
$arPropsValues[$arValue["ORDER_PROPS_ID"]] = $arValue["VALUE"];
}
$propsHTML = getOrderPropertiesHTML($arProps, $arPropsValues, $LID, $str_USER_ID, $ID, $bVarsFromForm);
}
$tabControl->AddSection("RELATED_PROPS", GetMessage("NEW_ORDER_RELATED_PROPS"));
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:31,代码来源:order_new.php
注:本文中的CSaleOrderProps类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论