public function __construct(OrderInvoice $order_invoice, $smarty) { $this->order_invoice = $order_invoice; $this->order = new Order((int) $this->order_invoice->id_order); $this->smarty = $smarty; // header informations $this->date = Tools::displayDate($order_invoice->date_add); $id_lang = Context::getContext()->language->id; $this->title = HTMLTemplateInvoice::l('Invoice ') . ' #' . Configuration::get('PS_INVOICE_PREFIX', $id_lang, null, (int) $this->order->id_shop) . sprintf('%06d', $order_invoice->number); // footer informations $this->shop = new Shop((int) $this->order->id_shop); }
/** * Returns the template's HTML header * * @return string HTML header */ public function getHeader() { $this->assignCommonHeaderData(); $this->smarty->assign(array('header' => HTMLTemplateInvoice::l('Invoice'))); return $this->smarty->fetch($this->getTemplate('header')); }