aongkir - Version 1.0.0.2

Version Notes

fixed limitation weight issue

Download this release

Release Info

Developer Ansyori
Extension aongkir
Version 1.0.0.2
Comparing to
See all releases


Code changes from version 1.0.0.1 to 1.0.0.2

app/code/local/Ansyori/Aongkir/Model/Carrier/Ongkir.php CHANGED
@@ -57,18 +57,29 @@ class Ansyori_Aongkir_Model_Carrier_Ongkir
57
  $origin = $this->getOriginId();
58
  $dest = $this->getCityId();
59
  $weight = $this->getBeratTotal();
 
60
  $carriers = $this->getActiveCarriers();
61
 
62
  $rate_list = array();
63
  //getRates($origin,$dest,$weight,$kurir)
64
  foreach($carriers as $kurir)
65
  {
66
- $rates_by_kurir = $this->helper()->getRates($origin,$dest,$weight,$kurir);
 
 
 
 
67
  foreach($rates_by_kurir as $final_list)
68
  {
 
 
 
 
 
 
69
  $rate_list[] = array(
70
- 'text' => $final_list['text'],
71
- 'cost' => $final_list['cost'],
72
 
73
  );
74
  }
57
  $origin = $this->getOriginId();
58
  $dest = $this->getCityId();
59
  $weight = $this->getBeratTotal();
60
+
61
  $carriers = $this->getActiveCarriers();
62
 
63
  $rate_list = array();
64
  //getRates($origin,$dest,$weight,$kurir)
65
  foreach($carriers as $kurir)
66
  {
67
+ if($weight > 29){
68
+ $rates_by_kurir = $this->helper()->getRates($origin,$dest,1,$kurir);
69
+ }else{
70
+ $rates_by_kurir = $this->helper()->getRates($origin,$dest,$weight,$kurir);
71
+ };
72
  foreach($rates_by_kurir as $final_list)
73
  {
74
+ if($weight > 29):
75
+ $ship_cost = $final_list['cost'] * $weight;
76
+ else:
77
+ $ship_cost = $final_list['cost'];
78
+ endif;
79
+
80
  $rate_list[] = array(
81
+ 'text' => $final_list['text'] . "($weight Kg)",
82
+ 'cost' => $ship_cost
83
 
84
  );
85
  }
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>aongkir</name>
4
- <version>1.0.0.1</version>
5
  <stability>stable</stability>
6
  <license>open source</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Indonesian Shippping Carriers</summary>
10
  <description>Indonesian Shippping Carriers</description>
11
- <notes>Indonesian Shippping Carriers</notes>
12
  <authors><author><name>Ansyori</name><user>ansyori</user><email>ansyori@gmail.com</email></author></authors>
13
- <date>2015-03-27</date>
14
- <time>02:41:06</time>
15
- <contents><target name="magelocal"><dir name="Ansyori"><dir name="Aongkir"><dir name="Block"><file name="Index.php" hash="eb68794e0f3220839a02dba0f9f7f105"/></dir><dir name="Helper"><file name="Data.php" hash="053a1cbaebc94470d1c05e34f1c32571"/></dir><dir name="Model"><file name="Area.php" hash="a50294a1ead04ef920bd79c457f4bc8a"/><dir name="Carrier"><file name="Ongkir.php" hash="00666f69245ba15234bbba91579a2b79"/></dir><file name="Cron.php" hash="df18b4f51639879ce741063dcd34ce23"/><dir name="Mysql4"><dir name="Area"><file name="Collection.php" hash="5a1d6cfd02be80f7038f3cafd27f3ec1"/></dir><file name="Area.php" hash="79392c31d15280d608e47a12bcda6685"/></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="City.php" hash="db48d237dd037433d142e7bfd4fbe15a"/><file name="Kurir.php" hash="6b42824b026a709f56faa600e6cf1428"/></dir></dir></dir></dir><dir name="controllers"><file name="IndexController.php" hash="0fecc86f6fc58a6bd23375c628cd683e"/></dir><dir name="etc"><file name="adminhtml.xml" hash="7524c909e4c0ac821d4e0d41379c04d2"/><file name="config.xml" hash="ad9e0216ad24f345651bb8be9b096d42"/><file name="system.xml" hash="e1213117c56a0585cf75a459a5464a30"/></dir><dir name="sql"><dir name="aongkir_setup"><file name="mysql4-install-1.0.0.php" hash="4e8ba5ec0e19a30d13bb9568be4605eb"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="aongkir.xml" hash="ec81d1456c144f706915d4daa6fb14d0"/></dir><dir name="template"><dir name="aongkir"><file name="billing.phtml" hash="c1b9f178f56c66e0a27c797c7cce3c8b"/><file name="edit.phtml" hash="5cf1cf4425ec2311c8475a648ac38137"/><file name="shipping.phtml" hash="b65870bda7c2ba76a0ef2f22fdf339a2"/></dir></dir></dir></dir><dir name="rwd"><dir name="default"><dir name="layout"><file name="aongkir.xml" hash="ec81d1456c144f706915d4daa6fb14d0"/></dir><dir name="template"><dir name="aongkir"><file name="billing.phtml" hash="c1b9f178f56c66e0a27c797c7cce3c8b"/><file name="edit.phtml" hash="5cf1cf4425ec2311c8475a648ac38137"/><file name="shipping.phtml" hash="b65870bda7c2ba76a0ef2f22fdf339a2"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Ansyori_Aongkir.xml" hash="f7f4be17fe16141cff15994c4f202a0f"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>aongkir</name>
4
+ <version>1.0.0.2</version>
5
  <stability>stable</stability>
6
  <license>open source</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Indonesian Shippping Carriers</summary>
10
  <description>Indonesian Shippping Carriers</description>
11
+ <notes>fixed limitation weight issue</notes>
12
  <authors><author><name>Ansyori</name><user>ansyori</user><email>ansyori@gmail.com</email></author></authors>
13
+ <date>2015-04-17</date>
14
+ <time>01:50:14</time>
15
+ <contents><target name="magelocal"><dir name="Ansyori"><dir name="Aongkir"><dir name="Block"><file name="Index.php" hash="eb68794e0f3220839a02dba0f9f7f105"/></dir><dir name="Helper"><file name="Data.php" hash="053a1cbaebc94470d1c05e34f1c32571"/></dir><dir name="Model"><file name="Area.php" hash="a50294a1ead04ef920bd79c457f4bc8a"/><dir name="Carrier"><file name="Ongkir.php" hash="4bb5434fc91f2a8440c34c2fb9a41330"/></dir><file name="Cron.php" hash="df18b4f51639879ce741063dcd34ce23"/><dir name="Mysql4"><dir name="Area"><file name="Collection.php" hash="5a1d6cfd02be80f7038f3cafd27f3ec1"/></dir><file name="Area.php" hash="79392c31d15280d608e47a12bcda6685"/></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="City.php" hash="db48d237dd037433d142e7bfd4fbe15a"/><file name="Kurir.php" hash="6b42824b026a709f56faa600e6cf1428"/></dir></dir></dir></dir><dir name="controllers"><file name="IndexController.php" hash="0fecc86f6fc58a6bd23375c628cd683e"/></dir><dir name="etc"><file name="adminhtml.xml" hash="7524c909e4c0ac821d4e0d41379c04d2"/><file name="config.xml" hash="ad9e0216ad24f345651bb8be9b096d42"/><file name="system.xml" hash="e1213117c56a0585cf75a459a5464a30"/></dir><dir name="sql"><dir name="aongkir_setup"><file name="mysql4-install-1.0.0.php" hash="4e8ba5ec0e19a30d13bb9568be4605eb"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="aongkir.xml" hash="ec81d1456c144f706915d4daa6fb14d0"/></dir><dir name="template"><dir name="aongkir"><file name="billing.phtml" hash="c1b9f178f56c66e0a27c797c7cce3c8b"/><file name="edit.phtml" hash="5cf1cf4425ec2311c8475a648ac38137"/><file name="shipping.phtml" hash="b65870bda7c2ba76a0ef2f22fdf339a2"/></dir></dir></dir></dir><dir name="rwd"><dir name="default"><dir name="layout"><file name="aongkir.xml" hash="ec81d1456c144f706915d4daa6fb14d0"/></dir><dir name="template"><dir name="aongkir"><file name="billing.phtml" hash="c1b9f178f56c66e0a27c797c7cce3c8b"/><file name="edit.phtml" hash="5cf1cf4425ec2311c8475a648ac38137"/><file name="shipping.phtml" hash="b65870bda7c2ba76a0ef2f22fdf339a2"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Ansyori_Aongkir.xml" hash="f7f4be17fe16141cff15994c4f202a0f"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>