Mymonki_Ship2pay - Version 1.0.6

Version Notes

Better payment title handling.

Download this release

Release Info

Developer Magento Core Team
Extension Mymonki_Ship2pay
Version 1.0.6
Comparing to
See all releases


Code changes from version 1.0.4 to 1.0.6

app/code/community/Mymonki/Ship2pay/Block/Adminhtml/Ship2pay.php CHANGED
@@ -80,6 +80,7 @@ class Mymonki_Ship2pay_Block_Adminhtml_Ship2pay extends Mage_Adminhtml_Block_Sys
80
  $html .= '<option value=""></option>';
81
  foreach($payment_methods as $payment_method)
82
  {
 
83
  if($payment_method['value'] == $this->_getValue('payment_method/'.$i))
84
  $html .= '<option value="'.$payment_method['value'].'" selected>'.$payment_method['label'].'</option>';
85
  else
80
  $html .= '<option value=""></option>';
81
  foreach($payment_methods as $payment_method)
82
  {
83
+ //Mage::log('Payment Method: '.var_export($payment_method, true));
84
  if($payment_method['value'] == $this->_getValue('payment_method/'.$i))
85
  $html .= '<option value="'.$payment_method['value'].'" selected>'.$payment_method['label'].'</option>';
86
  else
app/code/community/Mymonki/Ship2pay/Helper/Data.php CHANGED
@@ -28,6 +28,7 @@ class Mymonki_Ship2pay_Helper_Data extends Mage_Core_Helper_Abstract {
28
  $options = array();
29
  foreach ($methods as $code => $methodConfig)
30
  {
 
31
  $prefix = self::XML_PATH_PAYMENT_METHODS . '/' . $code . '/';
32
  if (!$model = Mage::getStoreConfig($prefix . 'model', $storeId)) {
33
  continue;
@@ -36,10 +37,19 @@ class Mymonki_Ship2pay_Helper_Data extends Mage_Core_Helper_Abstract {
36
  if (!$methodInstance) {
37
  continue;
38
  }
39
-
 
 
 
 
 
 
 
 
 
40
  array_unshift($options, array(
41
  'value' => $methodInstance->getCode(),
42
- 'label' => $methodInstance->getTitle(),
43
  ));
44
  }
45
  return $options;
28
  $options = array();
29
  foreach ($methods as $code => $methodConfig)
30
  {
31
+
32
  $prefix = self::XML_PATH_PAYMENT_METHODS . '/' . $code . '/';
33
  if (!$model = Mage::getStoreConfig($prefix . 'model', $storeId)) {
34
  continue;
37
  if (!$methodInstance) {
38
  continue;
39
  }
40
+
41
+ $method_label = $methodInstance->getConfigData('title');
42
+ $method_label = trim($method_label);
43
+
44
+ if(!$method_label)
45
+ $method_label = $methodInstance->getCode();
46
+
47
+ if($methodInstance->getCode() == 'klarna_partpayment')
48
+ Mage::log(var_export($methodInstance->getConfigData('title'), true));
49
+
50
  array_unshift($options, array(
51
  'value' => $methodInstance->getCode(),
52
+ 'label' => $method_label,
53
  ));
54
  }
55
  return $options;
app/code/community/Mymonki/Ship2pay/etc/config.xml CHANGED
@@ -10,7 +10,7 @@
10
  <config>
11
  <modules>
12
  <Mymonki_Ship2pay>
13
- <version>1.0.4</version>
14
  </Mymonki_Ship2pay>
15
  </modules>
16
  <global>
10
  <config>
11
  <modules>
12
  <Mymonki_Ship2pay>
13
+ <version>1.0.6</version>
14
  </Mymonki_Ship2pay>
15
  </modules>
16
  <global>
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Mymonki_Ship2pay</name>
4
- <version>1.0.4</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Shows payment methods depending on shipping method.</summary>
10
  <description>Module that limits the number of payment options depending on the chosen shipping method. For example When my client chooses pickup at store he should not be able to select bank transfer</description>
11
- <notes>Small fix to remove PHP Notice error in configuration panel.</notes>
12
  <authors><author><name>Pawe&#x142;</name><user>auto-converted</user><email>pawel@freshmind.pl</email></author></authors>
13
- <date>2011-01-18</date>
14
- <time>13:14:33</time>
15
- <contents><target name="mageetc"><dir name="modules"><file name="Mymonki_Ship2pay.xml" hash="7faf6630d1abba5fb960ece11c1c1c12"/></dir></target><target name="magecommunity"><dir name="Mymonki"><dir name="Ship2pay"><dir name="Block"><dir name="Adminhtml"><file name="Ship2pay.php" hash="0a63a170a58d015a4fc4f55ca538b39a"/></dir><dir name="Onepage"><dir name="Payment"><file name="Methods.php" hash="a38171e298ada58138f4756fb43b657a"/></dir></dir></dir><dir name="etc"><file name="config.xml" hash="11d4e598f6f36357b5e5fa982da5dcbb"/><file name="system.xml" hash="3f9c3640c298ba4db33a43e80b0a9bba"/></dir><dir name="Helper"><file name="Data.php" hash="c63e123989cca0c264b8f78e6199bfbf"/></dir><dir name="Model"><file name="Ship2pay.php" hash="fe9107310985aa408e2141eb2e486b45"/></dir></dir></dir></target><target name="magelocale"><dir name="pl_PL"><file name="Mymonki_Ship2pay.csv" hash="7723347de6de6068f8d8b6b9fa227a15"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Mymonki_Ship2pay</name>
4
+ <version>1.0.6</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Shows payment methods depending on shipping method.</summary>
10
  <description>Module that limits the number of payment options depending on the chosen shipping method. For example When my client chooses pickup at store he should not be able to select bank transfer</description>
11
+ <notes>Better payment title handling.</notes>
12
  <authors><author><name>Pawe&#x142;</name><user>auto-converted</user><email>pawel@freshmind.pl</email></author></authors>
13
+ <date>2011-04-19</date>
14
+ <time>09:40:26</time>
15
+ <contents><target name="magelocale"><dir name="pl_PL"><file name="Mymonki_Ship2pay.csv" hash="7723347de6de6068f8d8b6b9fa227a15"/></dir></target><target name="magecommunity"><dir name="Mymonki"><dir name="Ship2pay"><dir name="Block"><dir name="Adminhtml"><file name="Ship2pay.php" hash="076e6e0840129b8517df6b92d177d352"/></dir><dir name="Onepage"><dir name="Payment"><file name="Methods.php" hash="a38171e298ada58138f4756fb43b657a"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="842ea91345350422ec3b07c60f2553eb"/></dir><dir name="Model"><file name="Ship2pay.php" hash="fe9107310985aa408e2141eb2e486b45"/></dir><dir name="etc"><file name="config.xml" hash="d59a2b2265efb69cdf03212ecd6cb4bb"/><file name="system.xml" hash="3f9c3640c298ba4db33a43e80b0a9bba"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Mymonki_Ship2pay.xml" hash="7faf6630d1abba5fb960ece11c1c1c12"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>