Hi guys I am attempting to edit the invoices of magento but I cannot get my custom text to align with the totals on the right. I would like the headings 'important' and 'Pay us by bacs' to be inline with the subtotal heading of the totals.

Result of my efforts thus far

My function code in abstract.php:

public function insertBankInfo(Zend_Pdf_Page $page, $text)
    $page->setFillColor(new Zend_Pdf_Color_Html('#447282'));
    $this->_setFontBold($page, 9);
    $page->drawText($text, 285, $this->y += 34.5, 'UTF-8'); 
    $page->drawText("IMPORTANT:", 35, $this->y, 'UTF-8');
    $this->_setFontRegular($page, 9);
    $text = $this->y -= 15;
    $page->drawText("When remitting your payment, please quote your account number and our INVOICE NUMBER AS SHOWN above", 35, $this->y += 4, 'UTF-8');

My code in invoice.php:

$this->insertBankInfo($page, Mage::helper('sales')->__('Pay US BY BACS'));

In invoice.php I moved the line above the totals:

        $this->insertBankInfo($page, Mage::helper('sales')->__('Pay US BY BACS'));
        $this->insertTotals($page, $invoice);

Then I changed line 662 in abstract.php to :

     $this->y += 12;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.