Это строки из класса sale.order.ajax
                  
                  
                  Этим кодом мы получаем данные при заказе для отправки заказа по api
                  
                  
                  
                  
                  
                  $data = array(
                  
                  
                           "number" => (string)$this->order->getId(),
                  
                  
                           "date" => (string)$this->order->getField("DATE_INSERT")->format('c'),
                  
                  
                      "customer" => (string)$property->getPayerName()->getValue(),
                  
                  
                      "phone" => (string)$property->getPhone()->getValue(),
                  
                  
                      "address" => (string)$property->getAddress()->getValue(),
                  
                  
                      "note" => empty($this->order->getField("USER_DESCRIPTION")) ? "" : (string)$this->order->getField("USER_DESCRIPTION"),
                  
                  
                      "lines" => array(),
                  
                  
                           "birthDate" => ''
                  
                  
                  );
                  
                  
                
foreach ($this->order->getPropertyCollection() as $property) { if ($property->getField('CODE') == 'BIRTH_DATE') { $data['birthDate'] = $property->getValue(); } }
Обсуждают сегодня