Mage_Sales_Model_Order_Pdf_Items_Shipment_Default Class Reference

Inheritance diagram for Mage_Sales_Model_Order_Pdf_Items_Shipment_Default:

Mage_Sales_Model_Order_Pdf_Items_Abstract Mage_Core_Model_Abstract Varien_Object

List of all members.

Public Member Functions

 draw ()


Detailed Description

Definition at line 35 of file Default.php.


Member Function Documentation

draw (  ) 

Draw item line

Reimplemented from Mage_Sales_Model_Order_Pdf_Items_Abstract.

Definition at line 41 of file Default.php.

00042     {
00043         $order  = $this->getOrder();
00044         $item   = $this->getItem();
00045         $pdf    = $this->getPdf();
00046         $page   = $this->getPage();
00047         $lines  = array();
00048 
00049         // draw Product name
00050         $lines[0] = array(array(
00051             'text' => Mage::helper('core/string')->str_split($item->getName(), 60, true, true),
00052             'feed' => 60,
00053         ));
00054 
00055         // draw QTY
00056         $lines[0][] = array(
00057             'text'  => $item->getQty()*1,
00058             'feed'  => 35
00059         );
00060 
00061         if ($options = $this->getItemOptions()) {
00062             foreach ($options as $option) {
00063                 // draw options label
00064                 $lines[][] = array(
00065                     'text' => Mage::helper('core/string')->str_split(strip_tags($option['label']), 60, false, true),
00066                     'font' => 'italic',
00067                     'feed' => 60
00068                 );
00069                 // draw options value
00070                 if ($option['value']) {
00071                     $_printValue = isset($option['print_value']) ? $option['print_value'] : strip_tags($option['value']);
00072                     $values = explode(', ', $_printValue);
00073                     foreach ($values as $value) {
00074                         $lines[][] = array(
00075                             'text' => Mage::helper('core/string')->str_split($value, 55, true, true),
00076                             'feed' => 65
00077                         );
00078                     }
00079                 }
00080             }
00081         }
00082 
00083         // draw SKU
00084         $lines[0][] = array(
00085             'text'  => Mage::helper('core/string')->str_split($this->getSku($item), 25),
00086             'feed'  => 440
00087         );
00088 
00089         $lineBlock = array(
00090             'lines'  => $lines,
00091             'height' => 10
00092         );
00093 
00094         $page = $pdf->drawLineBlocks($page, array($lineBlock), array('table_header' => true));
00095         $this->setPage($page);
00096     }


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:24:48 2009 for Magento by  doxygen 1.5.8