Answer the question
In order to leave comments, you need to log in
How to get the properties of product offers?
Good afternoon, I don't understand a little how to get the properties of trade offers using the CCatalogSKU::getOffersList method. Yes, I understand that there is documentation, but the cat wept for information there. I have a product with sales offers that have "height" and "width" properties, how can I get an array with the values of the properties of sales offers for this product? It is assumed that we receive information from the product card, there is a product ID and its other properties....
$arSKU = CCatalogSKU::getOffersList($arResult[ID], 0, array('ACTIVE' => 'Y'), array('NAME'), array('HEIGHT', 'WIDTH'));
array(1) =>
[96] =>
array(160) =>
[208] =>
array(3) =>
[ID] =>
integer(208)
[IBLOCK_ID] =>
integer(8)
[PROPERTIES] =>
array(0) =>
[209] =>
array(3) =>
[ID] =>
integer(209)
[IBLOCK_ID] =>
integer(8)
[PROPERTIES] =>
array(0) =>
Answer the question
In order to leave comments, you need to log in
Do you know ID? Forward https://dev.1c-bitrix.ru/api_help/iblock/classes/c... via result_modifier
In the last propertyFilter array, you need to write an array with the "CODE" key, that is, you get:
$arSKU = CCatalogSKU::getOffersList($arResult[ID], 0, array('ACTIVE' => 'Y'), array('NAME' ), array("CODE"=>array('HEIGHT', 'WIDTH')));
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question