Получить свойство объекта UMI API + JSON
Для получения свойств в UMI к примеру Время доставки, Дата доставки и т.д.: Дамп объекта:
| 1 | http://site/uobject://10803 | 
Получить свойство объекта:
| 1 | http://site/uobject://10803.delivery_price | 
Для этого создадим в custom.php Вариант 1) UMI API
| 1 2 3 4 5 6 7 |     public function getProp($id, $value) { // получение нужного свойства         $objects = umiObjectsCollection::getInstance();         $res = $objects->getObject($id)->getValue($value);         return $res;     } | 
Вызвать можно как:
| 1 | http://site.ru/udata://custom/getProp/10803/delivery_address | 
| 1 2 3 4 5 6 7 |      public function posTest () {         $objectID = 10803; // ID объекта         $deliveryID = $this->getProp($objectID, 'delivery_address');         $res = $this->getProp($deliveryID, 'house');         return ($res);     } | 
Вариант 2) JSON
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 |      public function posTest () {         $objects = umiObjectsCollection::getInstance();         $orderObj = order::get(10803);         $deliveryID = $orderObj->getValue('delivery_address'); // получаем ID адреса доставки         $discountID = $orderObj->getValue('order_discount_id'); // получаем ID скидки         $getID = file_get_contents("https://site.ru/uobject://$discountID.discount_modificator_id.json");         $objectID = json_decode($getID)->property->value->item->id;         $get = file_get_contents("https://site.ru/uobject://$objectID.proc.json");         $res = json_decode($get)->property->value->value;     } |