Version Notes
bug fix:
backend orders email fill payment information
Download this release
Release Info
Developer | Eupago |
Extension | Eupago_MB |
Version | 1.0.7 |
Comparing to | |
See all releases |
Code changes from version 1.0.6 to 1.0.7
app/code/community/Eupago/Multibanco/Model/Process.php
CHANGED
@@ -42,7 +42,11 @@ class Eupago_Multibanco_Model_Process extends Mage_Payment_Model_Method_Abstract
|
|
42 |
|
43 |
$payment_method =$order->getPayment()->getMethodInstance()->getCode();
|
44 |
|
45 |
-
|
|
|
|
|
|
|
|
|
46 |
|
47 |
if($payment_method == "multibanco"){
|
48 |
if ($quote_id != "" ) {
|
42 |
|
43 |
$payment_method =$order->getPayment()->getMethodInstance()->getCode();
|
44 |
|
45 |
+
if(Mage::getSingleton('admin/session')->isLoggedIn()){
|
46 |
+
Mage::getSingleton('admin/session')->setAdminQuoteEupagoId($quote_id);
|
47 |
+
$_SESSION['admin_quote_eupago_id'] = $quote_id;
|
48 |
+
}
|
49 |
+
|
50 |
|
51 |
if($payment_method == "multibanco"){
|
52 |
if ($quote_id != "" ) {
|
app/design/frontend/base/default/template/multibanco/info/info.phtml
CHANGED
@@ -4,19 +4,17 @@
|
|
4 |
<td><table width="100%" border="0" cellspacing="1" cellpadding="0">
|
5 |
|
6 |
<?php
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
$quote_id = $
|
11 |
}else{
|
12 |
$orderId = Mage::getSingleton('checkout/session')->getLastRealOrderId();
|
13 |
$quote_id = Mage::getSingleton('checkout/session')->getQuoteId();
|
14 |
}
|
15 |
-
//////////////////
|
16 |
$conn = Mage::getSingleton('core/resource')->getConnection('core_read');
|
17 |
-
|
18 |
-
if ($quote_id != "") {
|
19 |
-
|
20 |
$sales_flat_quote_payment = Mage::getSingleton('core/resource')->getTableName('sales_flat_quote_payment');
|
21 |
$query = $conn->query("SELECT eupago_referencia FROM $sales_flat_quote_payment WHERE quote_id= $quote_id");
|
22 |
$referencia = $query->fetchColumn();
|
@@ -33,27 +31,22 @@
|
|
33 |
|
34 |
|
35 |
$conn = Mage::getSingleton('core/resource')->getConnection('core_read');
|
36 |
-
|
37 |
$query = $conn->query("SELECT max(parent_id) eupago_referencia FROM $sales_flat_order_payment ");
|
38 |
$entity_id = $query->fetchColumn();
|
39 |
|
40 |
-
|
41 |
-
|
42 |
$query = $conn->query("SELECT eupago_referencia FROM $sales_flat_order_payment WHERE parent_id=$entity_id");
|
43 |
$referencia = $query->fetchColumn();
|
44 |
$query = $conn->query("SELECT eupago_entidade FROM $sales_flat_order_payment WHERE parent_id=$entity_id");
|
45 |
$entidade = $query->fetchColumn();
|
46 |
$query = $conn->query("SELECT eupago_montante FROM $sales_flat_order_payment WHERE parent_id=$entity_id");
|
47 |
$valor = $query->fetchColumn();
|
48 |
-
|
49 |
-
|
|
|
50 |
|
51 |
<div align='center'>
|
52 |
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
<table style="margin-top: 10px;border: 1px solid #000;" width="250px" cellspacing="0" align="center">
|
58 |
<tr>
|
59 |
<td colspan="2" style="height:25px;vertical-align:center; text-align:center">
|
@@ -84,7 +77,8 @@
|
|
84 |
|
85 |
|
86 |
|
87 |
-
<? }
|
|
|
88 |
</tr>
|
89 |
|
90 |
</table></td>
|
4 |
<td><table width="100%" border="0" cellspacing="1" cellpadding="0">
|
5 |
|
6 |
<?php
|
7 |
+
|
8 |
+
$AdminQouteId = Mage::getSingleton('admin/session')->getAdminQuoteEupagoId();
|
9 |
+
if($AdminQouteId != null || $AdminQouteId != ""){
|
10 |
+
$quote_id = $AdminQouteId;
|
11 |
}else{
|
12 |
$orderId = Mage::getSingleton('checkout/session')->getLastRealOrderId();
|
13 |
$quote_id = Mage::getSingleton('checkout/session')->getQuoteId();
|
14 |
}
|
|
|
15 |
$conn = Mage::getSingleton('core/resource')->getConnection('core_read');
|
16 |
+
$referencia = "";
|
17 |
+
if ($quote_id != "") {
|
|
|
18 |
$sales_flat_quote_payment = Mage::getSingleton('core/resource')->getTableName('sales_flat_quote_payment');
|
19 |
$query = $conn->query("SELECT eupago_referencia FROM $sales_flat_quote_payment WHERE quote_id= $quote_id");
|
20 |
$referencia = $query->fetchColumn();
|
31 |
|
32 |
|
33 |
$conn = Mage::getSingleton('core/resource')->getConnection('core_read');
|
34 |
+
$sales_flat_order_payment = Mage::getSingleton('core/resource')->getTableName('sales_flat_order_payment');
|
35 |
$query = $conn->query("SELECT max(parent_id) eupago_referencia FROM $sales_flat_order_payment ");
|
36 |
$entity_id = $query->fetchColumn();
|
37 |
|
|
|
|
|
38 |
$query = $conn->query("SELECT eupago_referencia FROM $sales_flat_order_payment WHERE parent_id=$entity_id");
|
39 |
$referencia = $query->fetchColumn();
|
40 |
$query = $conn->query("SELECT eupago_entidade FROM $sales_flat_order_payment WHERE parent_id=$entity_id");
|
41 |
$entidade = $query->fetchColumn();
|
42 |
$query = $conn->query("SELECT eupago_montante FROM $sales_flat_order_payment WHERE parent_id=$entity_id");
|
43 |
$valor = $query->fetchColumn();
|
44 |
+
$valor = number_format($valor,'2',',','');
|
45 |
+
if(($referencia != "" || $referencia == null) && ($entidade != "" || $entidade == null) && $valor){
|
46 |
+
?>
|
47 |
|
48 |
<div align='center'>
|
49 |
|
|
|
|
|
|
|
|
|
50 |
<table style="margin-top: 10px;border: 1px solid #000;" width="250px" cellspacing="0" align="center">
|
51 |
<tr>
|
52 |
<td colspan="2" style="height:25px;vertical-align:center; text-align:center">
|
77 |
|
78 |
|
79 |
|
80 |
+
<? }
|
81 |
+
}?>
|
82 |
</tr>
|
83 |
|
84 |
</table></td>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Eupago_MB</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
<license>GNU General Public License (GPL)</license>
|
7 |
<channel>community</channel>
|
@@ -9,11 +9,11 @@
|
|
9 |
<summary>Modulo de pagamento que gera referencias multibanco.</summary>
|
10 |
<description>Modulo de pagamento por Entidade e Referencia Multibanco</description>
|
11 |
<notes>bug fix:
|
12 |
-
backend orders email</notes>
|
13 |
<authors><author><name>euPago</name><user>euPago</user><email>dev@eupago.pt</email></author></authors>
|
14 |
-
<date>2016-04-
|
15 |
-
<time>
|
16 |
-
<contents><target name="magecommunity"><dir name="Eupago"><dir name="Multibanco"><dir name="Block"><file name="Form.php" hash="b10bbd2ac4230fb7b5b23163bba5497d"/><file name="Info.php" hash="6b2e8bc2cb50cd10921632d72d283e91"/><dir name="Onepage"><file name="Success.phtml" hash="8426f6164c184d809c25f0cd35c3f3c1"/><file name="Success.phtml" hash="8426f6164c184d809c25f0cd35c3f3c1"/><file name="Success.phtml" hash="8426f6164c184d809c25f0cd35c3f3c1"/></dir><file name="Success.php" hash="60fc3720de3d31488f5850e8e7c27a3e"/><file name="Form.php" hash="b10bbd2ac4230fb7b5b23163bba5497d"/><file name="Info.php" hash="6b2e8bc2cb50cd10921632d72d283e91"/><file name="Success.php" hash="60fc3720de3d31488f5850e8e7c27a3e"/><file name="Form.php" hash="b10bbd2ac4230fb7b5b23163bba5497d"/><file name="Info.php" hash="6b2e8bc2cb50cd10921632d72d283e91"/><file name="Success.php" hash="60fc3720de3d31488f5850e8e7c27a3e"/><file name="Form.php" hash="b10bbd2ac4230fb7b5b23163bba5497d"/><file name="Info.php" hash="6b2e8bc2cb50cd10921632d72d283e91"/></dir><dir name="Helper"><file name="Data.php" hash="08f64400e4204040eced048d885fe3da"/><file name="Data.php" hash="08f64400e4204040eced048d885fe3da"/><file name="Data.php" hash="08f64400e4204040eced048d885fe3da"/><file name="Data.php" hash="08f64400e4204040eced048d885fe3da"/></dir><dir name="Model"><dir name="Convert"><file name="Order.php" hash="10fb9abcee863b4a809cd46d39fa0121"/><file name="Quote.php" hash="371acecf7ee5300f3bf9f363ca2c6e39"/><file name="Order.php" hash="10fb9abcee863b4a809cd46d39fa0121"/><file name="Quote.php" hash="371acecf7ee5300f3bf9f363ca2c6e39"/><file name="Order.php" hash="10fb9abcee863b4a809cd46d39fa0121"/><file name="Quote.php" hash="371acecf7ee5300f3bf9f363ca2c6e39"/><file name="Order.php" hash="10fb9abcee863b4a809cd46d39fa0121"/><file name="Quote.php" hash="371acecf7ee5300f3bf9f363ca2c6e39"/><file name="Order.php" hash="10fb9abcee863b4a809cd46d39fa0121"/><file name="Quote.php" hash="371acecf7ee5300f3bf9f363ca2c6e39"/></dir><file name="GerarRef.php" hash="a7e966a5dd1e47544cd8aaea3b460238"/><dir name="Mysql4"><file name="Setup.php" hash="da156d537188951a4f6eccc0adf96f06"/><file name="Setup.php" hash="da156d537188951a4f6eccc0adf96f06"/><file name="Setup.php" hash="da156d537188951a4f6eccc0adf96f06"/></dir><file name="PaymentAction.php" hash="d37848a985083e38e966ec081aa4c02b"/><file name="Process.php" hash="
|
17 |
<compatible/>
|
18 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
19 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Eupago_MB</name>
|
4 |
+
<version>1.0.7</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>GNU General Public License (GPL)</license>
|
7 |
<channel>community</channel>
|
9 |
<summary>Modulo de pagamento que gera referencias multibanco.</summary>
|
10 |
<description>Modulo de pagamento por Entidade e Referencia Multibanco</description>
|
11 |
<notes>bug fix:
|
12 |
+
backend orders email fill payment information</notes>
|
13 |
<authors><author><name>euPago</name><user>euPago</user><email>dev@eupago.pt</email></author></authors>
|
14 |
+
<date>2016-04-04</date>
|
15 |
+
<time>09:08:53</time>
|
16 |
+
<contents><target name="magecommunity"><dir name="Eupago"><dir name="Multibanco"><dir name="Block"><file name="Form.php" hash="b10bbd2ac4230fb7b5b23163bba5497d"/><file name="Info.php" hash="6b2e8bc2cb50cd10921632d72d283e91"/><dir name="Onepage"><file name="Success.phtml" hash="8426f6164c184d809c25f0cd35c3f3c1"/><file name="Success.phtml" hash="8426f6164c184d809c25f0cd35c3f3c1"/><file name="Success.phtml" hash="8426f6164c184d809c25f0cd35c3f3c1"/></dir><file name="Success.php" hash="60fc3720de3d31488f5850e8e7c27a3e"/><file name="Form.php" hash="b10bbd2ac4230fb7b5b23163bba5497d"/><file name="Info.php" hash="6b2e8bc2cb50cd10921632d72d283e91"/><file name="Success.php" hash="60fc3720de3d31488f5850e8e7c27a3e"/><file name="Form.php" hash="b10bbd2ac4230fb7b5b23163bba5497d"/><file name="Info.php" hash="6b2e8bc2cb50cd10921632d72d283e91"/><file name="Success.php" hash="60fc3720de3d31488f5850e8e7c27a3e"/><file name="Form.php" hash="b10bbd2ac4230fb7b5b23163bba5497d"/><file name="Info.php" hash="6b2e8bc2cb50cd10921632d72d283e91"/></dir><dir name="Helper"><file name="Data.php" hash="08f64400e4204040eced048d885fe3da"/><file name="Data.php" hash="08f64400e4204040eced048d885fe3da"/><file name="Data.php" hash="08f64400e4204040eced048d885fe3da"/><file name="Data.php" hash="08f64400e4204040eced048d885fe3da"/></dir><dir name="Model"><dir name="Convert"><file name="Order.php" hash="10fb9abcee863b4a809cd46d39fa0121"/><file name="Quote.php" hash="371acecf7ee5300f3bf9f363ca2c6e39"/><file name="Order.php" hash="10fb9abcee863b4a809cd46d39fa0121"/><file name="Quote.php" hash="371acecf7ee5300f3bf9f363ca2c6e39"/><file name="Order.php" hash="10fb9abcee863b4a809cd46d39fa0121"/><file name="Quote.php" hash="371acecf7ee5300f3bf9f363ca2c6e39"/><file name="Order.php" hash="10fb9abcee863b4a809cd46d39fa0121"/><file name="Quote.php" hash="371acecf7ee5300f3bf9f363ca2c6e39"/><file name="Order.php" hash="10fb9abcee863b4a809cd46d39fa0121"/><file name="Quote.php" hash="371acecf7ee5300f3bf9f363ca2c6e39"/></dir><file name="GerarRef.php" hash="a7e966a5dd1e47544cd8aaea3b460238"/><dir name="Mysql4"><file name="Setup.php" hash="da156d537188951a4f6eccc0adf96f06"/><file name="Setup.php" hash="da156d537188951a4f6eccc0adf96f06"/><file name="Setup.php" hash="da156d537188951a4f6eccc0adf96f06"/></dir><file name="PaymentAction.php" hash="d37848a985083e38e966ec081aa4c02b"/><file name="Process.php" hash="2b87cf9d04aa0614e67db0a08a3ad79a"/><file name="GerarRef.php" hash="a7e966a5dd1e47544cd8aaea3b460238"/><file name="PaymentAction.php" hash="d37848a985083e38e966ec081aa4c02b"/><file name="Process.php" hash="2b87cf9d04aa0614e67db0a08a3ad79a"/><file name="GerarRef.php" hash="a7e966a5dd1e47544cd8aaea3b460238"/><file name="PaymentAction.php" hash="d37848a985083e38e966ec081aa4c02b"/><file name="Process.php" hash="2b87cf9d04aa0614e67db0a08a3ad79a"/><file name="GerarRef.php" hash="a7e966a5dd1e47544cd8aaea3b460238"/><file name="PaymentAction.php" hash="d37848a985083e38e966ec081aa4c02b"/><file name="Process.php" hash="2b87cf9d04aa0614e67db0a08a3ad79a"/><dir name="Mysgl4"><file name="Setup.php" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir></dir><dir name="controllers"><file name="CallbackController.php" hash="2997ccbeeb97ac25a4abe1c93de5dbf0"/><file name="CallbackController.php" hash="2997ccbeeb97ac25a4abe1c93de5dbf0"/><file name="CallbackController.php" hash="2997ccbeeb97ac25a4abe1c93de5dbf0"/><file name="CallbackController.php" hash="2997ccbeeb97ac25a4abe1c93de5dbf0"/></dir><dir name="etc"><file name="config.xml" hash="404d711c7bc519c720764c09a8fa39aa"/><file name="system.xml" hash="4831e23e9cde731f15fcd14015103102"/><file name="config.xml" hash="404d711c7bc519c720764c09a8fa39aa"/><file name="system.xml" hash="4831e23e9cde731f15fcd14015103102"/><file name="config.xml" hash="404d711c7bc519c720764c09a8fa39aa"/><file name="system.xml" hash="4831e23e9cde731f15fcd14015103102"/><file name="config.xml" hash="404d711c7bc519c720764c09a8fa39aa"/><file name="system.xml" hash="4831e23e9cde731f15fcd14015103102"/></dir><dir name="sql"><dir name="multibanco_setup"><file name="mysql4-install-1.0.0.php" hash="9f00ec506a0a94d8863cf14e3673d9ef"/><file name="mysql4-install-1.0.0.php" hash="9f00ec506a0a94d8863cf14e3673d9ef"/><file name="mysql4-install-1.0.0.php" hash="9f00ec506a0a94d8863cf14e3673d9ef"/><file name="mysql4-install-1.0.0.php" hash="9f00ec506a0a94d8863cf14e3673d9ef"/><file name="mysql4-install-1.0.0.php" hash="9f00ec506a0a94d8863cf14e3673d9ef"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Eupago_Multibanco.xml" hash="79392e90e1f4e79aa0362ea7957930c3"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="multibanco"><dir name="form"><file name="form.phtml" hash="a9bed52032750b6d5b01d09306f63cc1"/><file name="mark.phtml" hash="59b0d4028051a96a8c54d5b33b67c8fd"/><file name="form.phtml" hash="a9bed52032750b6d5b01d09306f63cc1"/><file name="mark.phtml" hash="59b0d4028051a96a8c54d5b33b67c8fd"/><file name="form.phtml" hash="a9bed52032750b6d5b01d09306f63cc1"/><file name="mark.phtml" hash="59b0d4028051a96a8c54d5b33b67c8fd"/></dir><dir name="info"><file name="info.phtml" hash="fa6321e93aaf8d3849b6b5219a8b8987"/><dir name="pdf"><file name="info.phtml" hash="30d8927be3ac9f8ec898b21a58d1c574"/><file name="info.phtml" hash="30d8927be3ac9f8ec898b21a58d1c574"/><file name="info.phtml" hash="30d8927be3ac9f8ec898b21a58d1c574"/><file name="info.phtml" hash="30d8927be3ac9f8ec898b21a58d1c574"/></dir><file name="info.phtml" hash="fa6321e93aaf8d3849b6b5219a8b8987"/><file name="info.phtml" hash="fa6321e93aaf8d3849b6b5219a8b8987"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="multibanco"><dir name="checkout"><file name="success.phtml" hash="8426f6164c184d809c25f0cd35c3f3c1"/><file name="success.phtml" hash="8426f6164c184d809c25f0cd35c3f3c1"/><file name="success.phtml" hash="8426f6164c184d809c25f0cd35c3f3c1"/></dir><dir name="form"><file name="form.phtml" hash="a9bed52032750b6d5b01d09306f63cc1"/><file name="mark.phtml" hash="59b0d4028051a96a8c54d5b33b67c8fd"/><file name="form.phtml" hash="a9bed52032750b6d5b01d09306f63cc1"/><file name="mark.phtml" hash="59b0d4028051a96a8c54d5b33b67c8fd"/><file name="form.phtml" hash="a9bed52032750b6d5b01d09306f63cc1"/><file name="mark.phtml" hash="59b0d4028051a96a8c54d5b33b67c8fd"/></dir><dir name="info"><file name="info.phtml" hash="657b730718019fd8a5d331f36d4c7cdd"/><file name="info.phtml" hash="657b730718019fd8a5d331f36d4c7cdd"/><file name="info.phtml" hash="657b730718019fd8a5d331f36d4c7cdd"/></dir></dir></dir><dir name="layout"><file name="multibanco.xml" hash="969c55bcef9cc469e66d53283a31c200"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><dir name="multibanco"><file name="eupagomultibanco.png" hash="0b8ff29352f558fc8e756339a337a885"/><file name="eupagomultibanco.png" hash="0b8ff29352f558fc8e756339a337a885"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="images"><dir name="multibanco"><file name="eupagomultibanco.png" hash="0ca321915123d5a712fb2b4f6744278a"/><file name="mb_mark.gif" hash="bbfd7b49dc892a72a8a87d8d1ae3e4ee"/><file name="eupagomultibanco.png" hash="0ca321915123d5a712fb2b4f6744278a"/><file name="mb_mark.gif" hash="bbfd7b49dc892a72a8a87d8d1ae3e4ee"/></dir></dir></dir></dir></dir></target></contents>
|
17 |
<compatible/>
|
18 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
19 |
</package>
|