payitsimplepayment - Version 2.0.7

Version Notes

Support multi-currency in admin for depending on cart total.

Download this release

Release Info

Developer Eric Benayoun
Extension payitsimplepayment
Version 2.0.7
Comparing to
See all releases


Code changes from version 2.0.6 to 2.0.7

app/code/community/PayItSimple/Payment/Block/Adminhtml/Addresses.php CHANGED
@@ -3,10 +3,27 @@ class PayItSimple_Payment_Block_Adminhtml_Addresses extends Mage_Adminhtml_Block
3
{
4
protected $_addRowButtonHtml = array();
5
protected $_removeRowButtonHtml = array();
6
public function __construct()
7
{
8
parent::_construct();
9
//$this->setTemplate('payitsimple/system/config/button.phtml');
10
}
11
12
protected function _prepareLayout()
@@ -31,7 +48,7 @@ class PayItSimple_Payment_Block_Adminhtml_Addresses extends Mage_Adminhtml_Block
31
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
32
{
33
$this->setElement($element);
34
- $doctv = Mage::getStoreConfig('payment/pis_cc/depanding_on_cart_total_values');
35
$html = "";
36
if($doctv == ""){
37
$html = $this->getTableHtmlWhenEmpty();
3
{
4
protected $_addRowButtonHtml = array();
5
protected $_removeRowButtonHtml = array();
6
+ public $_storeId = "";
7
public function __construct()
8
{
9
parent::_construct();
10
//$this->setTemplate('payitsimple/system/config/button.phtml');
11
+ // get store id in admin
12
+ if (strlen($code = Mage::getSingleton('adminhtml/config_data')->getStore())) // store level
13
+ {
14
+ $store_id = Mage::getModel('core/store')->load($code)->getId();
15
+ }
16
+ elseif (strlen($code = Mage::getSingleton('adminhtml/config_data')->getWebsite())) // website level
17
+ {
18
+ $website_id = Mage::getModel('core/website')->load($code)->getId();
19
+ $store_id = Mage::app()->getWebsite($website_id)->getDefaultStore()->getId();
20
+ }
21
+ else // default level
22
+ {
23
+ $store_id = 0;
24
+ }
25
+ $this->_storeId = $store_id;
26
+
27
}
28
29
protected function _prepareLayout()
48
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
49
{
50
$this->setElement($element);
51
+ $doctv = Mage::getStoreConfig('payment/pis_cc/depanding_on_cart_total_values', $this->_storeId);
52
$html = "";
53
if($doctv == ""){
54
$html = $this->getTableHtmlWhenEmpty();
app/code/community/PayItSimple/Payment/etc/system.xml CHANGED
@@ -209,8 +209,8 @@
209
<!-- <backend_model>adminhtml/system_config_backend_serialized</backend_model> -->
210
<sort_order>112</sort_order>
211
<show_in_default>1</show_in_default>
212
- <show_in_website>0</show_in_website>
213
- <show_in_store>0</show_in_store>
214
<can_be_empty>1</can_be_empty>
215
</addresses>
216
<depanding_on_cart_total_values translate="label">
@@ -218,8 +218,8 @@
218
<frontend_type>hidden</frontend_type>
219
<sort_order>114</sort_order>
220
<show_in_default>1</show_in_default>
221
- <show_in_website>0</show_in_website>
222
- <show_in_store>0</show_in_store>
223
</depanding_on_cart_total_values>
224
225
<installment_price_setup_label translate="label">
209
<!-- <backend_model>adminhtml/system_config_backend_serialized</backend_model> -->
210
<sort_order>112</sort_order>
211
<show_in_default>1</show_in_default>
212
+ <show_in_website>1</show_in_website>
213
+ <show_in_store>1</show_in_store>
214
<can_be_empty>1</can_be_empty>
215
</addresses>
216
<depanding_on_cart_total_values translate="label">
218
<frontend_type>hidden</frontend_type>
219
<sort_order>114</sort_order>
220
<show_in_default>1</show_in_default>
221
+ <show_in_website>1</show_in_website>
222
+ <show_in_store>1</show_in_store>
223
</depanding_on_cart_total_values>
224
225
<installment_price_setup_label translate="label">
app/design/adminhtml/default/default/template/payitsimple/system/config/addresses.phtml CHANGED
@@ -19,7 +19,7 @@ jQuery(document).ready(function(){
19
jQuery('.save').attr('onclick','');
20
}
21
jQuery(".splitit").closest("td.value").addClass("grid");
22
- row_payment_pis_cc_depanding_on_cart_total_values
23
jQuery("#row_payment_pis_cc_depanding_on_cart_total_values").find("td.scope-label").hide();
24
25
jQuery(document).on("mousedown", ".save", function(event) {
@@ -248,6 +248,7 @@ function createJsonOfDependingOnCartTotal(){
248
i++;
249
});
250
object = JSON.stringify(object);
251
jQuery("#payment_pis_cc_depanding_on_cart_total_values").val(object);
252
253
}
19
jQuery('.save').attr('onclick','');
20
}
21
jQuery(".splitit").closest("td.value").addClass("grid");
22
+ //row_payment_pis_cc_depanding_on_cart_total_values
23
jQuery("#row_payment_pis_cc_depanding_on_cart_total_values").find("td.scope-label").hide();
24
25
jQuery(document).on("mousedown", ".save", function(event) {
248
i++;
249
});
250
object = JSON.stringify(object);
251
+ console.log(object);
252
jQuery("#payment_pis_cc_depanding_on_cart_total_values").val(object);
253
254
}
js/payitsimple/checkout.js CHANGED
@@ -131,6 +131,7 @@ function paymentSave(){
131
// check term checkbox which is hidden
132
jQuery(".terms-conditions div").remove();
133
jQuery('#pis_cc_terms').prop('checked', true);
134
jQuery("#approval-popup").hide();
135
}else{
136
jQuery(".i_ack_err").show();
131
// check term checkbox which is hidden
132
jQuery(".terms-conditions div").remove();
133
jQuery('#pis_cc_terms').prop('checked', true);
134
+ jQuery('#one-step-checkout-review-terms-agreement-mc_osc_term').prop('checked', true);
135
jQuery("#approval-popup").hide();
136
}else{
137
jQuery(".i_ack_err").show();
package.xml CHANGED
@@ -1,18 +1,18 @@
1
<?xml version="1.0"?>
2
<package>
3
<name>payitsimplepayment</name>
4
- <version>2.0.6</version>
5
<stability>stable</stability>
6
<license>OSL v3.0</license>
7
<channel>community</channel>
8
<extends/>
9
<summary>Offer your customers interest-free credit card installment payments. Official extension.</summary>
10
<description>This extension allows ecommerce merchants to add an additional payment method to your checkout process. A Splitit button is added to your website for fast and easy checkout.&lt;br /&gt; It was carefully designed to meet all Magento best development practices and is compatible with all other extensions. This extension is free of charge.&lt;br /&gt;&lt;br /&gt; &lt;h3&gt;Signup for FREE&lt;/h3&gt; &lt;a href="http://payitsimple.com/register/"&gt;Signup with Splitit for FREE and start offering your customers interest-free installment payments on their existing credit cards.&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;</description>
11
- <notes>Support multi-currency for depending on cart total.</notes>
12
<authors><author><name>Eric Benayoun</name><user>ericbena</user><email>ericb@splitit.com</email></author></authors>
13
- <date>2017-04-25</date>
14
- <time>14:19:33</time>
15
- <contents><target name="mageetc"><dir name="modules"><file name="PayItSimple_Payment.xml" hash="608e164d747a215efa2cf4d062693236"/></dir></target><target name="magecommunity"><dir name="PayItSimple"><dir name="Payment"><dir name="Block"><dir name="Adminhtml"><file name="Addresses.php" hash="c9e039ce7123b2c917db49395a38e621"/><dir name="System"><dir name="Config"><dir name="Form"><file name="Button.php" hash="4f726bf958620400bac66c0757717411"/></dir><file name="Notification.php" hash="27ac86d84fe3927c28abc6da018736cd"/></dir></dir></dir><dir name="Form"><file name="Pis.php" hash="b29945f92f5131ec71468636ce61dafe"/></dir><dir name="Info"><file name="Pis.php" hash="42cb4edb5ff208a1a3ee7612579a6165"/></dir></dir><dir name="Helper"><file name="Data.php" hash="1fba2ce41eb4f554e365d82424323ccd"/></dir><dir name="Model"><file name="Api.php" hash="c90275f29eca956e40264fa6f38cad4c"/><file name="Observer.php" hash="e12b8d880b038f3965325476862eeddf"/><file name="PisMethod.php" hash="70ae765383c60c81395b9dc373dfa6cc"/><dir name="Source"><file name="Action.php" hash="1390fb3dce78cf8eff1118df2ee5b997"/><file name="Cctype.php" hash="7f77a0c6729d0896c8ec250bb7f4fd49"/><file name="Firstpayment.php" hash="bd96f52609ba07f9b166e4bdcd1b8664"/><file name="Frontendpages.php" hash="526d1e6875b3092f1b946c5de81f7513"/><file name="Installments.php" hash="65b727e639308cba4241662a2040d6f3"/><file name="Selectinstallmentsetup.php" hash="4af3a6fc08ea94eb5b25837fb5fa40c7"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="PayitsimpleController.php" hash="7c757c70dd4b654997622d713dc73e66"/></dir><file name="PaymentController.php" hash="c63215c5b7f1a4e28e8632330ea9a675"/></dir><dir name="etc"><file name="config.xml" hash="a208044c3af976ed3f1b084c85af81af"/><file name="system.xml" hash="0de65d9ed58f9f618be980c5e0ff711a"/></dir><dir name="sql"><dir name="pis_payment_setup"><file name="mysql4-install-1.0.0.php" hash="f2687e3adaa4654942a882287a0bf532"/></dir></dir></dir></dir></target><target name="magedesign"><dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="payitsimple"><dir name="system"><dir name="config"><file name="addresses.phtml" hash="ee6b3c18e827930a2820775d00c86ed3"/><file name="button.phtml" hash="cf9f1fd8b02d796a85156c0df605a4ba"/><file name="notification.phtml" hash="86940d0b8a6695c54daaf6b7918633dc"/></dir></dir></dir></dir><dir name="layout"><file name="payitsimple_notification.xml" hash="51da7978dbea5c9f9f5dc2c63caca786"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="payitsimple"><dir name="form"><file name="method_faq.phtml" hash="96137f1fdfaa264a9b30ac18e20efe19"/><file name="pis.phtml" hash="9ac23b2fb5e357cb157de62706486e58"/></dir><file name="help.phtml" hash="1c2b0b2b65b4313b4382fb74a9d63844"/><file name="splitprice.phtml" hash="7fd61eefb83c2abde645fbd3e0067ac7"/><file name="terms.phtml" hash="f5a8ea332b4179622810fa759291e424"/></dir></dir><dir name="layout"><file name="pis_payment.xml" hash="396990452fc2ba83c2917f7abbfb9196"/></dir></dir></dir></dir></dir></target><target name="mageskin"><dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="pis_checkout.css" hash="d230ef00c44f9d6d30c24cb774ce0fcb"/></dir></dir></dir></dir></dir></target><target name="mageweb"><dir><dir name="js"><dir name="payitsimple"><file name="checkout.js" hash="6474d718a35f8d2b28ad9cda49ea4465"/><file name="jquery-1.12.4.js" hash="491d557f4d119677c4031639c7ec473c"/><file name="jquery-2.2.4.min.js" hash="2f6b11a7e914718e0290410e85366fe9"/><dir name="payitsimplepament"><file name="Amex_logo.png" hash="baa1ee84ce383983f6c6acb4057d62c0"/><file name="LearnMore.png" hash="4af0f9684c7098491b8a65bc2b9dd741"/><file name="MC_logo.png" hash="810349f2cbe27ba2de32b8976d64c004"/><file name="Splitit_by.png" hash="7e7a0d387efd84ca060a0996c8e7da86"/><file name="Visa_logo.png" hash="e39e0ff1010d2c15960ec54d001fe3bd"/><file name="approval-popup-close.png" hash="a4d99d95265e08d016edad958ab4f126"/><file name="opc-ajax-loader.gif" hash="f48ee069890b16455c3ddcacee9b5f75"/><file name="splitit_new_logo.png" hash="341acd95a1643e06701f9985bc2bd06c"/></dir></dir></dir></dir></target></contents>
16
<compatible/>
17
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
</package>
1
<?xml version="1.0"?>
2
<package>
3
<name>payitsimplepayment</name>
4
+ <version>2.0.7</version>
5
<stability>stable</stability>
6
<license>OSL v3.0</license>
7
<channel>community</channel>
8
<extends/>
9
<summary>Offer your customers interest-free credit card installment payments. Official extension.</summary>
10
<description>This extension allows ecommerce merchants to add an additional payment method to your checkout process. A Splitit button is added to your website for fast and easy checkout.&lt;br /&gt; It was carefully designed to meet all Magento best development practices and is compatible with all other extensions. This extension is free of charge.&lt;br /&gt;&lt;br /&gt; &lt;h3&gt;Signup for FREE&lt;/h3&gt; &lt;a href="http://payitsimple.com/register/"&gt;Signup with Splitit for FREE and start offering your customers interest-free installment payments on their existing credit cards.&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;</description>
11
+ <notes>Support multi-currency in admin for depending on cart total.</notes>
12
<authors><author><name>Eric Benayoun</name><user>ericbena</user><email>ericb@splitit.com</email></author></authors>
13
+ <date>2017-05-02</date>
14
+ <time>12:18:11</time>
15
+ <contents><target name="magecommunity"><dir name="PayItSimple"><dir name="Payment"><dir name="Block"><dir name="Adminhtml"><file name="Addresses.php" hash="7d6d3b1ca1a1a5d90c3c661c3d7ba4ac"/><dir name="System"><dir name="Config"><dir name="Form"><file name="Button.php" hash="4f726bf958620400bac66c0757717411"/></dir><file name="Notification.php" hash="27ac86d84fe3927c28abc6da018736cd"/></dir></dir></dir><dir name="Form"><file name="Pis.php" hash="b29945f92f5131ec71468636ce61dafe"/></dir><dir name="Info"><file name="Pis.php" hash="42cb4edb5ff208a1a3ee7612579a6165"/></dir></dir><dir name="Helper"><file name="Data.php" hash="1fba2ce41eb4f554e365d82424323ccd"/></dir><dir name="Model"><file name="Api.php" hash="c90275f29eca956e40264fa6f38cad4c"/><file name="Observer.php" hash="e12b8d880b038f3965325476862eeddf"/><file name="PisMethod.php" hash="70ae765383c60c81395b9dc373dfa6cc"/><dir name="Source"><file name="Action.php" hash="1390fb3dce78cf8eff1118df2ee5b997"/><file name="Cctype.php" hash="7f77a0c6729d0896c8ec250bb7f4fd49"/><file name="Firstpayment.php" hash="bd96f52609ba07f9b166e4bdcd1b8664"/><file name="Frontendpages.php" hash="526d1e6875b3092f1b946c5de81f7513"/><file name="Installments.php" hash="65b727e639308cba4241662a2040d6f3"/><file name="Selectinstallmentsetup.php" hash="4af3a6fc08ea94eb5b25837fb5fa40c7"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="PayitsimpleController.php" hash="7c757c70dd4b654997622d713dc73e66"/></dir><file name="PaymentController.php" hash="c63215c5b7f1a4e28e8632330ea9a675"/></dir><dir name="etc"><file name="config.xml" hash="a208044c3af976ed3f1b084c85af81af"/><file name="system.xml" hash="01f3fb45aa63110e8bd1d0f7849fca14"/></dir><dir name="sql"><dir name="pis_payment_setup"><file name="mysql4-install-1.0.0.php" hash="f2687e3adaa4654942a882287a0bf532"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="PayItSimple_Payment.xml" hash="608e164d747a215efa2cf4d062693236"/></dir></target><target name="magedesign"><dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="payitsimple"><dir name="system"><dir name="config"><file name="addresses.phtml" hash="6b581efc93bec2dc12c27a37b2306bcc"/><file name="button.phtml" hash="cf9f1fd8b02d796a85156c0df605a4ba"/><file name="notification.phtml" hash="86940d0b8a6695c54daaf6b7918633dc"/></dir></dir></dir></dir><dir name="layout"><file name="payitsimple_notification.xml" hash="51da7978dbea5c9f9f5dc2c63caca786"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="payitsimple"><dir name="form"><file name="method_faq.phtml" hash="96137f1fdfaa264a9b30ac18e20efe19"/><file name="pis.phtml" hash="9ac23b2fb5e357cb157de62706486e58"/></dir><file name="help.phtml" hash="1c2b0b2b65b4313b4382fb74a9d63844"/><file name="splitprice.phtml" hash="7fd61eefb83c2abde645fbd3e0067ac7"/><file name="terms.phtml" hash="f5a8ea332b4179622810fa759291e424"/></dir></dir><dir name="layout"><file name="pis_payment.xml" hash="396990452fc2ba83c2917f7abbfb9196"/></dir></dir></dir></dir></dir></target><target name="mageskin"><dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="pis_checkout.css" hash="d230ef00c44f9d6d30c24cb774ce0fcb"/></dir></dir></dir></dir></dir></target><target name="mage"><dir><dir name="js"><dir name="payitsimple"><file name="checkout.js" hash="873c0ba277ccd32836077270d8fe9871"/><file name="jquery-1.12.4.js" hash="491d557f4d119677c4031639c7ec473c"/><file name="jquery-2.2.4.min.js" hash="2f6b11a7e914718e0290410e85366fe9"/><dir name="payitsimplepament"><file name="Amex_logo.png" hash="baa1ee84ce383983f6c6acb4057d62c0"/><file name="LearnMore.png" hash="4af0f9684c7098491b8a65bc2b9dd741"/><file name="MC_logo.png" hash="810349f2cbe27ba2de32b8976d64c004"/><file name="Splitit_by.png" hash="7e7a0d387efd84ca060a0996c8e7da86"/><file name="Visa_logo.png" hash="e39e0ff1010d2c15960ec54d001fe3bd"/><file name="approval-popup-close.png" hash="a4d99d95265e08d016edad958ab4f126"/><file name="opc-ajax-loader.gif" hash="f48ee069890b16455c3ddcacee9b5f75"/><file name="splitit_new_logo.png" hash="341acd95a1643e06701f9985bc2bd06c"/></dir></dir></dir></dir></target></contents>
16
<compatible/>
17
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
</package>