P
P
Prog-Time2021-05-24 10:15:03
1C-Bitrix
Prog-Time, 2021-05-24 10:15:03

How to get order properties?

How to display order properties by its ID?

I need to display product property values ​​from the "Properties" tab

60ab526fcceb9664440623.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
PetrPo, 2021-05-24
@Prog-Time

\Bitrix\Main\Loader::includeModule('sale');

$orderId = 10;
$order = \Bitrix\Sale\Order::load($orderId);

if(!empty($order)) {
  $basket = $order->getBasket();

  foreach($basket->getBasketItems() as $basketItem) {
    $basketPropertyCollection = $basketItem->getPropertyCollection();
    print_r($basketPropertyCollection->getPropertyValues());
  }
}

I
Ilya, 2021-05-24
@rpsv

Option 1: Gets the product ID via PRODUCT_ID, then upload all the necessary information from the infoblock.
Option 2: If you need exactly the properties of the basket, see BasketPropTable
UPD: highlighted the answer options

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question