Код |
---|
function GetItemPrices($IBLOCK_ID, $arCatalogPrices, $arItem, $bVATInclude = true){ ... return $arPrices; } |
Код |
---|
<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();?> <? if(!CModule::IncludeModule("iblock")) return; $arOrder = Array("NAME"=>"ASC"); $arFilter = Array("IBLOCK_ID"=>27,"ID"=>6631); $arGroupBy = false; $arNavStartParams = false; $arSelectedFields = false; $itemList = CIBlockElement::GetList($arOrder,$arFilter,$arGroupBy,$arNavStartParams,$arSelectedFields); while($item = $itemList->GetNextElement()) : $prop['INGREDIENTS'] = $item->GetProperty("INGREDIENTS"); $prop['NOMEN'] = $item->GetProperty("CML2_TRAITS"); $prop['SEC_SITE'] = $item->GetProperty("SEC_SITE"); $prop['PDF'] = $item->GetProperty("PDF"); $prop['FORMAT'] = $item->GetProperty("FORMAT"); $item = $item->GetFields(); $item["PREVIEW_PICTURE"] = CFile::GetFileArray($item["PREVIEW_PICTURE"]); $item["DETAIL_PICTURE"] = CFile::GetFileArray($item["DETAIL_PICTURE"]); //============================================== $arParams["PRICE_VAT_INCLUDE"] = $arParams["PRICE_VAT_INCLUDE"] !== "N"; $item["PRICES_CAT"] = CIBlockPriceTools::GetCatalogPrices(27, $arParams["PRICE_CODE"]); $item["PRICES"] = CIBlockPriceTools::GetItemPrices(27, $item["PRICES_CAT"], $item, $arParams['PRICE_VAT_INCLUDE']); echo "<pre>"; print_r($item); echo "</pre>"; break; //============================================== |
Цитата |
---|
$prices = CIBlockPriceTools::GetCatalogPrices(1, array(0 => "BASE", тут типы цен..)); foreach($prices as $key => $value) { $arSelect[] = $value["SELECT"]; $arFilter["CATALOG_SHOP_QUANTITY_".$value["ID"]] = $arParams["SHOW_PRICE_COUNT"]; } |