Beispiel #1
0
 protected function _toHtml()
 {
     $html = parent::_toHtml();
     $list = Mage::app()->getLayout()->createBlock('amorderattr/adminhtml_order_attribute_view_list');
     $html = preg_replace('@<div class="entry-edit">(\\s*)<div class="entry-edit-head">(\\s*)(.*?)head-products@', $list->toHtml() . '<div class="entry-edit"><div class="entry-edit-head">$3head-products', $html, 1);
     return $html;
 }
Beispiel #2
0
    /**
     * Prepare html output
     *
     * @return string
     */
    protected function _toHtml()
    {
        $order = $this->getOrder();
        $orderRow = Mage::getModel('bronto_order/queue')->load($order->getId());
        $tid = $orderRow->getBrontoTid();
        $imported = $orderRow->getBrontoImported();
        $deliveryHtml = empty($tid) ? $this->_getNoHtml() : $this->_getYesHtml();
        $importedHtml = empty($imported) ? $this->_getNoHtml() : $this->_getYesHtml();
        $html = parent::_toHtml();
        $html .= <<<SCRIPT
<script>
var orderTable, orderTableRow, orderTableCell;

// Add Delivery Row
// orderTableRow  = orderTable.insertRow(orderTable.rows.length);
// orderTableCell = orderTableRow.insertCell(0);
// orderTableCell.innerHTML = "<label>Associated with Bronto Delivery?</label>";
// orderTableCell = orderTableRow.insertCell(1);
// orderTableCell.innerHTML = "{$deliveryHtml}";

// Add Imported Row
// orderTableRow  = orderTable.insertRow(orderTable.rows.length);
// orderTableCell = orderTableRow.insertCell(0);
// orderTableCell.innerHTML = "<label>Imported into Bronto?</label>";
// orderTableCell = orderTableRow.insertCell(1);
// orderTableCell.innerHTML = "{$importedHtml}";
</script>
SCRIPT;
        return $html;
    }
Beispiel #3
0
 protected function _toHtml()
 {
     $html = parent::_toHtml();
     $attachments = Mage::app()->getLayout()->createBlock('amorderattach/adminhtml_sales_order_view_attachment');
     $html = preg_replace('@<div class="box-left">(\\s*)<!--Billing Address-->(\\s*)<div class="entry-edit">(\\s*)<div class="entry-edit-head">(\\s*)(.*?)head-billing-address@', $attachments->toHtml() . '<div class="box-left"><div class="entry-edit"><div class="entry-edit-head">$5head-billing-address', $html, 1);
     return $html;
 }