aftership - Version 0.1.5

Version Notes

Minor bug fixed,
improved tracking number title format

Download this release

Release Info

Developer aftership
Extension aftership
Version 0.1.5
Comparing to
See all releases


Code changes from version 0.1.4 to 0.1.5

app/code/community/Aftership/Track/Model/Observer.php CHANGED
@@ -6,7 +6,7 @@ class Aftership_Track_Model_Observer
6
  {
7
  $config = Mage::getStoreConfig('aftership_options/messages');
8
 
9
- if(array_key_exists("notification",$config)){
10
  $notifications = explode(",",$config["notification"]);
11
  if(array_search("1",$notifications)!==False){ // email
12
  $is_notify_email = true;
@@ -21,7 +21,7 @@ class Aftership_Track_Model_Observer
21
  }else{
22
  $is_notify_email = false;
23
  $is_notify_sms = false;
24
- }
25
 
26
  $track = $observer->getEvent()->getTrack();
27
  $track_data = $track->getData();
@@ -39,15 +39,29 @@ class Aftership_Track_Model_Observer
39
  $track->setTrackingNumber($track_data["track_number"]);
40
  $track->setShipCompCode($track_data["carrier_code"]);
41
  //$track->setTitle($_SERVER['HTTP_HOST'] . " " . $order_data["increment_id"]);
42
- $track->setTitle($_SERVER['HTTP_ORIGIN'] . " " . $order_data["increment_id"]);
43
-
 
 
 
 
 
 
 
 
 
 
 
 
44
  if($is_notify_email){
45
  $track->setEmail($order_data["customer_email"]);
46
  }
47
 
48
  if($is_notify_sms){
49
  $track->setTelephone($shipping_address_data["telephone"]);
50
- }
 
 
51
  if(array_key_exists("status",$config) && $config["status"]){
52
  $track->setPosted(0);
53
  }else{
6
  {
7
  $config = Mage::getStoreConfig('aftership_options/messages');
8
 
9
+ /*if(array_key_exists("notification",$config)){
10
  $notifications = explode(",",$config["notification"]);
11
  if(array_search("1",$notifications)!==False){ // email
12
  $is_notify_email = true;
21
  }else{
22
  $is_notify_email = false;
23
  $is_notify_sms = false;
24
+ }*/
25
 
26
  $track = $observer->getEvent()->getTrack();
27
  $track_data = $track->getData();
39
  $track->setTrackingNumber($track_data["track_number"]);
40
  $track->setShipCompCode($track_data["carrier_code"]);
41
  //$track->setTitle($_SERVER['HTTP_HOST'] . " " . $order_data["increment_id"]);
42
+ //$track->setTitle($_SERVER['HTTP_ORIGIN'] . " " . $order_data["increment_id"]);
43
+ $track->setTitle($order_data["increment_id"]);
44
+
45
+ if ($order_data["customer_email"] && $order_data["customer_email"] != "")
46
+ {
47
+ $track->setEmail($order_data["customer_email"]);
48
+ }
49
+
50
+ if ($shipping_address_data["telephone"] && $shipping_address_data["telephone"] != "")
51
+ {
52
+ $track->setTelephone($shipping_address_data["telephone"]);
53
+ }
54
+
55
+ /*
56
  if($is_notify_email){
57
  $track->setEmail($order_data["customer_email"]);
58
  }
59
 
60
  if($is_notify_sms){
61
  $track->setTelephone($shipping_address_data["telephone"]);
62
+ }*/
63
+
64
+
65
  if(array_key_exists("status",$config) && $config["status"]){
66
  $track->setPosted(0);
67
  }else{
app/code/community/Aftership/Track/etc/system.xml CHANGED
@@ -49,7 +49,7 @@
49
  <show_in_website>1</show_in_website>
50
  <show_in_store>0</show_in_store>
51
  </status>
52
- <notification>
53
  <label>Notification</label>
54
  <frontend_type>Multiselect</frontend_type>
55
  <source_model>notification/methods</source_model>
@@ -57,7 +57,7 @@
57
  <show_in_default>1</show_in_default>
58
  <show_in_website>1</show_in_website>
59
  <show_in_store>0</show_in_store>
60
- </notification>
61
  </fields>
62
  </messages>
63
  </groups>
49
  <show_in_website>1</show_in_website>
50
  <show_in_store>0</show_in_store>
51
  </status>
52
+ <!--<notification>
53
  <label>Notification</label>
54
  <frontend_type>Multiselect</frontend_type>
55
  <source_model>notification/methods</source_model>
57
  <show_in_default>1</show_in_default>
58
  <show_in_website>1</show_in_website>
59
  <show_in_store>0</show_in_store>
60
+ </notification>-->
61
  </fields>
62
  </messages>
63
  </groups>
package.xml CHANGED
@@ -1,18 +1,19 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>aftership</name>
4
- <version>0.1.4</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/gpl-license.php">GPL</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>AfterShip magento extension interface. Tracking number will be added to the aftership.com &lt;http://aftership.com/&gt; account at the same time when input in magento shipment. Please go to aftership.com &lt;http://aftership.com/&gt; to change the notification setting and value.</summary>
10
  <description>Users can simply link their online stores to Aftership and view all packages in one place. Online stores can also automatically inform their customers of the latest delivery status through SMS, email and Twitter. All the messages are white-labeled and can be customized for any marketing opportunities. Aftership also provides online stores a reporting tool so that they can easily find out any shipping problems like delayed delivery and solve immediately. Aftership currently supports over 40 shipping companies worldwide.</description>
11
- <notes>Forth release</notes>
 
12
  <authors><author><name>aftership</name><user>aftership</user><email>support@aftership.com</email></author></authors>
13
- <date>2012-05-10</date>
14
- <time>04:17:31</time>
15
- <contents><target name="magecommunity"><dir name="Aftership"><dir name="Track"><dir name="Helper"><file name="Data.php" hash="970d03deb3e5fc478f5d86e5ff3670cb"/></dir><dir name="Model"><file name="Methods.php" hash="d9fa7ef3df0353c01662ff4bdf210f60"/><dir name="Mysql4"><dir name="Track"><file name="Collection.php" hash="ff2cb9e05a92af1eeed3bda3928d8f43"/></dir><file name="Track.php" hash="90ad226fa98576fceb223b85fe88b642"/></dir><file name="Observer.php" hash="c8996fb161a637219a0bbd2b3dab7c54"/><dir name="Resource"><dir name="Mysql4"><file name="Setup.php" hash="b53f65ecc832752c8394f0da74b2f90d"/></dir></dir><file name="Track.php" hash="eb12833d5f084b0b919cbde45f8170eb"/><file name="Words.php" hash="7789e47b991f718fb3097b5e274eb71f"/></dir><dir name="controllers"><file name="IndexController.php" hash="bc2bd83404fb537b914c6c771e0f0f2f"/></dir><dir name="etc"><file name="config.xml" hash="44b407dcd58774176a2a37191daf04a2"/><file name="system.xml" hash="4ab8422e75dfbe678efce9203d99291f"/></dir><dir name="sql"><dir name="track_setup"><file name="mysql4-install-0.1.0.php" hash="1b73ba3b97d267d96c8bc99e9d9ac762"/></dir></dir></dir></dir></target><target name="mageetc"><dir><dir name="modules"><file name="Aftership_Track.xml" hash="6518f61d8f390f4fc8a517b2b15b01d1"/></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.17</min><max>6.0.0</max></php><package><name>Mage_Core_Modules</name><channel>community</channel><min>1.6.0.0</min><max>1.7</max></package></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>aftership</name>
4
+ <version>0.1.5</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/gpl-license.php">GPL</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>AfterShip magento extension interface. Tracking number will be added to the aftership.com &lt;http://aftership.com/&gt; account at the same time when input in magento shipment. Please go to aftership.com &lt;http://aftership.com/&gt; to change the notification setting and value.</summary>
10
  <description>Users can simply link their online stores to Aftership and view all packages in one place. Online stores can also automatically inform their customers of the latest delivery status through SMS, email and Twitter. All the messages are white-labeled and can be customized for any marketing opportunities. Aftership also provides online stores a reporting tool so that they can easily find out any shipping problems like delayed delivery and solve immediately. Aftership currently supports over 40 shipping companies worldwide.</description>
11
+ <notes>Minor bug fixed, &#xD;
12
+ improved tracking number title format</notes>
13
  <authors><author><name>aftership</name><user>aftership</user><email>support@aftership.com</email></author></authors>
14
+ <date>2012-05-18</date>
15
+ <time>09:30:59</time>
16
+ <contents><target name="magecommunity"><dir name="Aftership"><dir name="Track"><dir name="Helper"><file name="Data.php" hash="970d03deb3e5fc478f5d86e5ff3670cb"/></dir><dir name="Model"><file name="Methods.php" hash="d9fa7ef3df0353c01662ff4bdf210f60"/><dir name="Mysql4"><dir name="Track"><file name="Collection.php" hash="ff2cb9e05a92af1eeed3bda3928d8f43"/></dir><file name="Track.php" hash="90ad226fa98576fceb223b85fe88b642"/></dir><file name="Observer.php" hash="11a95a569b873c9c0956571f847ea4bc"/><dir name="Resource"><dir name="Mysql4"><file name="Setup.php" hash="b53f65ecc832752c8394f0da74b2f90d"/></dir></dir><file name="Track.php" hash="eb12833d5f084b0b919cbde45f8170eb"/><file name="Words.php" hash="7789e47b991f718fb3097b5e274eb71f"/></dir><dir name="controllers"><file name="IndexController.php" hash="bc2bd83404fb537b914c6c771e0f0f2f"/></dir><dir name="etc"><file name="config.xml" hash="44b407dcd58774176a2a37191daf04a2"/><file name="system.xml" hash="24bd66d83794242ddf8433fccc48f893"/></dir><dir name="sql"><dir name="track_setup"><file name="mysql4-install-0.1.0.php" hash="1b73ba3b97d267d96c8bc99e9d9ac762"/></dir></dir></dir></dir></target><target name="mageetc"><dir><dir name="modules"><file name="Aftership_Track.xml" hash="6518f61d8f390f4fc8a517b2b15b01d1"/></dir></dir></target></contents>
17
  <compatible/>
18
  <dependencies><required><php><min>5.2.17</min><max>6.0.0</max></php><package><name>Mage_Core_Modules</name><channel>community</channel><min>1.6.0.0</min><max>1.7</max></package></required></dependencies>
19
  </package>