Ejemplo n.º 1
0
 /**
  * Render block html
  *
  * @return string
  */
 protected function _toHtml()
 {
     $this->setTxnIdHtml($this->escapeHtml($this->_txn->getTxnId()));
     $this->setParentTxnIdUrlHtml($this->escapeHtml($this->getUrl('sales/transactions/view', ['txn_id' => $this->_txn->getParentId()])));
     $this->setParentTxnIdHtml($this->escapeHtml($this->_txn->getParentTxnId()));
     $this->setOrderIncrementIdHtml($this->escapeHtml($this->_txn->getOrder()->getIncrementId()));
     $this->setTxnTypeHtml($this->escapeHtml($this->_txn->getTxnType()));
     $this->setOrderIdUrlHtml($this->escapeHtml($this->getUrl('sales/order/view', ['order_id' => $this->_txn->getOrderId()])));
     $this->setIsClosedHtml($this->_txn->getIsClosed() ? __('Yes') : __('No'));
     $createdAt = strtotime($this->_txn->getCreatedAt()) ? $this->formatDate($this->_txn->getCreatedAt(), \IntlDateFormatter::MEDIUM, true) : __('N/A');
     $this->setCreatedAtHtml($this->escapeHtml($createdAt));
     return parent::_toHtml();
 }
Ejemplo n.º 2
0
 /**
  * Render block html
  *
  * @return string
  */
 protected function _toHtml()
 {
     $this->setTxnIdHtml($this->escapeHtml($this->_txn->getTxnId()));
     $this->setParentTxnIdUrlHtml($this->escapeHtml($this->getUrl('sales/transactions/view', array('txn_id' => $this->_txn->getParentId()))));
     $this->setParentTxnIdHtml($this->escapeHtml($this->_txn->getParentTxnId()));
     $this->setOrderIncrementIdHtml($this->escapeHtml($this->_txn->getOrder()->getIncrementId()));
     $this->setTxnTypeHtml($this->escapeHtml($this->_txn->getTxnType()));
     $this->setOrderIdUrlHtml($this->escapeHtml($this->getUrl('sales/order/view', array('order_id' => $this->_txn->getOrderId()))));
     $this->setIsClosedHtml($this->_txn->getIsClosed() ? __('Yes') : __('No'));
     $createdAt = strtotime($this->_txn->getCreatedAt()) ? $this->formatDate($this->_txn->getCreatedAt(), \Magento\Framework\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_MEDIUM, true) : __('N/A');
     $this->setCreatedAtHtml($this->escapeHtml($createdAt));
     return parent::_toHtml();
 }
Ejemplo n.º 3
0
 /**
  * Returns order increment id
  *
  * @param TrasactionModel $transactionModel
  * @return string
  */
 public function getIncrementId(TrasactionModel $transactionModel)
 {
     $order = $transactionModel->getOrder();
     return $order->getIncrementId();
 }