Asperience_Printorderline - Version 0.1.6

Version Notes

If you have ideas for improvements or find bugs, please send them to Jean-Sébastien Hederer at contact@asperience.fr, with Asperience_Printorderline as part of the subject line.

Download this release

Release Info

Developer Jean-Sébastien Hederer
Extension Asperience_Printorderline
Version 0.1.6
Comparing to
See all releases


Code changes from version 0.1.5 to 0.1.6

app/code/community/Asperience/Printorderline/Model/Observer.php CHANGED
@@ -17,7 +17,7 @@ class Asperience_Printorderline_Model_Observer
17
  if ($massBlock) {
18
  $massBlock->addItem('pdforders_order', array(
19
  'label'=> Mage::helper('printorderline')->__('Print order lines'),
20
- 'url' => Mage::getUrl('printorderline/order/pdforders', array('_secure'=>true)),
21
  ));
22
  }
23
  }
17
  if ($massBlock) {
18
  $massBlock->addItem('pdforders_order', array(
19
  'label'=> Mage::helper('printorderline')->__('Print order lines'),
20
+ 'url' => Mage::helper('adminhtml')->getUrl('printorderline/order/pdforders', array('_secure'=>true)),
21
  ));
22
  }
23
  }
app/code/community/Asperience/Printorderline/Model/Order/Pdf/Order.php CHANGED
@@ -35,10 +35,10 @@ class Asperience_Printorderline_Model_Order_Pdf_Order extends Mage_Sales_Model_O
35
  $this->y -=10;
36
  $page->setFillColor(new Zend_Pdf_Color_GrayScale(0));
37
  $page->drawText(Mage::helper('printorderline')->__('Order'), 50, $this->y, 'UTF-8');
38
- $page->drawText(Mage::helper('printorderline')->__('Bill to Name'), 160, $this->y, 'UTF-8');
39
- $page->drawText(Mage::helper('printorderline')->__('Ship to Name'), 330, $this->y, 'UTF-8');
40
- $page->drawText(Mage::helper('printorderline')->__('Payment/Shipping Method'), 500, $this->y, 'UTF-8');
41
- $page->drawText(Mage::helper('printorderline')->__('Total'), 680, $this->y, 'UTF-8');
42
 
43
 
44
  foreach ($orders as $order) {
@@ -48,7 +48,7 @@ class Asperience_Printorderline_Model_Order_Pdf_Order extends Mage_Sales_Model_O
48
  $lgMaxAdd = 50;
49
  $lgMaxMet = 50;
50
 
51
- //Méthode de Paiement
52
  $paymentInfo = Mage::helper('payment')->getInfoBlock($order->getPayment())
53
  ->setIsSecureMode(true)
54
  ->toPdf();
@@ -56,18 +56,18 @@ class Asperience_Printorderline_Model_Order_Pdf_Order extends Mage_Sales_Model_O
56
  $payment = wordwrap($payment, $lgMaxMet, "|\n", 1);
57
  $payment = explode('|', $payment);
58
 
59
- //Méthode de livraison
60
  $ShippingDesc = $order->getShippingDescription();
61
  $ShippingDesc = wordwrap($ShippingDesc, $lgMaxMet, "|\n", 1);
62
  $ShippingDesc = explode('|', $ShippingDesc);
63
 
64
 
65
- //info facturation
66
  $BillingCpn = $order->getBillingAddress()->getCompany();
67
  $BillingCpn = wordwrap($BillingCpn, $lgMaxAdd, "|\n", 1);
68
  $BillingCpn = explode('|', $BillingCpn);
69
 
70
- //info livraison
71
  $ShippingCpn = $order->getShippingAddress()->getCompany();
72
  $ShippingCpn = wordwrap($ShippingCpn, $lgMaxAdd, "|\n", 1);
73
  $ShippingCpn = explode('|', $ShippingCpn);
@@ -149,10 +149,10 @@ class Asperience_Printorderline_Model_Order_Pdf_Order extends Mage_Sales_Model_O
149
  $this->y -=10;
150
  $page->setFillColor(new Zend_Pdf_Color_GrayScale(0));
151
  $page->drawText(Mage::helper('printorderline')->__('Order'), 50, $this->y, 'UTF-8');
152
- $page->drawText(Mage::helper('printorderline')->__('Bill to Name'), 160, $this->y, 'UTF-8');
153
- $page->drawText(Mage::helper('printorderline')->__('Ship to Name'), 330, $this->y, 'UTF-8');
154
- $page->drawText(Mage::helper('printorderline')->__('Méthode de Paiement et de Livraison'), 500, $this->y, 'UTF-8');
155
- $page->drawText(Mage::helper('printorderline')->__('Total'), 680, $this->y, 'UTF-8');
156
  }
157
  }
158
 
35
  $this->y -=10;
36
  $page->setFillColor(new Zend_Pdf_Color_GrayScale(0));
37
  $page->drawText(Mage::helper('printorderline')->__('Order'), 50, $this->y, 'UTF-8');
38
+ $page->drawText(Mage::helper('printorderline')->__('Bill to informations'), 160, $this->y, 'UTF-8');
39
+ $page->drawText(Mage::helper('printorderline')->__('Ship to informations'), 330, $this->y, 'UTF-8');
40
+ $page->drawText(Mage::helper('printorderline')->__('Shipping and billing methods'), 500, $this->y, 'UTF-8');
41
+ $page->drawText(Mage::helper('printorderline')->__('Totals'), 680, $this->y, 'UTF-8');
42
 
43
 
44
  foreach ($orders as $order) {
48
  $lgMaxAdd = 50;
49
  $lgMaxMet = 50;
50
 
51
+ //Payment method
52
  $paymentInfo = Mage::helper('payment')->getInfoBlock($order->getPayment())
53
  ->setIsSecureMode(true)
54
  ->toPdf();
56
  $payment = wordwrap($payment, $lgMaxMet, "|\n", 1);
57
  $payment = explode('|', $payment);
58
 
59
+ //Shipping description
60
  $ShippingDesc = $order->getShippingDescription();
61
  $ShippingDesc = wordwrap($ShippingDesc, $lgMaxMet, "|\n", 1);
62
  $ShippingDesc = explode('|', $ShippingDesc);
63
 
64
 
65
+ //Billing informations
66
  $BillingCpn = $order->getBillingAddress()->getCompany();
67
  $BillingCpn = wordwrap($BillingCpn, $lgMaxAdd, "|\n", 1);
68
  $BillingCpn = explode('|', $BillingCpn);
69
 
70
+ //Shipping informations
71
  $ShippingCpn = $order->getShippingAddress()->getCompany();
72
  $ShippingCpn = wordwrap($ShippingCpn, $lgMaxAdd, "|\n", 1);
73
  $ShippingCpn = explode('|', $ShippingCpn);
149
  $this->y -=10;
150
  $page->setFillColor(new Zend_Pdf_Color_GrayScale(0));
151
  $page->drawText(Mage::helper('printorderline')->__('Order'), 50, $this->y, 'UTF-8');
152
+ $page->drawText(Mage::helper('printorderline')->__('Bill to informations'), 160, $this->y, 'UTF-8');
153
+ $page->drawText(Mage::helper('printorderline')->__('Ship to informations'), 330, $this->y, 'UTF-8');
154
+ $page->drawText(Mage::helper('printorderline')->__('Shipping and billing methods'), 500, $this->y, 'UTF-8');
155
+ $page->drawText(Mage::helper('printorderline')->__('Totals'), 680, $this->y, 'UTF-8');
156
  }
157
  }
158
 
app/code/community/Asperience/Printorderline/controllers/OrderController.php CHANGED
@@ -8,8 +8,7 @@
8
 
9
  require_once 'Mage/Adminhtml/controllers/Sales/OrderController.php';
10
  class Asperience_Printorderline_OrderController extends Mage_Adminhtml_Sales_OrderController
11
- {
12
-
13
  public function pdfordersAction(){
14
  $orderIds = $this->getRequest()->getPost('order_ids');
15
  $flag = false;
@@ -30,10 +29,7 @@ class Asperience_Printorderline_OrderController extends Mage_Adminhtml_Sales_Ord
30
  $this->_getSession()->addError($this->__('There are no printable documents related to selected orders'));
31
  $this->_redirect('*/*/');
32
  }
33
-
34
  }
35
  $this->_redirect('*/*/');
36
-
37
- }
38
-
39
  }
8
 
9
  require_once 'Mage/Adminhtml/controllers/Sales/OrderController.php';
10
  class Asperience_Printorderline_OrderController extends Mage_Adminhtml_Sales_OrderController
11
+ {
 
12
  public function pdfordersAction(){
13
  $orderIds = $this->getRequest()->getPost('order_ids');
14
  $flag = false;
29
  $this->_getSession()->addError($this->__('There are no printable documents related to selected orders'));
30
  $this->_redirect('*/*/');
31
  }
 
32
  }
33
  $this->_redirect('*/*/');
34
+ }
 
 
35
  }
app/code/community/Asperience/Printorderline/etc/config.xml CHANGED
@@ -10,7 +10,7 @@
10
  <config>
11
  <modules>
12
  <Asperience_Printorderline>
13
- <version>0.1.5</version>
14
  </Asperience_Printorderline>
15
  </modules>
16
 
10
  <config>
11
  <modules>
12
  <Asperience_Printorderline>
13
+ <version>0.1.6</version>
14
  </Asperience_Printorderline>
15
  </modules>
16
 
app/locale/en_US/Asperience_Printorderline.csv CHANGED
@@ -1,7 +1,10 @@
1
- "Payment/Shipping Method","Payment/Shipping Method"
2
  "Print order lines","Print order lines"
 
 
 
 
3
  "Tax: ","Tax: "
4
- "Ship: ","Ship.: "
5
  "SubT: ","SubT: "
6
- "GrandT: ","GrandT: "
7
-
1
+ "Shipping and billing methods","Shipping and billing methods"
2
  "Print order lines","Print order lines"
3
+ "Bill to informations","Bill to informations"
4
+ "Ship to informations","Ship to informations"
5
+ "Shipping and billing methods","Shipping and billing methods"
6
+ "Totals","Totals"
7
  "Tax: ","Tax: "
8
+ "Ship: ","Ship: "
9
  "SubT: ","SubT: "
10
+ "GrandT: ","GrandT: "
 
app/locale/fr_FR/Asperience_Printorderline.csv CHANGED
@@ -1,7 +1,10 @@
1
- "Payment/Shipping Method","Mode de paiement et livraison"
2
- "Print order lines","Imprimer les lignes de commandes"
 
 
 
 
3
  "Tax: ","TVA: "
4
  "Ship: ","Liv.: "
5
  "SubT: ","HT: "
6
- "GrandT: ","TTC: "
7
-
1
+ "Shipping and billing methods","Modes de paiement et livraison"
2
+ "Print order lines","Imprimer le résumé des commandes"
3
+ "Bill to informations","Informations de facturation"
4
+ "Ship to informations","Informations de livraison"
5
+ "Shipping and billing methods","Méthodes de livraison et facturation"
6
+ "Totals","Totaux"
7
  "Tax: ","TVA: "
8
  "Ship: ","Liv.: "
9
  "SubT: ","HT: "
10
+ "GrandT: ","TTC: "
 
package.xml CHANGED
@@ -1,18 +1,20 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Asperience_Printorderline</name>
4
- <version>0.1.5</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/osl-3.0.php">Open Software License (OSL 3.0)</license>
7
  <channel>community</channel>
8
  <extends/>
9
- <summary>Module allowing to print order lines in the back office.</summary>
10
- <description>To have a summary of the orders, this module allows, with the back office, to print on pdf all the lines of selected orders.</description>
11
- <notes>If you have ideas for improvements or find bugs, please send them to Ronan Capitaine or Jean-S&#xE9;bastien Hederer at www.asperience.fr, with ASPerience PrintOrderLine as part of the subject line.</notes>
12
- <authors><author><name>Jean-S&#xE9;bastien Hederer</name><user>auto-converted</user><email>hedererjs@asperience.fr</email></author><author><name>Ronan Capitaine</name><user>auto-converted</user><email>capitainer@asperience.fr</email></author></authors>
13
- <date>2011-06-28</date>
14
- <time>10:37:10</time>
15
- <contents><target name="mage"><dir name="app"><dir name="etc"><dir name="modules"><file name="Asperience_Printorderline.xml" hash="a9d761fb2d923dfc1adf93541ce19dd8"/></dir></dir></dir></target><target name="magecommunity"><dir name="Asperience"><dir name="Printorderline"><dir name="controllers"><file name="OrderController.php" hash="ee0e32011e1fd7c4ba368c399bcb8f19"/></dir><dir name="etc"><file name="config.xml" hash="516640e296af4273cc0f03ddc99316dd"/></dir><dir name="Helper"><file name="Data.php" hash="4973f68f8b95618a017857b21fa4d759"/></dir><dir name="Model"><dir name="Order"><dir name="Pdf"><file name="Order.php" hash="a98340711c36eccdc77c8aefd183f59d"/></dir></dir><file name="Observer.php" hash="c0f046772f27067f139c257f34c8c0bb"/></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Asperience_Printorderline.csv" hash="c76da04e855f371065accffd3952c3d8"/></dir><dir name="fr_FR"><file name="Asperience_Printorderline.csv" hash="14b99d913dca710a46651058f54abb25"/></dir></target></contents>
 
 
16
  <compatible/>
17
- <dependencies/>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Asperience_Printorderline</name>
4
+ <version>0.1.6</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/osl-3.0.php">Open Software License (OSL 3.0)</license>
7
  <channel>community</channel>
8
  <extends/>
9
+ <summary>Module allowing to print order lines in the back office.&#xD;
10
+ </summary>
11
+ <description>To have a summary of the orders, this module allows in the back office, to print a pdf with details of selected orders.&#xD;
12
+ </description>
13
+ <notes>If you have ideas for improvements or find bugs, please send them to Jean-S&#xE9;bastien Hederer at contact@asperience.fr, with Asperience_Printorderline as part of the subject line.</notes>
14
+ <authors><author><name>Jean-S&#xE9;bastien Hederer</name><user>hedererjs</user><email>hedererjs@asperience.fr</email></author></authors>
15
+ <date>2012-04-29</date>
16
+ <time>21:20:47</time>
17
+ <contents><target name="magecommunity"><dir name="Asperience"><dir name="Printorderline"><dir name="Helper"><file name="Data.php" hash="4973f68f8b95618a017857b21fa4d759"/></dir><dir name="Model"><file name="Observer.php" hash="750d022fe91669b990e5e4c1a518218d"/><dir name="Order"><dir name="Pdf"><file name="Order.php" hash="a03638b0ce0ee3c0dae0a5cff947bca8"/></dir></dir></dir><dir name="controllers"><file name="OrderController.php" hash="129ff200233f74a9ddfdf3537e09059f"/></dir><dir name="etc"><file name="config.xml" hash="b89dafbef379eb619321fb40ec4deb69"/></dir></dir></dir></target><target name="mage"><dir name="app"><dir name="etc"><dir name="modules"><file name="Asperience_Printorderline.xml" hash="a9d761fb2d923dfc1adf93541ce19dd8"/></dir></dir></dir></target><target name="magelocale"><dir><dir name="en_US"><file name="Asperience_Printorderline.csv" hash="3e9fa70b536a43ac59099a7b6f190798"/></dir><dir name="fr_FR"><file name="Asperience_Printorderline.csv" hash="de0221c54a0cc8deb3dce66e147cd81c"/></dir></dir></target></contents>
18
  <compatible/>
19
+ <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
20
  </package>