Answer the question
In order to leave comments, you need to log in
How to assign a value to a variable?
<?php
if (CModule::IncludeModule("sale"))
{
$arBasketItems = array();
$dbBasketItems = CSaleBasket::GetList(
array("NAME" => "ASC","ID" => "ASC"),
array("FUSER_ID" => CSaleBasket::GetBasketUserID(),
"LID" => SITE_ID, "ORDER_ID" => "NULL"),
false,
false,
array("ID","MODULE","PRODUCT_ID","QUANTITY","CAN_BUY","PRICE"));
while ($arItems=$dbBasketItems->Fetch())
{
$arItems=CSaleBasket::GetByID($arItems["ID"]);
$arBasketItems[]=$arItems;
$cart_num+=$arItems['QUANTITY'];
$cart_sum+=$arItems['PRICE']*$arItems['QUANTITY'];
print_r ($arItems["PRODUCT_ID"].'-');
$rsElement = CIBlockElement::GetList(array(), array('ID' =>
$product_id), false, false, array('ID', 'IBLOCK_SECTION_ID'));
if($arElement = $rsElement->Fetch())
{
echo $arElement['IBLOCK_SECTION_ID'];
$intElementID = $arItems["PRODUCT_ID"]; // ID предложения
$mxResult = CCatalogSku::GetProductInfo(
$intElementID
);
if (is_array($mxResult))
{
$res = CIBlockElement::GetByID($mxResult['ID']);
if($ar_res = $res->GetNext())
$res = CIBlockSection::GetByID($ar_res['IBLOCK_SECTION_ID']);
if($ar_res = $res->GetNext())
// echo $ar_res['IBLOCK_SECTION_ID'];
$resSection = CIBlockSection::GetNavChain(false, $ar_res['IBLOCK_SECTION_ID']);
$arSection = $resSection->GetNext() ;
$array_sections = $arSection;
echo ($arSection[ID]."</br>");
}
else
{
$res = CIBlockElement::GetByID($arItems["PRODUCT_ID"]);
if($ar_res = $res->GetNext())
$res = CIBlockSection::GetByID($ar_res['IBLOCK_SECTION_ID']);
if($ar_res = $res->GetNext())
// echo $ar_res['IBLOCK_SECTION_ID'];
$resSection = CIBlockSection::GetNavChain(false, $ar_res['IBLOCK_SECTION_ID']);
$arSection = $resSection->GetNext() ;
$array_sections = $arSection;
echo ($arSection[ID]."</br>");}
}
};
}
?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question