Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $rsEl = CIBlockElement::GetList(array("ID" => "ASC"), array("IBLOCK_ID" => $BID, ">ID" => $_REQUEST["lastid"]), false, array("nTopCount" => $limit));
- while ($arEl = $rsEl->Fetch())
- {
- if($arEl["IBLOCK_SECTION_ID"] == 169 || $arEl["IBLOCK_SECTION_ID"] == 170){
- $ar_res = CPrice::GetBasePrice($arEl["EXTERNAL_ID"]);
- $newprice = $ar_res["PRICE"] + $ar_res["PRICE"]*50/100;
- $newprice = number_format($newprice, 2, '.', '');
- #printr($ar_res);
- CPrice::SetBasePrice($ar_res["ID"], $newprice, "RUB");
- $lastID = intval($arEl["ID"]);
- }else{
- $ar_res = CPrice::GetBasePrice($arEl["EXTERNAL_ID"]);
- $newprice = $ar_res["PRICE"] + $ar_res["PRICE"]*30/100;
- $newprice = number_format($newprice, 2, '.', '');
- #printr($ar_res);
- CPrice::SetBasePrice($ar_res["ID"], $newprice, "RUB");
- $lastID = intval($arEl["ID"]);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment