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


PHP CCatalogGroup::GetBaseGroup方法代码示例

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


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

示例1: getSelectedPriceTypeId

 public static function getSelectedPriceTypeId()
 {
     if (is_null(self::$selectedPriceTypeId)) {
         $priceTypeId = intval(COption::GetOptionInt('crm', 'selected_catalog_group_id', 0));
         if ($priceTypeId < 1) {
             $arBaseCatalogGroup = CCatalogGroup::GetBaseGroup();
             $priceTypeId = intval($arBaseCatalogGroup['ID']);
         }
         self::$selectedPriceTypeId = $priceTypeId;
     }
     return self::$selectedPriceTypeId;
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:12,代码来源:crm_product.php

示例2: ReCountFromBase

	function ReCountFromBase(&$arFields, &$boolBase)
	{
		$arBaseGroup = CCatalogGroup::GetBaseGroup();
		if (!empty($arBaseGroup))
		{
			if ($arFields['CATALOG_GROUP_ID'] == $arBaseGroup['ID'])
			{
				$boolBase = true;
			}
			else
			{
				if (!empty($arFields['EXTRA_ID']) && intval($arFields['EXTRA_ID']) > 0)
				{
					$arExtra = CExtra::GetByID($arFields['EXTRA_ID']);
					if (!empty($arExtra))
					{
						$arFilter = array('PRODUCT_ID' => $arFields['PRODUCT_ID'],'CATALOG_GROUP_ID' => $arBaseGroup['ID']);
						if (isset($arFields['QUANTITY_FROM']))
							$arFilter['QUANTITY_FROM'] = $arFields['QUANTITY_FROM'];
						if (isset($arFields['QUANTITY_TO']))
							$arFilter['QUANTITY_TO'] = $arFields['QUANTITY_TO'];
						$rsBasePrices = CPrice::GetListEx(
							array("QUANTITY_FROM" => "ASC", "QUANTITY_TO" => "ASC"),
							$arFilter,
							false,
							array('nTopCount' => 1),
							array('PRICE','CURRENCY')
						);
						if ($arBasePrice = $rsBasePrices->Fetch())
						{
							$arFields['CURRENCY'] = $arBasePrice['CURRENCY'];
							$arFields['PRICE'] = RoundEx($arBasePrice["PRICE"] * (1 + DoubleVal($arExtra["PERCENTAGE"])/100), CATALOG_VALUE_PRECISION);
						}
						else
						{
							$arFields['EXTRA_ID'] = 0;
						}
					}
					else
					{
						$arFields['EXTRA_ID'] = 0;
					}
				}
			}
		}
	}
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:46,代码来源:price.php

示例3: GetMessage

            $isDisabled = " disabled";
        }
        echo CCurrency::SelectBox("CAT_PURCHASING_CURRENCY", $arBaseProduct['PURCHASING_CURRENCY'], "", true, "", "id='CAT_PURCHASING_CURRENCY' {$isDisabled}");
        ?>
</td>
		</tr>
	<?php 
    }
    ?>
	<tr id="tr_BASE_PRICE" style="display: <?php 
    echo $bUseExtendedPrice ? 'none' : 'table-row';
    ?>
;">
		<td width="40%">
	<?php 
    $arBaseGroup = CCatalogGroup::GetBaseGroup();
    $arBasePrice = CPrice::GetBasePrice($PRODUCT_ID, $arPriceBoundaries[0]["FROM"], $arPriceBoundaries[0]["TO"]);
    echo GetMessage("BASE_PRICE");
    ?>
 (<?php 
    echo GetMessage('C2IT_PRICE_TYPE');
    ?>
 "<?php 
    echo htmlspecialcharsbx(!empty($arBaseGroup['NAME_LANG']) ? $arBaseGroup['NAME_LANG'] : $arBaseGroup["NAME"]);
    ?>
"):
		</td>
		<td width="60%">
<script type="text/javascript">
var arExtra = [], arExtraPrc = [];
	<?php 
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:product_edit.php

示例4: IncludeModuleLangFile

<?php

IncludeModuleLangFile(__FILE__);
$profileTypes['avito_commercereal'] = array("CODE" => 'avito_commercereal', "NAME" => GetMessage("ACRIT_EXPORTPRO_AVITO_COMMERCEREAL_NAME"), "DESCRIPTION" => GetMessage("ACRIT_EXPORTPRO_PODDERJIVAETSA_ANDEK"), "REG" => "http://market.yandex.ru/", "HELP" => "http://help.yandex.ru/partnermarket/export/feed.xml", "FIELDS" => array(array("CODE" => "Id", "NAME" => GetMessage("ACRIT_EXPORTPRO_AVITO_COMMERCEREAL_FIELD_ID"), "VALUE" => "ID", "REQUIRED" => 'Y', "TYPE" => 'field'), array("CODE" => "Category", "NAME" => GetMessage("ACRIT_EXPORTPRO_AVITO_COMMERCEREAL_FIELD_CATEGORY"), "REQUIRED" => 'Y', "TYPE" => 'const', "CONTVALUE_TRUE" => GetMessage('ACRIT_EXPORTPRO_AVITO_COMMERCEREAL_CATEGORY_VALUE')), array("CODE" => "DateBegin", "NAME" => GetMessage("ACRIT_EXPORTPRO_AVITO_COMMERCEREAL_FIELD_DATEBEGIN")), array("CODE" => "DateEnd", "NAME" => GetMessage("ACRIT_EXPORTPRO_AVITO_COMMERCEREAL_FIELD_DATEEND")), array("CODE" => "OperationType", "NAME" => GetMessage("ACRIT_EXPORTPRO_AVITO_COMMERCEREAL_FIELD_OPERATIONTYPE"), "REQUIRED" => 'Y'), array("CODE" => "BuildingClass", "NAME" => GetMessage("ACRIT_EXPORTPRO_AVITO_COMMERCEREAL_FIELD_BUILDINGCLASS")), array("CODE" => "BusinessForSale", "NAME" => GetMessage("ACRIT_EXPORTPRO_AVITO_COMMERCEREAL_FIELD_BUSINESSFORSALE")), array("CODE" => "Region", "NAME" => GetMessage("ACRIT_EXPORTPRO_AVITO_COMMERCEREAL_FIELD_REGION")), array("CODE" => "City", "NAME" => GetMessage("ACRIT_EXPORTPRO_AVITO_COMMERCEREAL_FIELD_CITY"), "REQUIRED" => 'Y'), array("CODE" => "Locality", "NAME" => GetMessage("ACRIT_EXPORTPRO_AVITO_COMMERCEREAL_FIELD_LOCALITY")), array("CODE" => "Street", "NAME" => GetMessage("ACRIT_EXPORTPRO_AVITO_COMMERCEREAL_FIELD_STREET")), array("CODE" => "ObjectType", "NAME" => GetMessage("ACRIT_EXPORTPRO_AVITO_COMMERCEREAL_FIELD_OBJECTTYPE"), "REQUIRED" => 'Y'), array("CODE" => "Square", "NAME" => GetMessage("ACRIT_EXPORTPRO_AVITO_COMMERCEREAL_FIELD_SQUARE"), "REQUIRED" => 'Y'), array("CODE" => "Subway", "NAME" => GetMessage("ACRIT_EXPORTPRO_AVITO_COMMERCEREAL_FIELD_SUBWAY")), array("CODE" => "Description", "NAME" => GetMessage("ACRIT_EXPORTPRO_AVITO_COMMERCEREAL_FIELD_DESCRIPTION")), array("CODE" => "Price", "NAME" => GetMessage("ACRIT_EXPORTPRO_AVITO_COMMERCEREAL_FIELD_PRICE"), "TYPE" => "const", "CONTVALUE_TRUE" => "0"), array("CODE" => "ContactPhone", "NAME" => GetMessage("ACRIT_EXPORTPRO_AVITO_COMMERCEREAL_FIELD_CONTACTPHONE")), array("CODE" => "AdStatus", "NAME" => GetMessage("ACRIT_EXPORTPRO_AVITO_COMMERCEREAL_FIELD_ADSTATUS")), array("CODE" => "Image", "NAME" => GetMessage("ACRIT_EXPORTPRO_AVITO_COMMERCEREAL_FIELD_IMAGE"))), "FORMAT" => '<?xml version="1.0"?>
<Ads target="Avito.ru" formatVersion="1">
    #ITEMS#
</Ads>', "DATEFORMAT" => "Y-m-d");
$bCatalog = false;
if (CModule::IncludeModule("catalog")) {
    $arBasePrice = CCatalogGroup::GetBaseGroup();
    $basePriceCode = "CATALOG-PRICE_" . $arBasePrice["ID"];
    $basePriceCodeWithDiscount = "CATALOG-PRICE_" . $arBasePrice["ID"] . "_WD";
    $bCatalog = true;
    $profileTypes['avito_commercereal']["FIELDS"][15] = array("CODE" => "Price", "NAME" => GetMessage("ACRIT_EXPORTPRO_AVITO_COMMERCEREAL_FIELD_PRICE"), "TYPE" => "field", "VALUE" => $basePriceCode);
}
$profileTypes['avito_commercereal']['PORTAL_REQUIREMENTS'] = GetMessage('ACRIT_EXPORTPRO_TYPE_AVITO_COMMERCEREAL_PORTAL_REQUIREMENTS');
$profileTypes['avito_commercereal']['EXAMPLE'] = GetMessage('ACRIT_EXPORTPRO_TYPE_AVITO_COMMERCEREAL_EXAMPLE');
$profileTypes['avito_commercereal']['CURRENCIES'] = "";
$profileTypes['avito_commercereal']['SECTIONS'] = "";
$profileTypes['avito_commercereal']['ITEMS_FORMAT'] = "\n<Ad>\n    <Id>#Id#</Id>\n    <Category>#Category#</Category>\n    <DateBegin>#DateBegin#</DateBegin>\n    <DateEnd>#DateEnd#</DateEnd>\n    <OperationType>#OperationType#</OperationType>\n    <BuildingClass>#BuildingClass#</BuildingClass>\n    <BusinessForSale>#BusinessForSale#</BusinessForSale>\n    <Region>#Region#</Region>\n    <City>#City#</City>\n    <Locality>#Locality#</Locality>\n    <Street>#Street#</Street>\n    <Square>#Square#</Square>\n    <ObjectType>#ObjectType#</ObjectType>\n    <Subway>#Subway#</Subway>\n    <Description>#Description#</Description>\n    <Price>#Price#</Price>\n    <ContactPhone>#ContactPhone#</ContactPhone>\n    <AdStatus>#AdStatus#</AdStatus>\n    <Images>\n        <Image url=\"#SITE_URL##Image#\"></Image>\n    </Images>\n</Ad>\n";
$profileTypes['avito_commercereal']['LOCATION'] = array('avito' => array('name' => GetMessage("ACRIT_EXPORTPRO_AVITO"), 'sub' => array()));
开发者ID:akniyev,项目名称:itprom_dobrohost,代码行数:21,代码来源:avito_commercereal.php

示例5: foreach

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
foreach ($arResult as $key => $val) {
    $img = "";
    if ($val["DETAIL_PICTURE"] > 0) {
        $img = $val["DETAIL_PICTURE"];
    } elseif ($val["PREVIEW_PICTURE"] > 0) {
        $img = $val["PREVIEW_PICTURE"];
    }
    $file = CFile::ResizeImageGet($img, array('width' => $arParams["VIEWED_IMG_WIDTH"], 'height' => $arParams["VIEWED_IMG_HEIGHT"]), BX_RESIZE_IMAGE_PROPORTIONAL, true);
    $val["PICTURE"] = $file;
    $arResult[$key] = $val;
}
if (CModule::IncludeModule("catalog")) {
    $basePriceType = CCatalogGroup::GetBaseGroup();
    $basePriceTypeName = $basePriceType["NAME"];
}
/*SKU -- */
foreach ($arResult as $cell => $arElement) {
    if (is_array($arElement["OFFERS"]) && !empty($arElement["OFFERS"])) {
        $minItemPrice = 0;
        $minItemPriceFormat = "";
        foreach ($arElement["OFFERS"] as $arOffer) {
            foreach ($arOffer["PRICES"] as $code => $arPrice) {
                if ($arPrice["CAN_ACCESS"]) {
                    if ($arPrice["DISCOUNT_VALUE"] < $arPrice["VALUE"]) {
                        $minOfferPrice = $arPrice["DISCOUNT_VALUE"];
                        $minOfferPriceFormat = $arPrice["PRINT_DISCOUNT_VALUE"];
                    } else {
                        $minOfferPrice = $arPrice["VALUE"];
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:result_modifier.php

示例6: isBase

 private function isBase($arFields)
 {
     $baseGroup = CCatalogGroup::GetBaseGroup();
     return $arFields['CATALOG_GROUP_ID'] == $baseGroup['ID'];
 }
开发者ID:ASDAFF,项目名称:module.markup,代码行数:5,代码来源:CQuetzalMarkupPriceUpdate.php

示例7: installExternalEntities


//.........这里部分代码省略.........
         $i = 0;
         while ($arUF = $dbRes->Fetch()) {
             if ($i++ === 0) {
                 $maxUFSort = intval($arUF['SORT']);
             }
             if ($arUF['FIELD_NAME'] === 'UF_QUOTE_ID') {
                 $bFieldExists = true;
                 break;
             }
         }
         unset($dbRes, $arUF, $i);
         if (!$bFieldExists) {
             $arOrderUserField = array('ENTITY_ID' => 'ORDER', 'FIELD_NAME' => 'UF_QUOTE_ID', 'USER_TYPE_ID' => 'integer', 'XML_ID' => 'uf_quote_id', 'SORT' => strval($maxUFSort + 10), 'MULTIPLE' => null, 'MANDATORY' => null, 'SHOW_FILTER' => 'N', 'SHOW_IN_LIST' => 'N', 'EDIT_IN_LIST' => 'N', 'IS_SEARCHABLE' => null, 'SETTINGS' => array('DEFAULT_VALUE' => null, 'SIZE' => '', 'ROWS' => '1', 'MIN_LENGTH' => '0', 'MAX_LENGTH' => '0', 'REGEXP' => ''), 'EDIT_FORM_LABEL' => array('ru' => '', 'en' => ''), 'LIST_COLUMN_LABEL' => array('ru' => '', 'en' => ''), 'LIST_FILTER_LABEL' => array('ru' => '', 'en' => ''), 'ERROR_MESSAGE' => array('ru' => '', 'en' => ''), 'HELP_MESSAGE' => array('ru' => '', 'en' => ''));
             unset($maxUFSort);
             $userFieldId = $obUserField->Add($arOrderUserField);
             if ($userFieldId <= 0) {
                 $errMsg[] = str_replace("#FIELD_NAME#", $arOrderUserField['FIELD_NAME'], GetMessage('CRM_CANT_ADD_USER_FIELD'));
             }
             unset($userFieldId, $obUserField, $arOrderUserField);
         }
         if (empty($errMsg)) {
             COption::SetOptionString('crm', '~CRM_INVOICE_UF_QUOTE_ID_14_1_13', 'Y');
             return true;
         } else {
             $errString = implode('<br>', $errMsg);
             ShowError($errString);
             return false;
         }
     }
     if (COption::GetOptionString('crm', '~CRM_INVOICE_DISABLE_SALE_EVENTS_12_5_19', 'N') === 'Y') {
         if (!CModule::IncludeModule('catalog')) {
             return false;
         }
         $arBaseCatalogGroup = CCatalogGroup::GetBaseGroup();
         $priceTypeId = intval($arBaseCatalogGroup['ID']);
         COption::SetOptionInt('crm', 'selected_catalog_group_id', $priceTypeId);
         unset($arBaseCatalogGroup, $priceTypeId);
         COption::SetOptionString('crm', '~CRM_EXCH1C_REWRITEDEFCATGRP_12_5_20', 'Y');
         LocalRedirect($GLOBALS['APPLICATION']->GetCurPageParam());
         return true;
     }
     if (COption::GetOptionString('crm', '~CRM_INVOICE_EXCH1C_UPDATE_12_5_17', 'N') === 'Y') {
         $pref = COption::GetOptionString('sale', '1C_SALE_ACCOUNT_NUMBER_SHOP_PREFIX', '');
         if (strlen(strval($pref)) < 1) {
             COption::SetOptionString('sale', '1C_SALE_ACCOUNT_NUMBER_SHOP_PREFIX', 'CRM_');
         }
         COption::SetOptionString('crm', '~CRM_INVOICE_EXCH1C_UPDATE_12_5_19', 'Y');
         self::installDisableSaleEvents();
         COption::SetOptionString('crm', '~CRM_INVOICE_DISABLE_SALE_EVENTS_12_5_19', 'Y');
         if (!CModule::IncludeModule('catalog')) {
             return false;
         }
         $arBaseCatalogGroup = CCatalogGroup::GetBaseGroup();
         $priceTypeId = intval($arBaseCatalogGroup['ID']);
         COption::SetOptionInt('crm', 'selected_catalog_group_id', $priceTypeId);
         unset($arBaseCatalogGroup, $priceTypeId);
         COption::SetOptionString('crm', '~CRM_EXCH1C_REWRITEDEFCATGRP_12_5_20', 'Y');
         LocalRedirect($GLOBALS['APPLICATION']->GetCurPageParam());
         return true;
     }
     if (COption::GetOptionString('crm', '~CRM_INVOICE_INSTALL_12_5_7', 'N') === 'Y') {
         // fix 40279
         if (COption::GetOptionString('crm', '~CRM_INVOICE_UPDATE_12_5_14', 'N') !== 'Y') {
             try {
                 if (CModule::IncludeModule('sale')) {
                     global $DB;
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:67,代码来源:crm_invoice.php


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