Advertisement
Trigub_Ilia

Вывести минимальную цену торговых предложений

Feb 24th, 2018
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.50 KB | None | 0 0
  1. <div class="pricebl">
  2. <?
  3. $intIBlockID = 4;
  4. $mxResult = CCatalogSKU::GetInfoByProductIBlock(
  5. $intIBlockID
  6. );
  7. if (is_array($mxResult))
  8. {
  9.  
  10. $rsOffers = CIBlockElement::GetList(array("PRICE"=>"ASC"),array('IBLOCK_ID' => $mxResult['IBLOCK_ID'], 'PROPERTY_'.$mxResult['SKU_PROPERTY_ID'] => $arElement["ID"]));
  11. while ($arOffer = $rsOffers->GetNext())
  12. {
  13. $ar_price = GetCatalogProductPrice($arOffer["ID"], 1);
  14. echo "<p>от ".$ar_price["PRICE"]." руб. </p>" ;
  15. break;
  16. }
  17. }
  18. ?>
  19. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement