Version Notes
Improved compatibility for multi-store
Download this release
Release Info
Developer | Komfortkasse |
Extension | Ltc_Komfortkasse |
Version | 1.4.0 |
Comparing to | |
See all releases |
Code changes from version 1.3.0.6 to 1.4.0
- app/code/community/Ltc/Komfortkasse/Helper/Komfortkasse.php +7 -5
- app/code/community/Ltc/Komfortkasse/Helper/Komfortkasse_Config.php +13 -3
- app/code/community/Ltc/Komfortkasse/Helper/Komfortkasse_Order.php +139 -98
- app/code/community/Ltc/Komfortkasse/etc/config.xml +1 -1
- app/code/community/Ltc/Komfortkasse/etc/system.xml +0 -6
- package.xml +5 -5
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.
|
12 |
const MAXLEN_SSL = 117;
|
13 |
const LEN_MCRYPT = 16;
|
14 |
|
@@ -320,7 +320,7 @@ class Komfortkasse
|
|
320 |
continue;
|
321 |
}
|
322 |
|
323 |
-
$newstatus = Komfortkasse::getNewStatus($status,
|
324 |
if (empty($newstatus) === true) {
|
325 |
continue;
|
326 |
}
|
@@ -427,15 +427,17 @@ class Komfortkasse
|
|
427 |
*
|
428 |
* @return mixed
|
429 |
*/
|
430 |
-
protected static function getNewStatus($status, $
|
431 |
{
|
|
|
|
|
432 |
switch ($orderType) {
|
433 |
case 'PREPAYMENT' :
|
434 |
switch ($status) {
|
435 |
case 'PAID' :
|
436 |
-
return Komfortkasse_Config::getConfig(Komfortkasse_Config::status_paid);
|
437 |
case 'CANCELLED' :
|
438 |
-
return Komfortkasse_Config::getConfig(Komfortkasse_Config::status_cancelled);
|
439 |
}
|
440 |
|
441 |
return null;
|
8 |
*/
|
9 |
class Komfortkasse
|
10 |
{
|
11 |
+
const PLUGIN_VER = '1.4.0';
|
12 |
const MAXLEN_SSL = 117;
|
13 |
const LEN_MCRYPT = 16;
|
14 |
|
320 |
continue;
|
321 |
}
|
322 |
|
323 |
+
$newstatus = Komfortkasse::getNewStatus($status, $order);
|
324 |
if (empty($newstatus) === true) {
|
325 |
continue;
|
326 |
}
|
427 |
*
|
428 |
* @return mixed
|
429 |
*/
|
430 |
+
protected static function getNewStatus($status, $order)
|
431 |
{
|
432 |
+
$orderType = self::getOrderType($order ['payment_method']);
|
433 |
+
|
434 |
switch ($orderType) {
|
435 |
case 'PREPAYMENT' :
|
436 |
switch ($status) {
|
437 |
case 'PAID' :
|
438 |
+
return Komfortkasse_Config::getConfig(Komfortkasse_Config::status_paid, $order);
|
439 |
case 'CANCELLED' :
|
440 |
+
return Komfortkasse_Config::getConfig(Komfortkasse_Config::status_cancelled, $order);
|
441 |
}
|
442 |
|
443 |
return null;
|
app/code/community/Ltc/Komfortkasse/Helper/Komfortkasse_Config.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
/**
|
4 |
* Komfortkasse
|
5 |
* Config Class
|
6 |
-
* @version 1.
|
7 |
class Komfortkasse_Config
|
8 |
{
|
9 |
const activate_export = 'payment/komfortkasse/activate_export';
|
@@ -55,9 +55,19 @@ class Komfortkasse_Config
|
|
55 |
*
|
56 |
* @return mixed
|
57 |
*/
|
58 |
-
public static function getConfig($constantKey)
|
59 |
{
|
60 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
|
62 |
return $value;
|
63 |
|
3 |
/**
|
4 |
* Komfortkasse
|
5 |
* Config Class
|
6 |
+
* @version 1.4.0-Magento */
|
7 |
class Komfortkasse_Config
|
8 |
{
|
9 |
const activate_export = 'payment/komfortkasse/activate_export';
|
55 |
*
|
56 |
* @return mixed
|
57 |
*/
|
58 |
+
public static function getConfig($constantKey, $order=null)
|
59 |
{
|
60 |
+
if ($order != null) {
|
61 |
+
$store_id = $order['store_id'];
|
62 |
+
} else {
|
63 |
+
// export und update werden in den getId Methoden nochmals extra ber�cksichtigt.
|
64 |
+
if ($constantKey == self::activate_export)
|
65 |
+
return true;
|
66 |
+
if ($constantKey == self::activate_update)
|
67 |
+
return true;
|
68 |
+
}
|
69 |
+
|
70 |
+
$value = Mage::getStoreConfig($constantKey, $store_id);
|
71 |
|
72 |
return $value;
|
73 |
|
app/code/community/Ltc/Komfortkasse/Helper/Komfortkasse_Order.php
CHANGED
@@ -4,11 +4,11 @@
|
|
4 |
/**
|
5 |
* Komfortkasse Order Class
|
6 |
* in KK, an Order is an Array providing the following members:
|
7 |
-
* number, date, email, customer_number, payment_method, amount, currency_code, exchange_rate, language_code, invoice_number
|
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.
|
12 |
*/
|
13 |
$path = Mage::getModuleDir('', 'Ltc_Komfortkasse');
|
14 |
$order_extension = false;
|
@@ -29,74 +29,88 @@ class Komfortkasse_Order
|
|
29 |
{
|
30 |
$ret = array ();
|
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 |
-
// INVOICE
|
65 |
|
66 |
-
$openOrders = explode(',', Komfortkasse_Config::getConfig(Komfortkasse_Config::status_open_invoice));
|
67 |
-
$paymentMethods = explode(',', Komfortkasse_Config::getConfig(Komfortkasse_Config::payment_methods_invoice));
|
68 |
-
|
69 |
-
$salesModel = Mage::getModel('sales/order');
|
70 |
-
$salesCollection = $salesModel->getCollection()->addAttributeToFilter('status', array (
|
71 |
-
'in' => $openOrders
|
72 |
-
));
|
73 |
-
|
74 |
-
foreach ($salesCollection as $order) {
|
75 |
-
$method = $order->getPayment()->getMethodInstance()->getCode();
|
76 |
-
if (in_array($method, $paymentMethods, true) === true) {
|
77 |
-
$orderId = $order->getIncrementId();
|
78 |
-
$ret [] = $orderId;
|
79 |
-
}
|
80 |
-
}
|
81 |
-
|
82 |
-
// COD
|
83 |
-
|
84 |
-
$openOrders = explode(',', Komfortkasse_Config::getConfig(Komfortkasse_Config::status_open_cod));
|
85 |
-
$paymentMethods = explode(',', Komfortkasse_Config::getConfig(Komfortkasse_Config::payment_methods_cod));
|
86 |
-
|
87 |
-
$salesModel = Mage::getModel('sales/order');
|
88 |
-
$salesCollection = $salesModel->getCollection()->addAttributeToFilter('status', array (
|
89 |
-
'in' => $openOrders
|
90 |
-
));
|
91 |
-
|
92 |
-
foreach ($salesCollection as $order) {
|
93 |
-
$method = $order->getPayment()->getMethodInstance()->getCode();
|
94 |
-
if (in_array($method, $paymentMethods, true) === true) {
|
95 |
-
$orderId = $order->getIncrementId();
|
96 |
-
$ret [] = $orderId;
|
97 |
-
}
|
98 |
-
}
|
99 |
-
|
100 |
return $ret;
|
101 |
|
102 |
}
|
@@ -113,18 +127,34 @@ class Komfortkasse_Order
|
|
113 |
{
|
114 |
$ret = array ();
|
115 |
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
}
|
129 |
}
|
130 |
}
|
@@ -205,6 +235,8 @@ class Komfortkasse_Order
|
|
205 |
}
|
206 |
}
|
207 |
|
|
|
|
|
208 |
if ($order_extension && method_exists('Komfortkasse_Order_Extension', 'extendOrder') === true) {
|
209 |
$ret = Komfortkasse_Order_Extension::extendOrder($order, $ret);
|
210 |
}
|
@@ -258,18 +290,18 @@ class Komfortkasse_Order
|
|
258 |
*/
|
259 |
public static function updateOrder($order, $status, $callbackid)
|
260 |
{
|
|
|
|
|
|
|
|
|
261 |
// Hint: PAID and CANCELLED are supported as of now.
|
262 |
$order = Mage::getModel('sales/order')->loadByIncrementId($order ['number']);
|
263 |
|
264 |
-
Mage::dispatchEvent('komfortkasse_change_order_status_before', array (
|
265 |
-
'order' => $order,
|
266 |
-
'status' => $status,
|
267 |
-
'callbackid' => $callbackid
|
268 |
));
|
269 |
|
270 |
$stateCollection = Mage::getModel('sales/order_status')->getCollection()->joinStates();
|
271 |
-
$stateCollection->addFieldToFilter('main_table.status', array (
|
272 |
-
'like' => $status
|
273 |
));
|
274 |
$state = $stateCollection->getFirstItem()->getState();
|
275 |
|
@@ -311,10 +343,7 @@ class Komfortkasse_Order
|
|
311 |
$order->save();
|
312 |
}
|
313 |
|
314 |
-
Mage::dispatchEvent('komfortkasse_change_order_status_after', array (
|
315 |
-
'order' => $order,
|
316 |
-
'status' => $status,
|
317 |
-
'callbackid' => $callbackid
|
318 |
));
|
319 |
|
320 |
}
|
@@ -338,6 +367,14 @@ class Komfortkasse_Order
|
|
338 |
|
339 |
$creditMemo = Mage::getModel('sales/order_creditmemo')->load($id);
|
340 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
341 |
if ($creditMemo->getTransactionId() == null) {
|
342 |
$creditMemo->setTransactionId($callbackid);
|
343 |
}
|
@@ -363,40 +400,44 @@ class Komfortkasse_Order
|
|
363 |
$object->save();
|
364 |
|
365 |
}
|
366 |
-
|
|
|
367 |
public static function getInvoicePdfPrepare()
|
368 |
{
|
369 |
-
}
|
370 |
|
|
|
|
|
|
|
371 |
public static function getInvoicePdf($invoiceNumber)
|
372 |
{
|
373 |
if ($invoiceNumber && $invoice = Mage::getModel('sales/order_invoice')->loadByIncrementId($invoiceNumber)) {
|
374 |
$fileName = $invoiceNumber . '.pdf';
|
375 |
-
|
376 |
$pdfGenerated = false;
|
377 |
-
|
378 |
// try easy pdf (www.easypdfinvoice.com)
|
379 |
if (!$pdfGenerated) {
|
380 |
$pdfProModel = Mage::getModel('pdfpro/order_invoice');
|
381 |
if ($pdfProModel !== false) {
|
382 |
$invoiceData = $pdfProModel->initInvoiceData($invoice);
|
383 |
-
$result = Mage::helper('pdfpro')->initPdf(array($invoiceData
|
384 |
-
|
385 |
-
|
|
|
386 |
$pdfGenerated = true;
|
387 |
}
|
388 |
}
|
389 |
}
|
390 |
-
|
391 |
// try Magento Standard
|
392 |
if (!$pdfGenerated) {
|
393 |
-
$pdf = Mage::getModel('sales/order_pdf_invoice')->getPdf(array (
|
394 |
-
$invoice
|
395 |
));
|
396 |
$content = $pdf->render();
|
397 |
}
|
398 |
-
|
399 |
return $content;
|
400 |
}
|
|
|
401 |
}
|
402 |
}//end class
|
4 |
/**
|
5 |
* Komfortkasse Order Class
|
6 |
* in KK, an Order is an Array providing the following members:
|
7 |
+
* number, date, email, customer_number, payment_method, amount, currency_code, exchange_rate, language_code, invoice_number, store_id
|
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.4.0-Magento
|
12 |
*/
|
13 |
$path = Mage::getModuleDir('', 'Ltc_Komfortkasse');
|
14 |
$order_extension = false;
|
29 |
{
|
30 |
$ret = array ();
|
31 |
|
32 |
+
foreach (Mage::app()->getWebsites() as $website) {
|
33 |
+
foreach ($website->getGroups() as $group) {
|
34 |
+
$stores = $group->getStores();
|
35 |
+
foreach ($stores as $store) {
|
36 |
+
|
37 |
+
$store_id = $store->getId();
|
38 |
+
$store_id_order = array ();
|
39 |
+
$store_id_order ['store_id'] = $store_id;
|
40 |
+
|
41 |
+
if (!Komfortkasse_Config::getConfig(Komfortkasse_Config::activate_export, $store_id_order)) {
|
42 |
+
continue;
|
43 |
+
}
|
44 |
+
|
45 |
+
// PREPAYMENT
|
46 |
+
|
47 |
+
$openOrders = explode(',', Komfortkasse_Config::getConfig(Komfortkasse_Config::status_open, $store_id_order));
|
48 |
+
$paymentMethods = explode(',', Komfortkasse_Config::getConfig(Komfortkasse_Config::payment_methods, $store_id_order));
|
49 |
+
|
50 |
+
$salesModel = Mage::getModel('sales/order');
|
51 |
+
$salesCollection = $salesModel->getCollection()->addAttributeToFilter('status', array ('in' => $openOrders
|
52 |
+
))->addFieldToFilter('store_id', $store_id);
|
53 |
+
|
54 |
+
foreach ($salesCollection as $order) {
|
55 |
+
$method = $order->getPayment()->getMethodInstance()->getCode();
|
56 |
+
if (in_array($method, $paymentMethods, true) === true) {
|
57 |
+
$orderId = $order->getIncrementId();
|
58 |
+
$ret [] = $orderId;
|
59 |
+
}
|
60 |
+
}
|
61 |
+
|
62 |
+
// Add all orders with unpaid invoices (in case the invoice is created before shipping).
|
63 |
+
$invoiceModel = Mage::getModel('sales/order_invoice');
|
64 |
+
$invoiceCollection = $invoiceModel->getCollection()->addAttributeToFilter('state', Mage_Sales_Model_Order_Invoice::STATE_OPEN)->addFieldToFilter('store_id', $store_id);
|
65 |
+
foreach ($invoiceCollection as $invoice) {
|
66 |
+
$order = $invoice->getOrder();
|
67 |
+
$method = $order->getPayment()->getMethodInstance()->getCode();
|
68 |
+
if (in_array($method, $paymentMethods, true) === true) {
|
69 |
+
$orderId = $order->getIncrementId();
|
70 |
+
if (in_array($orderId, $ret) === false) {
|
71 |
+
$ret [] = $orderId;
|
72 |
+
}
|
73 |
+
}
|
74 |
+
}
|
75 |
+
|
76 |
+
// INVOICE
|
77 |
+
|
78 |
+
$openOrders = explode(',', Komfortkasse_Config::getConfig(Komfortkasse_Config::status_open_invoice, $store_id_order));
|
79 |
+
$paymentMethods = explode(',', Komfortkasse_Config::getConfig(Komfortkasse_Config::payment_methods_invoice, $store_id_order));
|
80 |
+
|
81 |
+
$salesModel = Mage::getModel('sales/order');
|
82 |
+
$salesCollection = $salesModel->getCollection()->addAttributeToFilter('status', array ('in' => $openOrders
|
83 |
+
))->addFieldToFilter('store_id', $store_id);
|
84 |
+
|
85 |
+
foreach ($salesCollection as $order) {
|
86 |
+
$method = $order->getPayment()->getMethodInstance()->getCode();
|
87 |
+
if (in_array($method, $paymentMethods, true) === true) {
|
88 |
+
$orderId = $order->getIncrementId();
|
89 |
+
$ret [] = $orderId;
|
90 |
+
}
|
91 |
+
}
|
92 |
+
|
93 |
+
// COD
|
94 |
+
|
95 |
+
$openOrders = explode(',', Komfortkasse_Config::getConfig(Komfortkasse_Config::status_open_cod, $store_id_order));
|
96 |
+
$paymentMethods = explode(',', Komfortkasse_Config::getConfig(Komfortkasse_Config::payment_methods_cod, $store_id_order));
|
97 |
+
|
98 |
+
$salesModel = Mage::getModel('sales/order');
|
99 |
+
$salesCollection = $salesModel->getCollection()->addAttributeToFilter('status', array ('in' => $openOrders
|
100 |
+
))->addFieldToFilter('store_id', $store_id);
|
101 |
+
|
102 |
+
foreach ($salesCollection as $order) {
|
103 |
+
$method = $order->getPayment()->getMethodInstance()->getCode();
|
104 |
+
if (in_array($method, $paymentMethods, true) === true) {
|
105 |
+
$orderId = $order->getIncrementId();
|
106 |
+
$ret [] = $orderId;
|
107 |
+
}
|
108 |
+
}
|
109 |
}
|
110 |
}
|
111 |
}
|
112 |
|
|
|
113 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
return $ret;
|
115 |
|
116 |
}
|
127 |
{
|
128 |
$ret = array ();
|
129 |
|
130 |
+
foreach (Mage::app()->getWebsites() as $website) {
|
131 |
+
foreach ($website->getGroups() as $group) {
|
132 |
+
$stores = $group->getStores();
|
133 |
+
foreach ($stores as $store) {
|
134 |
+
|
135 |
+
$store_id = $store->getId();
|
136 |
+
$store_id_order = array ();
|
137 |
+
$store_id_order ['store_id'] = $store_id;
|
138 |
+
|
139 |
+
if (!Komfortkasse_Config::getConfig(Komfortkasse_Config::activate_export, $store_id_order)) {
|
140 |
+
continue;
|
141 |
+
}
|
142 |
+
|
143 |
+
$paymentMethods = explode(',', Komfortkasse_Config::getConfig(Komfortkasse_Config::payment_methods, $store_id_order));
|
144 |
+
|
145 |
+
$cmModel = Mage::getModel("sales/order_creditmemo");
|
146 |
+
$cmCollection = $cmModel->getCollection()->addFieldToFilter('store_id', $store_id);
|
147 |
+
|
148 |
+
foreach ($cmCollection as $creditMemo) {
|
149 |
+
if ($creditMemo->getTransactionId() == null) {
|
150 |
+
$order = $creditMemo->getOrder();
|
151 |
+
$method = $order->getPayment()->getMethodInstance()->getCode();
|
152 |
+
if (in_array($method, $paymentMethods, true) === true) {
|
153 |
+
$cmId = $creditMemo->getIncrementId();
|
154 |
+
$ret [] = $cmId;
|
155 |
+
}
|
156 |
+
}
|
157 |
+
}
|
158 |
}
|
159 |
}
|
160 |
}
|
235 |
}
|
236 |
}
|
237 |
|
238 |
+
$ret ['store_id'] = $order->getStoreId();
|
239 |
+
|
240 |
if ($order_extension && method_exists('Komfortkasse_Order_Extension', 'extendOrder') === true) {
|
241 |
$ret = Komfortkasse_Order_Extension::extendOrder($order, $ret);
|
242 |
}
|
290 |
*/
|
291 |
public static function updateOrder($order, $status, $callbackid)
|
292 |
{
|
293 |
+
if (!Komfortkasse_Config::getConfig(Komfortkasse_Config::activate_update, $order)) {
|
294 |
+
return;
|
295 |
+
}
|
296 |
+
|
297 |
// Hint: PAID and CANCELLED are supported as of now.
|
298 |
$order = Mage::getModel('sales/order')->loadByIncrementId($order ['number']);
|
299 |
|
300 |
+
Mage::dispatchEvent('komfortkasse_change_order_status_before', array ('order' => $order,'status' => $status,'callbackid' => $callbackid
|
|
|
|
|
|
|
301 |
));
|
302 |
|
303 |
$stateCollection = Mage::getModel('sales/order_status')->getCollection()->joinStates();
|
304 |
+
$stateCollection->addFieldToFilter('main_table.status', array ('like' => $status
|
|
|
305 |
));
|
306 |
$state = $stateCollection->getFirstItem()->getState();
|
307 |
|
343 |
$order->save();
|
344 |
}
|
345 |
|
346 |
+
Mage::dispatchEvent('komfortkasse_change_order_status_after', array ('order' => $order,'status' => $status,'callbackid' => $callbackid
|
|
|
|
|
|
|
347 |
));
|
348 |
|
349 |
}
|
367 |
|
368 |
$creditMemo = Mage::getModel('sales/order_creditmemo')->load($id);
|
369 |
|
370 |
+
$store_id = $creditMemo->getStoreId();
|
371 |
+
$store_id_order = array();
|
372 |
+
$store_id_order['store_id'] = $store_id;
|
373 |
+
|
374 |
+
if (!Komfortkasse_Config::getConfig(Komfortkasse_Config::activate_update, $store_id_order)) {
|
375 |
+
return;
|
376 |
+
}
|
377 |
+
|
378 |
if ($creditMemo->getTransactionId() == null) {
|
379 |
$creditMemo->setTransactionId($callbackid);
|
380 |
}
|
400 |
$object->save();
|
401 |
|
402 |
}
|
403 |
+
|
404 |
+
|
405 |
public static function getInvoicePdfPrepare()
|
406 |
{
|
|
|
407 |
|
408 |
+
}
|
409 |
+
|
410 |
+
|
411 |
public static function getInvoicePdf($invoiceNumber)
|
412 |
{
|
413 |
if ($invoiceNumber && $invoice = Mage::getModel('sales/order_invoice')->loadByIncrementId($invoiceNumber)) {
|
414 |
$fileName = $invoiceNumber . '.pdf';
|
415 |
+
|
416 |
$pdfGenerated = false;
|
417 |
+
|
418 |
// try easy pdf (www.easypdfinvoice.com)
|
419 |
if (!$pdfGenerated) {
|
420 |
$pdfProModel = Mage::getModel('pdfpro/order_invoice');
|
421 |
if ($pdfProModel !== false) {
|
422 |
$invoiceData = $pdfProModel->initInvoiceData($invoice);
|
423 |
+
$result = Mage::helper('pdfpro')->initPdf(array ($invoiceData
|
424 |
+
));
|
425 |
+
if ($result ['success']) {
|
426 |
+
$content = $result ['content'];
|
427 |
$pdfGenerated = true;
|
428 |
}
|
429 |
}
|
430 |
}
|
431 |
+
|
432 |
// try Magento Standard
|
433 |
if (!$pdfGenerated) {
|
434 |
+
$pdf = Mage::getModel('sales/order_pdf_invoice')->getPdf(array ($invoice
|
|
|
435 |
));
|
436 |
$content = $pdf->render();
|
437 |
}
|
438 |
+
|
439 |
return $content;
|
440 |
}
|
441 |
+
|
442 |
}
|
443 |
}//end class
|
app/code/community/Ltc/Komfortkasse/etc/config.xml
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
<config>
|
4 |
<modules>
|
5 |
<Ltc_Komfortkasse>
|
6 |
-
<version>1.
|
7 |
</Ltc_Komfortkasse>
|
8 |
</modules>
|
9 |
<global>
|
3 |
<config>
|
4 |
<modules>
|
5 |
<Ltc_Komfortkasse>
|
6 |
+
<version>1.4.0</version>
|
7 |
</Ltc_Komfortkasse>
|
8 |
</modules>
|
9 |
<global>
|
app/code/community/Ltc/Komfortkasse/etc/system.xml
CHANGED
@@ -85,8 +85,6 @@
|
|
85 |
<comment>Order state that should be set when a prepayment order has been cancelled.
|
86 |
</comment>
|
87 |
</status_cancelled>
|
88 |
-
|
89 |
-
|
90 |
<payment_methods_invoice translate="label">
|
91 |
<label>Invoice: Payment Methods</label>
|
92 |
<frontend_type>multiselect</frontend_type>
|
@@ -186,10 +184,6 @@
|
|
186 |
<comment>Order state that should be set when a COD order was not paid.
|
187 |
</comment>
|
188 |
</status_cancelled_cod>
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
<encryption translate="label">
|
194 |
<label>Encryption</label>
|
195 |
<frontend_type>select</frontend_type>
|
85 |
<comment>Order state that should be set when a prepayment order has been cancelled.
|
86 |
</comment>
|
87 |
</status_cancelled>
|
|
|
|
|
88 |
<payment_methods_invoice translate="label">
|
89 |
<label>Invoice: Payment Methods</label>
|
90 |
<frontend_type>multiselect</frontend_type>
|
184 |
<comment>Order state that should be set when a COD order was not paid.
|
185 |
</comment>
|
186 |
</status_cancelled_cod>
|
|
|
|
|
|
|
|
|
187 |
<encryption translate="label">
|
188 |
<label>Encryption</label>
|
189 |
<frontend_type>select</frontend_type>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Ltc_Komfortkasse</name>
|
4 |
-
<version>1.
|
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>Improved
|
17 |
<authors><author><name>Komfortkasse</name><user>komfortkasse</user><email>integration@komfortkasse.eu</email></author></authors>
|
18 |
-
<date>2015-05-
|
19 |
-
<time>08:
|
20 |
-
<contents><target name="magecommunity"><dir name="Ltc"><dir name="Komfortkasse"><dir name="Helper"><file name="Data.php" hash="ec7f9f8fb6ea400a740ed2c127eb71bc"/><file name="Komfortkasse.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.4.0</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>Improved compatibility for multi-store</notes>
|
17 |
<authors><author><name>Komfortkasse</name><user>komfortkasse</user><email>integration@komfortkasse.eu</email></author></authors>
|
18 |
+
<date>2015-05-26</date>
|
19 |
+
<time>08:40:53</time>
|
20 |
+
<contents><target name="magecommunity"><dir name="Ltc"><dir name="Komfortkasse"><dir name="Helper"><file name="Data.php" hash="ec7f9f8fb6ea400a740ed2c127eb71bc"/><file name="Komfortkasse.php" hash="dd7e3a1a19ca20cf0b12a82d1f0cf8a1"/><file name="Komfortkasse_Config.php" hash="8b337a9ba4583a14e1c4f40df3f9e1f5"/><file name="Komfortkasse_Order.php" hash="8f54e913c55af99b3eca65ad04a2d375"/></dir><dir name="Model"><file name="Observer.php" hash="5b616b6d3651df44f8297c732dc478bb"/></dir><dir name="controllers"><file name="MainController.php" hash="b983fe60b2bbfa3aa1d57850cc6c045b"/></dir><dir name="etc"><file name="config.xml" hash="4b933dd6c8ebb55045eab90ef4f48608"/><file name="system.xml" hash="0902280bcdd963008b48e633677c953d"/></dir></dir></dir><dir name="Mage"><dir name="Adminhtml"><dir name="Model"><dir name="System"><dir name="Config"><dir name="Source"><file name="KomfortkasseEncryptionOptions.php" hash="fea880dd3e60c13ede05be53511a6d93"/></dir></dir></dir></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>
|