Example #1
0
 protected function _drawHeader(Zend_Pdf_Page $page)
 {
     if (!Mage::getStoreConfig('vc_giftwrap/general/enable')) {
         return parent::_drawHeader($page);
     }
     $this->_setFontRegular($page, 10);
     $page->setFillColor(new Zend_Pdf_Color_RGB(0.93, 0.92, 0.92));
     $page->setLineColor(new Zend_Pdf_Color_GrayScale(0.5));
     $page->setLineWidth(0.5);
     $page->drawRectangle(25, $this->y, 570, $this->y - 30);
     $this->y -= 10;
     $page->setFillColor(new Zend_Pdf_Color_RGB(0, 0, 0));
     //columns headers
     $lines[0][] = array('text' => Mage::helper('sales')->__('Products'), 'feed' => 35);
     $lines[0][] = array('text' => Mage::helper('core/string')->str_split(Mage::helper('sales')->__('SKU'), 12, true, true), 'feed' => 255, 'align' => 'right');
     $lines[0][] = array('text' => Mage::helper('core/string')->str_split(Mage::helper('sales')->__('Total (ex)'), 12, true, true), 'feed' => 330, 'align' => 'right');
     $lines[0][] = array('text' => Mage::helper('core/string')->str_split(Mage::helper('sales')->__('Discount'), 12, true, true), 'feed' => 380, 'align' => 'right');
     $lines[0][] = array('text' => Mage::helper('core/string')->str_split(Mage::helper('sales')->__('Qty'), 12, true, true), 'feed' => 445, 'align' => 'right');
     $lines[0][] = array('text' => Mage::helper('core/string')->str_split(Mage::helper('sales')->__('Tax'), 12, true, true), 'feed' => 495, 'align' => 'right');
     $lines[0][] = array('text' => Mage::helper('core/string')->str_split(Mage::helper('sales')->__('Total (inc)'), 12, true, true), 'feed' => 565, 'align' => 'right');
     $lineBlock = array('lines' => $lines, 'height' => 10);
     $this->drawLineBlocks($page, array($lineBlock), array('table_header' => true));
     $page->setFillColor(new Zend_Pdf_Color_GrayScale(0));
     $this->y -= 20;
 }
Example #2
0
 protected function _drawHeader(Zend_Pdf_Page $page)
 {
     if (!Mage::getStoreConfig('vc_giftwrap/general/enable')) {
         return parent::_drawHeader($page);
     }
     /* Add table head */
     $this->_setFontRegular($page, 10);
     $page->setFillColor(new Zend_Pdf_Color_RGB(0.93, 0.92, 0.92));
     $page->setLineColor(new Zend_Pdf_Color_GrayScale(0.5));
     $page->setLineWidth(0.5);
     $page->drawRectangle(25, $this->y, 570, $this->y - 15);
     $this->y -= 10;
     $page->setFillColor(new Zend_Pdf_Color_RGB(0, 0, 0));
     //columns headers
     $lines[0][] = array('text' => Mage::helper('sales')->__('Products'), 'feed' => 35);
     $lines[0][] = array('text' => Mage::helper('sales')->__('SKU'), 'feed' => 290, 'align' => 'right');
     $lines[0][] = array('text' => Mage::helper('sales')->__('Qty'), 'feed' => 435, 'align' => 'right');
     $lines[0][] = array('text' => Mage::helper('sales')->__('Price'), 'feed' => 360, 'align' => 'right');
     $lines[0][] = array('text' => Mage::helper('sales')->__('Tax'), 'feed' => 495, 'align' => 'right');
     $lines[0][] = array('text' => Mage::helper('sales')->__('Subtotal'), 'feed' => 565, 'align' => 'right');
     $lineBlock = array('lines' => $lines, 'height' => 5);
     $this->drawLineBlocks($page, array($lineBlock), array('table_header' => true));
     $page->setFillColor(new Zend_Pdf_Color_GrayScale(0));
     $this->y -= 20;
 }