Version Notes
Several enhancements, bugfix for VES_PdfPro
Download this release
Release Info
Developer | Komfortkasse |
Extension | Ltc_Komfortkasse |
Version | 1.7.6 |
Comparing to | |
See all releases |
Code changes from version 1.7.3 to 1.7.6
- app/code/community/Ltc/Komfortkasse/Helper/Data.php +127 -114
- app/code/community/Ltc/Komfortkasse/Helper/Komfortkasse.php +1 -1
- app/code/community/Ltc/Komfortkasse/Helper/Komfortkasse_Config.php +2 -2
- app/code/community/Ltc/Komfortkasse/Helper/Komfortkasse_Order.php +33 -10
- app/code/community/Ltc/Komfortkasse/controllers/MainController.php +27 -27
- app/code/community/Ltc/Komfortkasse/etc/config.xml +1 -1
- package.xml +5 -5
app/code/community/Ltc/Komfortkasse/Helper/Data.php
CHANGED
@@ -1,115 +1,128 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
$path
|
4 |
-
|
5 |
-
|
6 |
-
*
|
7 |
-
*
|
8 |
-
* @version 1.
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
*
|
16 |
-
*
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
*
|
87 |
-
*
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
*
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
}//end class
|
1 |
+
<?php
|
2 |
+
$path = Mage::getModuleDir('', 'Ltc_Komfortkasse');
|
3 |
+
require_once "{$path}/Helper/Komfortkasse.php";
|
4 |
+
/**
|
5 |
+
* Komfortkasse
|
6 |
+
* Magento Plugin - Helper_Data Class
|
7 |
+
*
|
8 |
+
* @version 1.7.6-Magento
|
9 |
+
*/
|
10 |
+
class Ltc_Komfortkasse_Helper_Data extends Mage_Core_Helper_Abstract
|
11 |
+
{
|
12 |
+
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Init.
|
16 |
+
*
|
17 |
+
* @return void
|
18 |
+
*/
|
19 |
+
public function init()
|
20 |
+
{
|
21 |
+
return Komfortkasse::init();
|
22 |
+
|
23 |
+
}
|
24 |
+
|
25 |
+
// end init()
|
26 |
+
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Test.
|
30 |
+
*
|
31 |
+
* @return void
|
32 |
+
*/
|
33 |
+
public function test()
|
34 |
+
{
|
35 |
+
return Komfortkasse::test();
|
36 |
+
|
37 |
+
}
|
38 |
+
|
39 |
+
// end test()
|
40 |
+
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Read orders.
|
44 |
+
*
|
45 |
+
* @return void
|
46 |
+
*/
|
47 |
+
public function readorders()
|
48 |
+
{
|
49 |
+
return Komfortkasse::readorders();
|
50 |
+
|
51 |
+
}
|
52 |
+
|
53 |
+
// end readorders()
|
54 |
+
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Read refunds.
|
58 |
+
*
|
59 |
+
* @return void
|
60 |
+
*/
|
61 |
+
public function readrefunds()
|
62 |
+
{
|
63 |
+
return Komfortkasse::readrefunds();
|
64 |
+
|
65 |
+
}
|
66 |
+
|
67 |
+
// end readrefunds()
|
68 |
+
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Update orders.
|
72 |
+
*
|
73 |
+
* @return void
|
74 |
+
*/
|
75 |
+
public function updateorders()
|
76 |
+
{
|
77 |
+
return Komfortkasse::updateorders();
|
78 |
+
|
79 |
+
}
|
80 |
+
|
81 |
+
// end updateorders()
|
82 |
+
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Update refunds.
|
86 |
+
*
|
87 |
+
* @return void
|
88 |
+
*/
|
89 |
+
public function updaterefunds()
|
90 |
+
{
|
91 |
+
return Komfortkasse::updaterefunds();
|
92 |
+
|
93 |
+
}
|
94 |
+
|
95 |
+
// end updaterefunds()
|
96 |
+
|
97 |
+
|
98 |
+
/**
|
99 |
+
* Info.
|
100 |
+
*
|
101 |
+
* @return void
|
102 |
+
*/
|
103 |
+
public function info()
|
104 |
+
{
|
105 |
+
return Komfortkasse::info();
|
106 |
+
|
107 |
+
}
|
108 |
+
|
109 |
+
// end info()
|
110 |
+
|
111 |
+
/**
|
112 |
+
* Notify order.
|
113 |
+
*
|
114 |
+
* @return void
|
115 |
+
*/
|
116 |
+
public function notifyorder($id)
|
117 |
+
{
|
118 |
+
return Komfortkasse::notifyorder($id);
|
119 |
+
|
120 |
+
}
|
121 |
+
|
122 |
+
// end notifyorder()
|
123 |
+
public function readinvoicepdf()
|
124 |
+
{
|
125 |
+
return Komfortkasse::readinvoicepdf();
|
126 |
+
|
127 |
+
}
|
128 |
}//end class
|
app/code/community/Ltc/Komfortkasse/Helper/Komfortkasse.php
CHANGED
@@ -8,7 +8,7 @@ require_once 'Komfortkasse_Order.php';
|
|
8 |
*/
|
9 |
class Komfortkasse
|
10 |
{
|
11 |
-
const PLUGIN_VER = '1.7.
|
12 |
const MAXLEN_SSL = 117;
|
13 |
const LEN_MCRYPT = 16;
|
14 |
|
8 |
*/
|
9 |
class Komfortkasse
|
10 |
{
|
11 |
+
const PLUGIN_VER = '1.7.6';
|
12 |
const MAXLEN_SSL = 117;
|
13 |
const LEN_MCRYPT = 16;
|
14 |
|
app/code/community/Ltc/Komfortkasse/Helper/Komfortkasse_Config.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
/**
|
4 |
* Komfortkasse
|
5 |
* Config Class
|
6 |
-
* @version 1.7.
|
7 |
class Komfortkasse_Config
|
8 |
{
|
9 |
const activate_export = 'payment/komfortkasse/activate_export';
|
@@ -112,7 +112,7 @@ class Komfortkasse_Config
|
|
112 |
|
113 |
public static function output($s)
|
114 |
{
|
115 |
-
|
116 |
}
|
117 |
|
118 |
}//end class
|
3 |
/**
|
4 |
* Komfortkasse
|
5 |
* Config Class
|
6 |
+
* @version 1.7.6-Magento */
|
7 |
class Komfortkasse_Config
|
8 |
{
|
9 |
const activate_export = 'payment/komfortkasse/activate_export';
|
112 |
|
113 |
public static function output($s)
|
114 |
{
|
115 |
+
return $s;
|
116 |
}
|
117 |
|
118 |
}//end class
|
app/code/community/Ltc/Komfortkasse/Helper/Komfortkasse_Order.php
CHANGED
@@ -8,7 +8,7 @@
|
|
8 |
* status: data type according to the shop system
|
9 |
* delivery_ and billing_: _firstname, _lastname, _company, _street, _postcode, _city, _countrycode
|
10 |
* products: an Array of item numbers
|
11 |
-
* @version 1.7.
|
12 |
*/
|
13 |
$path = Mage::getModuleDir('', 'Ltc_Komfortkasse');
|
14 |
global $komfortkasse_order_extension;
|
@@ -52,6 +52,7 @@ class Komfortkasse_Order
|
|
52 |
$minDate = date('Y-m-d', time() - 31536000); // 1 Jahr
|
53 |
|
54 |
$m2e = Mage::helper('core')->isModuleEnabled('Ess_M2ePro') ? Mage::getModel('M2ePro/Order') : null;
|
|
|
55 |
|
56 |
$shopIds = Komfortkasse_Config::getRequestParameter('s');
|
57 |
if ($shopIds)
|
@@ -76,6 +77,8 @@ class Komfortkasse_Order
|
|
76 |
$query = 'SELECT o.increment_id FROM ' . $tableOrder . ' o join ' . $tablePayment . ' p on p.parent_id = o.entity_id';
|
77 |
if ($m2e_active)
|
78 |
$query .= ' left join ' . $resource->getTableName('M2ePro/Order') . ' m on m.magento_order_id=o.entity_id left join ' . $resource->getTableName('M2ePro/Ebay_Order') . ' e on e.order_id=m.id ';
|
|
|
|
|
79 |
|
80 |
$query .= ' where o.store_id=' . $store_id . ' and created_at > ' . $minDate . ' and (';
|
81 |
$first = true;
|
@@ -93,6 +96,11 @@ class Komfortkasse_Order
|
|
93 |
$query .= ' and (p.method <> \'m2epropayment\' or e.payment_details like \'%"method":"%berweisung"%\') ';
|
94 |
$m2e_used = true;
|
95 |
}
|
|
|
|
|
|
|
|
|
|
|
96 |
|
97 |
$query .= ')';
|
98 |
$first = false;
|
@@ -110,6 +118,11 @@ class Komfortkasse_Order
|
|
110 |
$query .= ' and (p.method <> \'m2epropayment\' or e.payment_details like \'%"method":"Nachnahme"%\') ';
|
111 |
$m2e_used = true;
|
112 |
}
|
|
|
|
|
|
|
|
|
|
|
113 |
|
114 |
$query .= ')';
|
115 |
$first = false;
|
@@ -127,6 +140,11 @@ class Komfortkasse_Order
|
|
127 |
$query .= ' and (p.method <> \'m2epropayment\' or e.payment_details like \'%"method":"Rechnung"%\') ';
|
128 |
$m2e_used = true;
|
129 |
}
|
|
|
|
|
|
|
|
|
|
|
130 |
|
131 |
$query .= ')';
|
132 |
$first = false;
|
@@ -180,7 +198,8 @@ class Komfortkasse_Order
|
|
180 |
$paymentMethodsInvoice = explode(',', Komfortkasse_Config::getConfig(Komfortkasse_Config::payment_methods_invoice, $store_id_order));
|
181 |
|
182 |
$cmModel = Mage::getModel("sales/order_creditmemo");
|
183 |
-
$cmCollection = $cmModel->getCollection()->addFieldToFilter('store_id', $store_id)->addAttributeToFilter('created_at', array('gt' => $minDate
|
|
|
184 |
|
185 |
foreach ($cmCollection as $creditMemo) {
|
186 |
if ($creditMemo->getTransactionId() == null) {
|
@@ -554,7 +573,7 @@ class Komfortkasse_Order
|
|
554 |
|
555 |
// try easy pdf (www.easypdfinvoice.com)
|
556 |
if (!$pdfGenerated) {
|
557 |
-
$pdfProModel = Mage::getModel('pdfpro/order_invoice');
|
558 |
if ($pdfProModel !== false) {
|
559 |
$invoiceData = $pdfProModel->initInvoiceData($invoice);
|
560 |
$result = Mage::helper('pdfpro')->initPdf(array ($invoiceData
|
@@ -572,6 +591,7 @@ class Komfortkasse_Order
|
|
572 |
));
|
573 |
$content = $pdf->render();
|
574 |
}
|
|
|
575 |
} else if (Komfortkasse_Config::getConfig(Komfortkasse_Config::creditnotes_as_invoices, self::getOrder($orderNumber))) {
|
576 |
|
577 |
// try credit note
|
@@ -584,14 +604,14 @@ class Komfortkasse_Order
|
|
584 |
|
585 |
// try easy pdf (www.easypdfinvoice.com)
|
586 |
if (!$pdfGenerated) {
|
587 |
-
$pdfProModel = Mage::getModel('pdfpro/order_creditmemo');
|
588 |
if ($pdfProModel !== false) {
|
589 |
$creditData = $pdfProModel->initCreditmemoData($credit);
|
590 |
$result = Mage::helper('pdfpro')->initPdf(array ($creditData
|
591 |
));
|
592 |
if ($result ['success']) {
|
593 |
$content = $result ['content'];
|
594 |
-
|
595 |
}
|
596 |
}
|
597 |
}
|
@@ -605,17 +625,17 @@ class Komfortkasse_Order
|
|
605 |
}
|
606 |
}
|
607 |
|
608 |
-
|
609 |
return $content;
|
610 |
}
|
611 |
|
612 |
}
|
613 |
|
|
|
614 |
public static function isOpen($order)
|
615 |
{
|
616 |
-
if ($order['payment_method'] == 'm2epropayment') {
|
617 |
// m2e Bestellung nur relevant wenn eBay-Zahlungsart passend
|
618 |
-
$mage = Mage::getModel('sales/order')->loadByIncrementId($order['number']);
|
619 |
$m2e = Mage::helper('core')->isModuleEnabled('Ess_M2ePro') ? Mage::getModel('M2ePro/Order') : null;
|
620 |
if ($m2e && $m2e->load($mage->getEntityId(), 'magento_order_id')) {
|
621 |
$ebay = Mage::getModel('M2ePro/Ebay_Order');
|
@@ -634,11 +654,14 @@ class Komfortkasse_Order
|
|
634 |
if (strstr($paymentMethods, 'm2epropayment') !== false) {
|
635 |
return strstr($ebay_method, 'Rechnung') !== false;
|
636 |
}
|
637 |
-
|
638 |
}
|
639 |
}
|
640 |
}
|
641 |
-
}
|
642 |
|
|
|
|
|
|
|
|
|
643 |
|
|
|
644 |
}//end class
|
8 |
* status: data type according to the shop system
|
9 |
* delivery_ and billing_: _firstname, _lastname, _company, _street, _postcode, _city, _countrycode
|
10 |
* products: an Array of item numbers
|
11 |
+
* @version 1.7.6-Magento1
|
12 |
*/
|
13 |
$path = Mage::getModuleDir('', 'Ltc_Komfortkasse');
|
14 |
global $komfortkasse_order_extension;
|
52 |
$minDate = date('Y-m-d', time() - 31536000); // 1 Jahr
|
53 |
|
54 |
$m2e = Mage::helper('core')->isModuleEnabled('Ess_M2ePro') ? Mage::getModel('M2ePro/Order') : null;
|
55 |
+
global $komfortkasse_order_extension;
|
56 |
|
57 |
$shopIds = Komfortkasse_Config::getRequestParameter('s');
|
58 |
if ($shopIds)
|
77 |
$query = 'SELECT o.increment_id FROM ' . $tableOrder . ' o join ' . $tablePayment . ' p on p.parent_id = o.entity_id';
|
78 |
if ($m2e_active)
|
79 |
$query .= ' left join ' . $resource->getTableName('M2ePro/Order') . ' m on m.magento_order_id=o.entity_id left join ' . $resource->getTableName('M2ePro/Ebay_Order') . ' e on e.order_id=m.id ';
|
80 |
+
if ($komfortkasse_order_extension && method_exists('Komfortkasse_Order_Extension', 'extendOpenIDsQueryJoin') === true)
|
81 |
+
$query .= Komfortkasse_Order_Extension::extendOpenIDsQueryJoin($resource);
|
82 |
|
83 |
$query .= ' where o.store_id=' . $store_id . ' and created_at > ' . $minDate . ' and (';
|
84 |
$first = true;
|
96 |
$query .= ' and (p.method <> \'m2epropayment\' or e.payment_details like \'%"method":"%berweisung"%\') ';
|
97 |
$m2e_used = true;
|
98 |
}
|
99 |
+
if ($komfortkasse_order_extension && method_exists('Komfortkasse_Order_Extension', 'extendOpenIDsQueryWhere') === true) {
|
100 |
+
$queryExtended = Komfortkasse_Order_Extension::extendOpenIDsQueryWhere('PREPAYMENT');
|
101 |
+
if ($queryExtended)
|
102 |
+
$query .= ' and ( ' . $queryExtended . ' )';
|
103 |
+
}
|
104 |
|
105 |
$query .= ')';
|
106 |
$first = false;
|
118 |
$query .= ' and (p.method <> \'m2epropayment\' or e.payment_details like \'%"method":"Nachnahme"%\') ';
|
119 |
$m2e_used = true;
|
120 |
}
|
121 |
+
if ($komfortkasse_order_extension && method_exists('Komfortkasse_Order_Extension', 'extendOpenIDsQueryWhere') === true) {
|
122 |
+
$queryExtended = Komfortkasse_Order_Extension::extendOpenIDsQueryWhere('COD');
|
123 |
+
if ($queryExtended)
|
124 |
+
$query .= ' and ( ' . $queryExtended . ' )';
|
125 |
+
}
|
126 |
|
127 |
$query .= ')';
|
128 |
$first = false;
|
140 |
$query .= ' and (p.method <> \'m2epropayment\' or e.payment_details like \'%"method":"Rechnung"%\') ';
|
141 |
$m2e_used = true;
|
142 |
}
|
143 |
+
if ($komfortkasse_order_extension && method_exists('Komfortkasse_Order_Extension', 'extendOpenIDsQueryWhere') === true) {
|
144 |
+
$queryExtended = Komfortkasse_Order_Extension::extendOpenIDsQueryWhere('INVOICE');
|
145 |
+
if ($queryExtended)
|
146 |
+
$query .= ' and ( ' . $queryExtended . ' )';
|
147 |
+
}
|
148 |
|
149 |
$query .= ')';
|
150 |
$first = false;
|
198 |
$paymentMethodsInvoice = explode(',', Komfortkasse_Config::getConfig(Komfortkasse_Config::payment_methods_invoice, $store_id_order));
|
199 |
|
200 |
$cmModel = Mage::getModel("sales/order_creditmemo");
|
201 |
+
$cmCollection = $cmModel->getCollection()->addFieldToFilter('store_id', $store_id)->addAttributeToFilter('created_at', array ('gt' => $minDate
|
202 |
+
));
|
203 |
|
204 |
foreach ($cmCollection as $creditMemo) {
|
205 |
if ($creditMemo->getTransactionId() == null) {
|
573 |
|
574 |
// try easy pdf (www.easypdfinvoice.com)
|
575 |
if (!$pdfGenerated) {
|
576 |
+
$pdfProModel = Mage::helper('core')->isModuleEnabled('VES_PdfPro') ? Mage::getModel('pdfpro/order_invoice') : false;
|
577 |
if ($pdfProModel !== false) {
|
578 |
$invoiceData = $pdfProModel->initInvoiceData($invoice);
|
579 |
$result = Mage::helper('pdfpro')->initPdf(array ($invoiceData
|
591 |
));
|
592 |
$content = $pdf->render();
|
593 |
}
|
594 |
+
|
595 |
} else if (Komfortkasse_Config::getConfig(Komfortkasse_Config::creditnotes_as_invoices, self::getOrder($orderNumber))) {
|
596 |
|
597 |
// try credit note
|
604 |
|
605 |
// try easy pdf (www.easypdfinvoice.com)
|
606 |
if (!$pdfGenerated) {
|
607 |
+
$pdfProModel = $pdfProModel = Mage::helper('core')->isModuleEnabled('VES_PdfPro') ? Mage::getModel('pdfpro/order_creditmemo') : false;
|
608 |
if ($pdfProModel !== false) {
|
609 |
$creditData = $pdfProModel->initCreditmemoData($credit);
|
610 |
$result = Mage::helper('pdfpro')->initPdf(array ($creditData
|
611 |
));
|
612 |
if ($result ['success']) {
|
613 |
$content = $result ['content'];
|
614 |
+
$pdfGenerated = true;
|
615 |
}
|
616 |
}
|
617 |
}
|
625 |
}
|
626 |
}
|
627 |
|
|
|
628 |
return $content;
|
629 |
}
|
630 |
|
631 |
}
|
632 |
|
633 |
+
|
634 |
public static function isOpen($order)
|
635 |
{
|
636 |
+
if ($order ['payment_method'] == 'm2epropayment') {
|
637 |
// m2e Bestellung nur relevant wenn eBay-Zahlungsart passend
|
638 |
+
$mage = Mage::getModel('sales/order')->loadByIncrementId($order ['number']);
|
639 |
$m2e = Mage::helper('core')->isModuleEnabled('Ess_M2ePro') ? Mage::getModel('M2ePro/Order') : null;
|
640 |
if ($m2e && $m2e->load($mage->getEntityId(), 'magento_order_id')) {
|
641 |
$ebay = Mage::getModel('M2ePro/Ebay_Order');
|
654 |
if (strstr($paymentMethods, 'm2epropayment') !== false) {
|
655 |
return strstr($ebay_method, 'Rechnung') !== false;
|
656 |
}
|
|
|
657 |
}
|
658 |
}
|
659 |
}
|
|
|
660 |
|
661 |
+
global $komfortkasse_order_extension;
|
662 |
+
if ($komfortkasse_order_extension && method_exists('Komfortkasse_Order_Extension', 'isOpen') === true) {
|
663 |
+
$ret = Komfortkasse_Order_Extension::isOpen($order);
|
664 |
+
}
|
665 |
|
666 |
+
}
|
667 |
}//end class
|
app/code/community/Ltc/Komfortkasse/controllers/MainController.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
<?php
|
2 |
-
/**
|
3 |
* Komfortkasse
|
4 |
* Magento Plugin - MainController
|
5 |
-
*
|
6 |
-
* @version 1.
|
7 |
class Ltc_Komfortkasse_MainController extends Mage_Core_Controller_Front_Action
|
8 |
{
|
9 |
|
@@ -15,12 +15,12 @@ class Ltc_Komfortkasse_MainController extends Mage_Core_Controller_Front_Action
|
|
15 |
*/
|
16 |
public function initAction()
|
17 |
{
|
18 |
-
self::getHelper()->init();
|
19 |
-
|
20 |
}
|
21 |
|
22 |
// end initAction()
|
23 |
-
|
24 |
|
25 |
/**
|
26 |
* Test.
|
@@ -29,12 +29,12 @@ class Ltc_Komfortkasse_MainController extends Mage_Core_Controller_Front_Action
|
|
29 |
*/
|
30 |
public function testAction()
|
31 |
{
|
32 |
-
self::getHelper()->test();
|
33 |
-
|
34 |
}
|
35 |
|
36 |
// end testAction()
|
37 |
-
|
38 |
|
39 |
/**
|
40 |
* Read orders.
|
@@ -43,12 +43,12 @@ class Ltc_Komfortkasse_MainController extends Mage_Core_Controller_Front_Action
|
|
43 |
*/
|
44 |
public function readordersAction()
|
45 |
{
|
46 |
-
self::getHelper()->readorders();
|
47 |
-
|
48 |
}
|
49 |
|
50 |
// end readordersAction()
|
51 |
-
|
52 |
|
53 |
/**
|
54 |
* Read refunds.
|
@@ -57,12 +57,12 @@ class Ltc_Komfortkasse_MainController extends Mage_Core_Controller_Front_Action
|
|
57 |
*/
|
58 |
public function readrefundsAction()
|
59 |
{
|
60 |
-
self::getHelper()->readrefunds();
|
61 |
-
|
62 |
}
|
63 |
|
64 |
// end readrefundsAction()
|
65 |
-
|
66 |
|
67 |
/**
|
68 |
* Update orders.
|
@@ -71,12 +71,12 @@ class Ltc_Komfortkasse_MainController extends Mage_Core_Controller_Front_Action
|
|
71 |
*/
|
72 |
public function updateordersAction()
|
73 |
{
|
74 |
-
self::getHelper()->updateorders();
|
75 |
-
|
76 |
}
|
77 |
|
78 |
// end updateordersAction()
|
79 |
-
|
80 |
|
81 |
/**
|
82 |
* Update refunds.
|
@@ -85,12 +85,12 @@ class Ltc_Komfortkasse_MainController extends Mage_Core_Controller_Front_Action
|
|
85 |
*/
|
86 |
public function updaterefundsAction()
|
87 |
{
|
88 |
-
self::getHelper()->updaterefunds();
|
89 |
-
|
90 |
}
|
91 |
|
92 |
// end updaterefundsAction()
|
93 |
-
|
94 |
|
95 |
/**
|
96 |
* Info.
|
@@ -99,12 +99,12 @@ class Ltc_Komfortkasse_MainController extends Mage_Core_Controller_Front_Action
|
|
99 |
*/
|
100 |
public function infoAction()
|
101 |
{
|
102 |
-
self::getHelper()->info();
|
103 |
-
|
104 |
}
|
105 |
|
106 |
// end infoAction()
|
107 |
-
|
108 |
|
109 |
/**
|
110 |
* Get Helper.
|
@@ -114,7 +114,7 @@ class Ltc_Komfortkasse_MainController extends Mage_Core_Controller_Front_Action
|
|
114 |
protected function getHelper()
|
115 |
{
|
116 |
return Mage::helper('Ltc_Komfortkasse');
|
117 |
-
|
118 |
}
|
119 |
|
120 |
// end getHelper()
|
@@ -123,10 +123,10 @@ class Ltc_Komfortkasse_MainController extends Mage_Core_Controller_Front_Action
|
|
123 |
$content = self::getHelper()->readinvoicepdf();
|
124 |
if (!$content)
|
125 |
return;
|
126 |
-
|
127 |
$contentType = 'application/pdf';
|
128 |
$contentLength = strlen($content);
|
129 |
-
|
130 |
$this->getResponse()->setHttpResponseCode(200)->setHeader('Pragma', 'public', true)->setHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0', true)->setHeader('Content-type', $contentType, true)->setHeader('Content-Length', $contentLength, true)->setHeader('Content-Disposition', 'attachment; filename="' . $fileName . '"', true)->setHeader('Last-Modified', date('r'), true);
|
131 |
$this->getResponse()->setBody($content);
|
132 |
}
|
1 |
<?php
|
2 |
+
/**
|
3 |
* Komfortkasse
|
4 |
* Magento Plugin - MainController
|
5 |
+
*
|
6 |
+
* @version 1.7.6-Magento */
|
7 |
class Ltc_Komfortkasse_MainController extends Mage_Core_Controller_Front_Action
|
8 |
{
|
9 |
|
15 |
*/
|
16 |
public function initAction()
|
17 |
{
|
18 |
+
$this->getResponse()->setBody(self::getHelper()->init());
|
19 |
+
|
20 |
}
|
21 |
|
22 |
// end initAction()
|
23 |
+
|
24 |
|
25 |
/**
|
26 |
* Test.
|
29 |
*/
|
30 |
public function testAction()
|
31 |
{
|
32 |
+
$this->getResponse()->setBody(self::getHelper()->test());
|
33 |
+
|
34 |
}
|
35 |
|
36 |
// end testAction()
|
37 |
+
|
38 |
|
39 |
/**
|
40 |
* Read orders.
|
43 |
*/
|
44 |
public function readordersAction()
|
45 |
{
|
46 |
+
$this->getResponse()->setBody(self::getHelper()->readorders());
|
47 |
+
|
48 |
}
|
49 |
|
50 |
// end readordersAction()
|
51 |
+
|
52 |
|
53 |
/**
|
54 |
* Read refunds.
|
57 |
*/
|
58 |
public function readrefundsAction()
|
59 |
{
|
60 |
+
$this->getResponse()->setBody(self::getHelper()->readrefunds());
|
61 |
+
|
62 |
}
|
63 |
|
64 |
// end readrefundsAction()
|
65 |
+
|
66 |
|
67 |
/**
|
68 |
* Update orders.
|
71 |
*/
|
72 |
public function updateordersAction()
|
73 |
{
|
74 |
+
$this->getResponse()->setBody(self::getHelper()->updateorders());
|
75 |
+
|
76 |
}
|
77 |
|
78 |
// end updateordersAction()
|
79 |
+
|
80 |
|
81 |
/**
|
82 |
* Update refunds.
|
85 |
*/
|
86 |
public function updaterefundsAction()
|
87 |
{
|
88 |
+
$this->getResponse()->setBody(self::getHelper()->updaterefunds());
|
89 |
+
|
90 |
}
|
91 |
|
92 |
// end updaterefundsAction()
|
93 |
+
|
94 |
|
95 |
/**
|
96 |
* Info.
|
99 |
*/
|
100 |
public function infoAction()
|
101 |
{
|
102 |
+
$this->getResponse()->setBody(self::getHelper()->info());
|
103 |
+
|
104 |
}
|
105 |
|
106 |
// end infoAction()
|
107 |
+
|
108 |
|
109 |
/**
|
110 |
* Get Helper.
|
114 |
protected function getHelper()
|
115 |
{
|
116 |
return Mage::helper('Ltc_Komfortkasse');
|
117 |
+
|
118 |
}
|
119 |
|
120 |
// end getHelper()
|
123 |
$content = self::getHelper()->readinvoicepdf();
|
124 |
if (!$content)
|
125 |
return;
|
126 |
+
|
127 |
$contentType = 'application/pdf';
|
128 |
$contentLength = strlen($content);
|
129 |
+
|
130 |
$this->getResponse()->setHttpResponseCode(200)->setHeader('Pragma', 'public', true)->setHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0', true)->setHeader('Content-type', $contentType, true)->setHeader('Content-Length', $contentLength, true)->setHeader('Content-Disposition', 'attachment; filename="' . $fileName . '"', true)->setHeader('Last-Modified', date('r'), true);
|
131 |
$this->getResponse()->setBody($content);
|
132 |
}
|
app/code/community/Ltc/Komfortkasse/etc/config.xml
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
<config>
|
4 |
<modules>
|
5 |
<Ltc_Komfortkasse>
|
6 |
-
<version>1.7.
|
7 |
</Ltc_Komfortkasse>
|
8 |
</modules>
|
9 |
<global>
|
3 |
<config>
|
4 |
<modules>
|
5 |
<Ltc_Komfortkasse>
|
6 |
+
<version>1.7.5</version>
|
7 |
</Ltc_Komfortkasse>
|
8 |
</modules>
|
9 |
<global>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Ltc_Komfortkasse</name>
|
4 |
-
<version>1.7.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://creativecommons.org/licenses/by-nd/4.0/">CC BY-ND 4.0</license>
|
7 |
<channel>community</channel>
|
@@ -13,11 +13,11 @@ Zusätzlich können automatische Zahlungserinnerungen versendet werden u
|
|
13 |

|
14 |
Es ist eine Anmeldung auf www.komfortkasse.eu erforderlich (kostenloses Paket verfügbar).
|
15 |
</description>
|
16 |
-
<notes>
|
17 |
<authors><author><name>Komfortkasse</name><user>komfortkasse</user><email>integration@komfortkasse.eu</email></author></authors>
|
18 |
-
<date>
|
19 |
-
<time>
|
20 |
-
<contents><target name="magecommunity"><dir name="Ltc"><dir name="Komfortkasse"><dir name="Helper"><file name="Data.php" hash="
|
21 |
<compatible/>
|
22 |
<dependencies><required><php><min>5.0.0</min><max>6.0.0</max></php></required></dependencies>
|
23 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Ltc_Komfortkasse</name>
|
4 |
+
<version>1.7.6</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://creativecommons.org/licenses/by-nd/4.0/">CC BY-ND 4.0</license>
|
7 |
<channel>community</channel>
|
13 |

|
14 |
Es ist eine Anmeldung auf www.komfortkasse.eu erforderlich (kostenloses Paket verfügbar).
|
15 |
</description>
|
16 |
+
<notes>Several enhancements, bugfix for VES_PdfPro</notes>
|
17 |
<authors><author><name>Komfortkasse</name><user>komfortkasse</user><email>integration@komfortkasse.eu</email></author></authors>
|
18 |
+
<date>2017-05-09</date>
|
19 |
+
<time>10:38:00</time>
|
20 |
+
<contents><target name="magecommunity"><dir name="Ltc"><dir name="Komfortkasse"><dir name="Helper"><file name="Data.php" hash="318009cadcd1d50ac765412c9e5f418c"/><file name="Komfortkasse.php" hash="e0d0dd422b0de7d2d48d015812783156"/><file name="Komfortkasse_Config.php" hash="c4989dde77696baa269aaa6df59b499a"/><file name="Komfortkasse_Order.php" hash="c74857a863effaa4529520a4a88ef326"/></dir><dir name="Model"><file name="Encryptionoptions.php" hash="1fbe2ffc43cc3c1489688d20f4c8af11"/><file name="Observer.php" hash="5b616b6d3651df44f8297c732dc478bb"/></dir><dir name="controllers"><file name="MainController.php" hash="7f486ef186359e5b0be9a4ae00159a30"/></dir><dir name="etc"><file name="config.xml" hash="978933e096098f4bc00f2bae4c004baa"/><file name="system.xml" hash="4477e69044c79edab2b70691b0236bd8"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Ltc_Komfortkasse.xml" hash="433066ef75047d9468dcea87888283d2"/></dir></target></contents>
|
21 |
<compatible/>
|
22 |
<dependencies><required><php><min>5.0.0</min><max>6.0.0</max></php></required></dependencies>
|
23 |
</package>
|