Compropago_Payment_Extension - Version 1.1.2

Version Notes

## 7/07/2016 v1.1.2
* Feature: Auto restriccion de proveedores por monto de compra

Download this release

Release Info

Developer Oswaldo Lopez Garcia
Extension Compropago_Payment_Extension
Version 1.1.2
Comparing to
See all releases


Code changes from version 1.1.1 to 1.1.2

app/code/community/Compropago/Model/Standard.php CHANGED
@@ -190,7 +190,23 @@ class Compropago_Model_Standard extends Mage_Payment_Model_Method_Abstract
190
  $records []= $record;
191
  }
192
 
193
- return $records;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
194
  }
195
 
196
  /**
190
  $records []= $record;
191
  }
192
 
193
+
194
+ $sessionCheckout = Mage::getSingleton('checkout/session');
195
+ $quoteId = $sessionCheckout->getQuoteId();
196
+
197
+ $quote = Mage::getModel("sales/quote")->load($quoteId);
198
+ $grandTotal = $quote->getData('grand_total');
199
+
200
+ $finalRecord = array();
201
+
202
+ foreach ($records as $value){
203
+ if($value['transaction_limit'] >= $grandTotal){
204
+ $finalRecord []= $value;
205
+ }
206
+ }
207
+
208
+
209
+ return $finalRecord;
210
  }
211
 
212
  /**
app/design/frontend/base/default/template/compropago/cash.phtml CHANGED
@@ -18,25 +18,37 @@ $_getProviders = $_model->getProviders();
18
  provider = document.querySelector("#store_code_selected");
19
  paymentcheck.checked = true;
20
 
21
- btn = document.querySelector("button[ onclick^=payment ]");
22
- btn.setAttribute("onclick"," ");
23
 
24
- phone = document.querySelector("[title=Telephone]").value;
25
- document.querySelector("#customer_phone").value = phone;
26
 
27
- btn.addEventListener("click",function(evt){
28
- evt.preventDefault();
29
-
30
- if(paymentcheck.checked){
31
- if(provider.value == ""){
32
- alert("Seleccione una tienda para realizar el pago");
33
  }else{
34
  payment.save();
35
  }
36
- }else{
37
- payment.save();
38
- }
 
 
 
 
 
 
 
39
  });
 
 
 
 
 
40
  </script>
41
 
42
 
18
  provider = document.querySelector("#store_code_selected");
19
  paymentcheck.checked = true;
20
 
21
+ if(btn = document.querySelector("button[ onclick^=payment ]")){
22
+ btn.setAttribute("onclick"," ");
23
 
24
+ btn.addEventListener("click",function(evt){
25
+ evt.preventDefault();
26
 
27
+ if(paymentcheck.checked){
28
+ if(provider.value == ""){
29
+ alert("Seleccione una tienda para realizar el pago");
30
+ }else{
31
+ payment.save();
32
+ }
33
  }else{
34
  payment.save();
35
  }
36
+ });
37
+ }
38
+
39
+
40
+ var phoneInput = document.querySelector("[name*=telephone]");
41
+ var cpPhoneInput = document.querySelector("#customer_phone");
42
+
43
+
44
+ phoneInput.addEventListener("change",function(evt){
45
+ cpPhoneInput.value = phoneInput.value;
46
  });
47
+
48
+
49
+ cpPhoneInput.value = phoneInput.value;
50
+
51
+
52
  </script>
53
 
54
 
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Compropago_Payment_Extension</name>
4
- <version>1.1.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
@@ -20,13 +20,12 @@ The possibility of requesting your funds and receiving them in your bank account
20
  Besides you will be able to: Automatically update your order status both in your online store and in ComproPago&#x2019;s account. &#xD;
21
  &#xD;
22
  Send email notifications for pending orders and reminder notifications to increase conversion rates.</description>
23
- <notes>## 28/06/2016 v1.1.1&#xD;
24
- * Feature: App client name capture&#xD;
25
- * Feature: App client version capture</notes>
26
  <authors><author><name>Oswaldo Lopez Garcia</name><user>waldix</user><email>waldix@compropago.com</email></author><author><name>Eduardo Aguilar</name><user>eduardoay</user><email>eduardo.aguilar@compropago.com</email></author></authors>
27
- <date>2016-06-28</date>
28
- <time>16:29:50</time>
29
- <contents><target name="mageetc"><dir name="modules"><file name="Compropago.xml" hash="884374bb8a46b5ac9a62cd8b9f351401"/></dir></target><target name="magecommunity"><dir name="Compropago"><dir><dir name="Block"><file name="Form.php" hash="3433488444c881f51228924453689c4a"/><file name="OnepageSuccess.php" hash="7873729a10083644d735ce193e2b1752"/></dir><dir name="Helper"><file name="Data.php" hash="5d3d5f4f86f2cec56315a1b02cc3d308"/></dir><dir name="Model"><file name="Api.php" hash="8070b909572fc67102f702c88190fb03"/><file name="Providers.php" hash="14a80d69659ee43913745a40c59c25cf"/><file name="Standard.php" hash="20e788a3d496d991cc827e8f668681cf"/></dir><dir name="controllers"><file name="WebhookController.php" hash="b34aeec38ae45833c8adc57f1e94e624"/></dir><dir name="etc"><file name="config.xml" hash="26776d50679f9c07924f5ab0a7beeb76"/><file name="system.xml" hash="63d480092fa87465736d905668e3110a"/></dir></dir><file name=".DS_Store" hash="eb03774a462f5cc9f379a3cc14db34f0"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="compropago"><file name="cash.phtml" hash="5d0b597a3f811b22b22b7cb280f9f883"/><file name="onepage_success.phtml" hash="b85d49f5e82ed292da8e0d7c555d0fc4"/></dir></dir><dir name="layout"><file name="compropago.xml" hash="b4c43eb397d0a9ce59b35377ef70e0ed"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="compropago"><file name="compropago.css" hash="c31f0093851df11b1782c68a81e9fa86"/></dir></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="compropago"><file name="compropago.js" hash="a54eee5266f30f33c3355d0ac770e8f0"/></dir></dir></target></contents>
30
  <compatible/>
31
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
32
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Compropago_Payment_Extension</name>
4
+ <version>1.1.2</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
20
  Besides you will be able to: Automatically update your order status both in your online store and in ComproPago&#x2019;s account. &#xD;
21
  &#xD;
22
  Send email notifications for pending orders and reminder notifications to increase conversion rates.</description>
23
+ <notes>## 7/07/2016 v1.1.2&#xD;
24
+ * Feature: Auto restriccion de proveedores por monto de compra</notes>
 
25
  <authors><author><name>Oswaldo Lopez Garcia</name><user>waldix</user><email>waldix@compropago.com</email></author><author><name>Eduardo Aguilar</name><user>eduardoay</user><email>eduardo.aguilar@compropago.com</email></author></authors>
26
+ <date>2016-07-07</date>
27
+ <time>16:48:51</time>
28
+ <contents><target name="mageetc"><dir name="modules"><file name="Compropago.xml" hash="884374bb8a46b5ac9a62cd8b9f351401"/></dir></target><target name="magecommunity"><dir name="Compropago"><dir><dir name="Block"><file name="Form.php" hash="3433488444c881f51228924453689c4a"/><file name="OnepageSuccess.php" hash="7873729a10083644d735ce193e2b1752"/></dir><dir name="Helper"><file name="Data.php" hash="5d3d5f4f86f2cec56315a1b02cc3d308"/></dir><dir name="Model"><file name="Api.php" hash="8070b909572fc67102f702c88190fb03"/><file name="Providers.php" hash="14a80d69659ee43913745a40c59c25cf"/><file name="Standard.php" hash="db4d2f563d8874c50b96b4634097dffb"/></dir><dir name="controllers"><file name="WebhookController.php" hash="b34aeec38ae45833c8adc57f1e94e624"/></dir><dir name="etc"><file name="config.xml" hash="26776d50679f9c07924f5ab0a7beeb76"/><file name="system.xml" hash="63d480092fa87465736d905668e3110a"/></dir></dir><file name=".DS_Store" hash="eb03774a462f5cc9f379a3cc14db34f0"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="compropago"><file name="cash.phtml" hash="50bde01c08c5016267078d42cafe72ed"/><file name="onepage_success.phtml" hash="b85d49f5e82ed292da8e0d7c555d0fc4"/></dir></dir><dir name="layout"><file name="compropago.xml" hash="b4c43eb397d0a9ce59b35377ef70e0ed"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="compropago"><file name="compropago.css" hash="c31f0093851df11b1782c68a81e9fa86"/></dir></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="compropago"><file name="compropago.js" hash="a54eee5266f30f33c3355d0ac770e8f0"/></dir></dir></target></contents>
29
  <compatible/>
30
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
31
  </package>