Qinvoice_Connect - Version 1.1.0

Version Notes

Compatible with v1.9.1

Download this release

Release Info

Developer Casper Mekel
Extension Qinvoice_Connect
Version 1.1.0
Comparing to
See all releases


Code changes from version 1.0.14 to 1.1.0

app/code/community/Qinvoice/Connect/Model/Order/Observer.php CHANGED
@@ -8,7 +8,13 @@ class Qinvoice_Connect_Model_Order_Observer
8
  }
9
 
10
  public function sendOnComplete($observer){
 
11
  $order = $observer->getEvent()->getOrder();
 
 
 
 
 
12
  // GETTING TRIGGER SETTING
13
  $db = Mage::getSingleton('core/resource')->getConnection('core_write');
14
  $varPath = 'invoice_options/invoice/invoice_trigger';
@@ -17,6 +23,9 @@ class Qinvoice_Connect_Model_Order_Observer
17
  $rowTwo = $resultTwo->fetch(PDO::FETCH_ASSOC);
18
  $varOnOrder = $rowTwo['value'];
19
 
 
 
 
20
  if($varOnOrder == 'complete' && $order->getState() == Mage_Sales_Model_Order::STATE_COMPLETE){
21
  $this->createInvoiceForQinvoice($order->getId(), false);
22
  }else{
@@ -24,8 +33,14 @@ class Qinvoice_Connect_Model_Order_Observer
24
  }
25
  }
26
 
27
- public function sendOnShip($observer){
 
28
  $shipment = $observer->getEvent()->getShipment();
 
 
 
 
 
29
  $order = $shipment->getOrder();
30
 
31
  // GETTING TRIGGER SETTING
@@ -46,8 +61,6 @@ class Qinvoice_Connect_Model_Order_Observer
46
  public function sendOnOrder($observer){
47
  $order = $observer->getEvent()->getOrder();
48
 
49
-
50
-
51
  // GETTING TRIGGER SETTING
52
  $db = Mage::getSingleton('core/resource')->getConnection('core_write');
53
  $varPath = 'invoice_options/invoice/invoice_trigger';
8
  }
9
 
10
  public function sendOnComplete($observer){
11
+ return false;
12
  $order = $observer->getEvent()->getOrder();
13
+
14
+
15
+ // print_r($order);
16
+ //die();
17
+
18
  // GETTING TRIGGER SETTING
19
  $db = Mage::getSingleton('core/resource')->getConnection('core_write');
20
  $varPath = 'invoice_options/invoice/invoice_trigger';
23
  $rowTwo = $resultTwo->fetch(PDO::FETCH_ASSOC);
24
  $varOnOrder = $rowTwo['value'];
25
 
26
+
27
+ mail('caspermekel@gmail.com','MAGE191','sendOnComplete '. $varOnOrder );
28
+
29
  if($varOnOrder == 'complete' && $order->getState() == Mage_Sales_Model_Order::STATE_COMPLETE){
30
  $this->createInvoiceForQinvoice($order->getId(), false);
31
  }else{
33
  }
34
  }
35
 
36
+ public function sendOnShip($observer){
37
+ return false;
38
  $shipment = $observer->getEvent()->getShipment();
39
+
40
+ mail('caspermekel@gmail.com','MAGE191','sendOnShip');
41
+ print_r($order);
42
+ die();
43
+
44
  $order = $shipment->getOrder();
45
 
46
  // GETTING TRIGGER SETTING
61
  public function sendOnOrder($observer){
62
  $order = $observer->getEvent()->getOrder();
63
 
 
 
64
  // GETTING TRIGGER SETTING
65
  $db = Mage::getSingleton('core/resource')->getConnection('core_write');
66
  $varPath = 'invoice_options/invoice/invoice_trigger';
app/code/community/Qinvoice/Connect/Model/Source/Trigger.php CHANGED
@@ -5,8 +5,8 @@ class Qinvoice_Connect_Model_Source_Trigger
5
  {
6
  return array(
7
  array('value' => 'order', 'label' =>'On every order'),
8
- array('value' => 'payment', 'label' => 'Only on successful payment'),
9
- array('value' => 'ship', 'label' => 'When order is shipped')
10
  );
11
  }
12
  }
5
  {
6
  return array(
7
  array('value' => 'order', 'label' =>'On every order'),
8
+ array('value' => 'payment', 'label' => 'Only on successful payment')
9
+ //array('value' => 'ship', 'label' => 'When order is shipped') // not availabe in 1.9.1.
10
  );
11
  }
12
  }
app/code/community/Qinvoice/Connect/etc/config.xml CHANGED
@@ -13,24 +13,6 @@
13
  </invoice>
14
  </models>
15
  <events>
16
- <sales_order_status_after>
17
- <observers>
18
- <connect>
19
- <class>invoice/order_observer</class>
20
- <method>sendOnComplete</method>
21
- </connect>
22
- </observers>
23
- </sales_order_status_after>
24
-
25
- <sales_order_shipment_save_after>
26
- <observers>
27
- <connect>
28
- <class>invoice/order_observer</class>
29
- <method>sendOnShip</method>
30
- </connect>
31
- </observers>
32
- </sales_order_shipment_save_after>
33
-
34
  <sales_order_place_after>
35
  <observers>
36
  <connect>
@@ -39,14 +21,15 @@
39
  </connect>
40
  </observers>
41
  </sales_order_place_after>
42
- <checkout_onepage_controller_success_action>
 
43
  <observers>
44
  <connect>
45
  <class>invoice/order_observer</class>
46
  <method>sendOnPayment</method>
47
  </connect>
48
  </observers>
49
- </checkout_onepage_controller_success_action>
50
  </events>
51
  <helpers>
52
  <invoice>
@@ -54,7 +37,7 @@
54
  </invoice>
55
  </helpers>
56
  </global>
57
- <adminhtml>
58
  <acl>
59
  <resources>
60
  <admin>
@@ -75,5 +58,5 @@
75
  </resources>
76
  </acl>
77
  </adminhtml>
78
-
79
  </config>
13
  </invoice>
14
  </models>
15
  <events>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  <sales_order_place_after>
17
  <observers>
18
  <connect>
21
  </connect>
22
  </observers>
23
  </sales_order_place_after>
24
+
25
+ <sales_order_payment_pay>
26
  <observers>
27
  <connect>
28
  <class>invoice/order_observer</class>
29
  <method>sendOnPayment</method>
30
  </connect>
31
  </observers>
32
+ </sales_order_payment_pay>
33
  </events>
34
  <helpers>
35
  <invoice>
37
  </invoice>
38
  </helpers>
39
  </global>
40
+ <adminhtml>
41
  <acl>
42
  <resources>
43
  <admin>
58
  </resources>
59
  </acl>
60
  </adminhtml>
61
+
62
  </config>
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Qinvoice_Connect</name>
4
- <version>1.0.14</version>
5
  <stability>stable</stability>
6
  <license>GPL</license>
7
  <channel>community</channel>
8
  <extends/>
9
- <summary>Connects to q-invoice for sending invoices.</summary>
10
- <description>Manage your financial adminstration with q-invoice. All orders are invoiced through q-invoice and automatically added to your administration.</description>
11
- <notes>Compatible with v1.9.0</notes>
12
  <authors><author><name>Casper Mekel</name><user>caspermekel</user><email>info@q-invoice.com</email></author></authors>
13
- <date>2014-11-04</date>
14
- <time>13:07:46</time>
15
- <contents><target name="magecommunity"><dir name="Qinvoice"><file name="CHANGELOG" hash="fe63e41117f38a39736c3354a7b1d11d"/><dir name="Connect"><dir name="etc"><file name="config.xml" hash="eaf8853232705f786452282ca065d53d"/><file name="system.xml" hash="0f7c10edfb8942199b277a0170babe30"/></dir><dir name="Helper"><file name="Data.php" hash="ccb4b09674319e8b20e9c06a94adfa38"/></dir><dir name="Model"><dir name="Order"><file name="Observer.Boerdereike.php" hash="8ecdeaa4e9a41de7d5debfaf22967761"/><file name="Observer.php" hash="beaa2c78539e48b6a3204138737d2418"/></dir><dir name="Source"><file name="Attribute.php" hash="72f35ffb8cd873d2c5e1e448ff4bf4e2"/><file name="Invoice.php" hash="4661f369f7e116fd761e5fffac9efeaf"/><file name="Method.php" hash="ac6891fc7e403250b24f5b0f2d6199bc"/><file name="Relation.php" hash="89ab031937b846ab5f0bcac7ccaa31b7"/><file name="Trigger.php" hash="e65427cc9773baaedae2b3897c7bf28a"/></dir></dir><file name="readme.txt" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Qinvoice_Connect.xml" hash="fbedefa4e926092705c6941ad28f51f8"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php><extension><name>curl</name><min>5.1</min><max>6.0</max></extension></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Qinvoice_Connect</name>
4
+ <version>1.1.0</version>
5
  <stability>stable</stability>
6
  <license>GPL</license>
7
  <channel>community</channel>
8
  <extends/>
9
+ <summary>Automatically generate and send PDF invoices for every order to your customers through q-invoice.com</summary>
10
+ <description>Invoices can be generated upon a successful payment or order and will be added to your administration. Q-invoice offers you the freedom to run multiple webshops or venues but still have your bookkeeping together at one place. Generate invoices in a layout of your choosing for maximal recognition, upload bankstatements and process payment with the click of your mouse. www.q-invoice.com</description>
11
+ <notes>Compatible with v1.9.1</notes>
12
  <authors><author><name>Casper Mekel</name><user>caspermekel</user><email>info@q-invoice.com</email></author></authors>
13
+ <date>2014-11-10</date>
14
+ <time>16:22:54</time>
15
+ <contents><target name="magecommunity"><dir name="Qinvoice"><file name="CHANGELOG" hash="fe63e41117f38a39736c3354a7b1d11d"/><dir name="Connect"><dir name="etc"><file name="config.xml" hash="c6d5f3ebe9fef8eae4641627488e4a77"/><file name="system.xml" hash="0f7c10edfb8942199b277a0170babe30"/></dir><dir name="Helper"><file name="Data.php" hash="ccb4b09674319e8b20e9c06a94adfa38"/></dir><dir name="Model"><dir name="Order"><file name="Observer.Boerdereike.php" hash="8ecdeaa4e9a41de7d5debfaf22967761"/><file name="Observer.php" hash="d02a784a89e10ef46a226a66b79cbd5c"/></dir><dir name="Source"><file name="Attribute.php" hash="72f35ffb8cd873d2c5e1e448ff4bf4e2"/><file name="Invoice.php" hash="4661f369f7e116fd761e5fffac9efeaf"/><file name="Method.php" hash="ac6891fc7e403250b24f5b0f2d6199bc"/><file name="Relation.php" hash="89ab031937b846ab5f0bcac7ccaa31b7"/><file name="Trigger.php" hash="be2c0e4bfc32c0bdd57b4b1b58da8d63"/></dir></dir><file name="readme.txt" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Qinvoice_Connect.xml" hash="fbedefa4e926092705c6941ad28f51f8"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php><extension><name>curl</name><min>5.1</min><max>6.0</max></extension></required></dependencies>
18
  </package>