PostPal_Shipping - Version 0.1.2

Version Notes

Minor fixes

Download this release

Release Info

Developer PostPal
Extension PostPal_Shipping
Version 0.1.2
Comparing to
See all releases


Code changes from version 0.1.1 to 0.1.2

app/code/community/PostPal/Shipping/Model/Carrier.php CHANGED
@@ -1 +1 @@
1
- <?php
2
  * @author Jana Vassiljeva <jana@artmarka.com>
3
  */
4
  protected $_code = 'postpal_shipping';
5
  public function collectRates(Mage_Shipping_Model_Rate_Request $request)
6
  {
7
  $result = Mage::getModel('shipping/rate_result');
8
  /* @var $result Mage_Shipping_Model_Rate_Result */
9
  $result->append($this->_getStandardShippingRate());
10
  return $result;
11
  }
12
  public function isTrackingAvailable()
13
  {
14
  return true;
15
  }
16
  protected function _getStandardShippingRate()
17
  {
18
  $rate = Mage::getModel('shipping/rate_result_method');
19
  /* @var $rate Mage_Shipping_Model_Rate_Result_Method */
20
  $rate->setCarrier($this->_code);
21
  /**
22
  * getConfigData(config_key) returns the configuration value for the
23
  * carriers/[carrier_code]/[config_key]
24
  */
25
  $rate->setCarrierTitle($this->getConfigData('title'));
26
  $rate->setMethod('fixed');
27
  $result = Mage::getModel('postpal_shipping/api')->getDeliveryArrivalEstimation();
28
  if (empty($result) || $result->status == false)
29
  return false;
30
  $formatedTime = date('d.m.Y H:i', strtotime($result->estimateFriendly));
31
  $rate->setMethodTitle($this->getConfigData('name'). ' ('. Mage::helper('postpal')->__('ETA: '). ' ' . $result->estimateFriendly . ') ');
32
  $rate->setPrice($this->getConfigData('default_price'));
33
  $rate->setCost(0);
34
  return $rate;
35
  }
36
  public function getAllowedMethods() {
37
  return array();
38
  }
 
39
  * @author Jana Vassiljeva <jana@artmarka.com>
40
  */
41
  protected $_code = 'postpal_shipping';
42
  public function collectRates(Mage_Shipping_Model_Rate_Request $request)
43
  {
44
  $result = Mage::getModel('shipping/rate_result');
45
  /* @var $result Mage_Shipping_Model_Rate_Result */
46
  $result->append($this->_getStandardShippingRate());
47
  return $result;
48
  }
49
  public function isTrackingAvailable()
50
  {
51
  return true;
52
  }
53
  protected function _getStandardShippingRate()
54
  {
55
  $rate = Mage::getModel('shipping/rate_result_method');
56
  /* @var $rate Mage_Shipping_Model_Rate_Result_Method */
57
  $rate->setCarrier($this->_code);
58
  /**
59
  * getConfigData(config_key) returns the configuration value for the
60
  * carriers/[carrier_code]/[config_key]
61
  */
62
  $rate->setCarrierTitle($this->getConfigData('title'));
63
  $rate->setMethod('fixed');
64
  $result = Mage::getModel('postpal_shipping/api')->getDeliveryArrivalEstimation();
65
  if (empty($result) || $result->status == false)
66
  return false;
67
  $formatedTime = date('d.m.Y H:i', strtotime($result->estimate));
68
  $rate->setMethodTitle($this->getConfigData('name'). ' ('. Mage::helper('postpal')->__('ETA: '). ' ' . $formatedTime . ') ');
69
  $rate->setPrice($this->getConfigData('default_price'));
70
  $rate->setCost(0);
71
  return $rate;
72
  }
73
  public function getAllowedMethods() {
74
  return array();
75
  }
 
1
  * @author Jana Vassiljeva <jana@artmarka.com>
2
  */
3
  protected $_code = 'postpal_shipping';
4
  public function collectRates(Mage_Shipping_Model_Rate_Request $request)
5
  {
6
  $result = Mage::getModel('shipping/rate_result');
7
  /* @var $result Mage_Shipping_Model_Rate_Result */
8
  $result->append($this->_getStandardShippingRate());
9
  return $result;
10
  }
11
  public function isTrackingAvailable()
12
  {
13
  return true;
14
  }
15
  protected function _getStandardShippingRate()
16
  {
17
  $rate = Mage::getModel('shipping/rate_result_method');
18
  /* @var $rate Mage_Shipping_Model_Rate_Result_Method */
19
  $rate->setCarrier($this->_code);
20
  /**
21
  * getConfigData(config_key) returns the configuration value for the
22
  * carriers/[carrier_code]/[config_key]
23
  */
24
  $rate->setCarrierTitle($this->getConfigData('title'));
25
  $rate->setMethod('fixed');
26
  $result = Mage::getModel('postpal_shipping/api')->getDeliveryArrivalEstimation();
27
  if (empty($result) || $result->status == false)
28
  return false;
29
  $formatedTime = date('d.m.Y H:i', strtotime($result->estimateFriendly));
30
  $rate->setMethodTitle($this->getConfigData('name'). ' ('. Mage::helper('postpal')->__('ETA: '). ' ' . $result->estimateFriendly . ') ');
31
  $rate->setPrice($this->getConfigData('default_price'));
32
  $rate->setCost(0);
33
  return $rate;
34
  }
35
  public function getAllowedMethods() {
36
  return array();
37
  }
38
+ <?php
39
  * @author Jana Vassiljeva <jana@artmarka.com>
40
  */
41
  protected $_code = 'postpal_shipping';
42
  public function collectRates(Mage_Shipping_Model_Rate_Request $request)
43
  {
44
  $result = Mage::getModel('shipping/rate_result');
45
  /* @var $result Mage_Shipping_Model_Rate_Result */
46
  $result->append($this->_getStandardShippingRate());
47
  return $result;
48
  }
49
  public function isTrackingAvailable()
50
  {
51
  return true;
52
  }
53
  protected function _getStandardShippingRate()
54
  {
55
  $rate = Mage::getModel('shipping/rate_result_method');
56
  /* @var $rate Mage_Shipping_Model_Rate_Result_Method */
57
  $rate->setCarrier($this->_code);
58
  /**
59
  * getConfigData(config_key) returns the configuration value for the
60
  * carriers/[carrier_code]/[config_key]
61
  */
62
  $rate->setCarrierTitle($this->getConfigData('title'));
63
  $rate->setMethod('fixed');
64
  $result = Mage::getModel('postpal_shipping/api')->getDeliveryArrivalEstimation();
65
  if (empty($result) || $result->status == false)
66
  return false;
67
  $formatedTime = date('d.m.Y H:i', strtotime($result->estimate));
68
  $rate->setMethodTitle($this->getConfigData('name'). ' ('. Mage::helper('postpal')->__('ETA: '). ' ' . $formatedTime . ') ');
69
  $rate->setPrice($this->getConfigData('default_price'));
70
  $rate->setCost(0);
71
  return $rate;
72
  }
73
  public function getAllowedMethods() {
74
  return array();
75
  }
app/code/community/PostPal/Shipping/etc/config.xml CHANGED
@@ -74,8 +74,8 @@
74
  <name>Express courier</name>
75
  <sort_order>1</sort_order>
76
  <sallowspecific>0</sallowspecific>
77
- <api_url>https://my.postpal.ee/api/shop/v1</api_url>
78
- <track_url>https://my.postpal.ee/track</track_url>
79
  <specificerrmsg>This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us.</specificerrmsg>
80
  <showmethod>1</showmethod>
81
  </postpal_shipping>
74
  <name>Express courier</name>
75
  <sort_order>1</sort_order>
76
  <sallowspecific>0</sallowspecific>
77
+ <api_url>http://dev.postpal.ee/api/shop/v1</api_url>
78
+ <track_url>http://dev.postpal.ee/track</track_url>
79
  <specificerrmsg>This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us.</specificerrmsg>
80
  <showmethod>1</showmethod>
81
  </postpal_shipping>
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>PostPal_Shipping</name>
4
- <version>0.1.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>PostPal shipping extension</summary>
10
  <description>This extension adds PostPal on-demand courier service to your shopping cart.</description>
11
- <notes>First stable version of PostPal extension</notes>
12
  <authors><author><name>PostPal</name><user>PostPal</user><email>hello@postpal.ee</email></author></authors>
13
- <date>2015-12-20</date>
14
- <time>18:33:55</time>
15
- <contents><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="postpal"><dir name="css"><file name="postpal.css" hash="5b3f0d0cce5377aa5bf6978865d0061b"/></dir><dir name="img"><file name="postpal_logo.png" hash="fc3f0bbb0d70f229321bcdd31eaa7549"/></dir><dir name="js"><file name="opcheckout_postpal.js" hash="411e71bf3de1de55247e753fb965d480"/></dir></dir></dir></dir></dir></target><target name="magecommunity"><dir name="PostPal"><dir name="Shipping"><dir name="Block"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><dir name="Shipment"><file name="View.php" hash="edc39b75e3b0e69ae5dc122c4078ac7a"/></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="9dfca5f43c00ccab5f1f5b8ac5445c8e"/></dir><dir name="Model"><file name="Api.php" hash="fd8bd87f5798e5da81a1d5dcdf58f020"/><file name="Carrier.php" hash="611d97b1f48c9e0ca53404f33d7b64de"/><file name="Observer.php" hash="1e61ca4d0cb36d73137d4110ad4070b6"/><file name="Shipping.php" hash="5f3ceaa12a412f8c9bcf50551292dcf7"/></dir><dir name="etc"><file name="config.xml" hash="9a93a173e5dca42b74633428051b9a82"/><file name="system.xml" hash="ed221153d603cfa5f3bfaae51d5ab896"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="postpal"><file name="shipping.xml" hash="c078788b7f0659b061ea7c70bd2b4a70"/></dir></dir><dir name="template"><dir name="postpal"><file name="extras.phtml" hash="8bad02b894d8fc8da8dbd5729dfceff1"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="PostPal_Shipping.xml" hash="8336b32b2ec54a8ebf90029265ab5729"/></dir></target><target name="magelocale"><dir><dir name="en_US"><file name="PostPal_Shipping.csv" hash="50052dc9f9a55bc8a4ff56ce43606eff"/></dir><dir name="et_EE"><file name="PostPal_Shipping.csv" hash="d9d64841396d1a0fb705246409ea7933"/></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.3.0</min><max>7.0.0</max></php><extension><name>json</name><min/><max/></extension></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>PostPal_Shipping</name>
4
+ <version>0.1.2</version>
5
  <stability>stable</stability>
6
  <license uri="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>PostPal shipping extension</summary>
10
  <description>This extension adds PostPal on-demand courier service to your shopping cart.</description>
11
+ <notes>Minor fixes</notes>
12
  <authors><author><name>PostPal</name><user>PostPal</user><email>hello@postpal.ee</email></author></authors>
13
+ <date>2016-01-17</date>
14
+ <time>11:41:20</time>
15
+ <contents><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="postpal"><dir name="css"><file name="postpal.css" hash="5b3f0d0cce5377aa5bf6978865d0061b"/></dir><dir name="img"><file name="postpal_logo.png" hash="fc3f0bbb0d70f229321bcdd31eaa7549"/></dir><dir name="js"><file name="opcheckout_postpal.js" hash="411e71bf3de1de55247e753fb965d480"/></dir></dir></dir></dir></dir></target><target name="magecommunity"><dir name="PostPal"><dir name="Shipping"><dir name="Block"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><dir name="Shipment"><file name="View.php" hash="edc39b75e3b0e69ae5dc122c4078ac7a"/></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="9dfca5f43c00ccab5f1f5b8ac5445c8e"/></dir><dir name="Model"><file name="Api.php" hash="fd8bd87f5798e5da81a1d5dcdf58f020"/><file name="Carrier.php" hash="a43d83337249881840599a131f47ae3d"/><file name="Observer.php" hash="1e61ca4d0cb36d73137d4110ad4070b6"/><file name="Shipping.php" hash="5f3ceaa12a412f8c9bcf50551292dcf7"/></dir><dir name="etc"><file name="config.xml" hash="9912407bc11128f5d26c9e1d59b077f0"/><file name="system.xml" hash="ed221153d603cfa5f3bfaae51d5ab896"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="postpal"><file name="shipping.xml" hash="c078788b7f0659b061ea7c70bd2b4a70"/></dir></dir><dir name="template"><dir name="postpal"><file name="extras.phtml" hash="8bad02b894d8fc8da8dbd5729dfceff1"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="PostPal_Shipping.xml" hash="8336b32b2ec54a8ebf90029265ab5729"/></dir></target><target name="magelocale"><dir><dir name="en_US"><file name="PostPal_Shipping.csv" hash="50052dc9f9a55bc8a4ff56ce43606eff"/></dir><dir name="et_EE"><file name="PostPal_Shipping.csv" hash="d9d64841396d1a0fb705246409ea7933"/></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.3.0</min><max>7.0.0</max></php><extension><name>json</name><min/><max/></extension></required></dependencies>
18
  </package>