- Модуль: sale
- Путь к файлу: ~/bitrix/modules/sale/lib/exchange/entity/orderimport.php
- Класс: BitrixSaleExchangeEntityOrderImport
- Вызов: OrderImport::getProduct
static function getProduct($code)
{
$result = array();
$r = CIBlockElement::GetList(array(),
array("=XML_ID" => $code, "ACTIVE" => "Y", "CHECK_PERMISSIONS" => "Y"),
false,
false,
array("ID", "IBLOCK_ID", "XML_ID", "NAME", "DETAIL_PAGE_URL")
);
if($ar = $r->GetNext())
{
$result = $ar;
$product = CCatalogProduct::GetByID($ar["ID"]);
$result["WEIGHT"] = $product["WEIGHT"];
$result["CATALOG_GROUP_NAME"] = $product["CATALOG_GROUP_NAME"];
$productIBlock = static::getIBlockProduct($ar["IBLOCK_ID"]);
$result["IBLOCK_XML_ID"] = $productIBlock[$ar["IBLOCK_ID"]]["XML_ID"];
}
return $result;
}