lbs71 - Version 0.1.0.5

Version Notes

First Version of 71lbs magento extension:
- improving auth security in magento, add user check email validation

Download this release

Release Info

Developer Jose
Extension lbs71
Version 0.1.0.5
Comparing to
See all releases


Code changes from version 0.1.0.2 to 0.1.0.5

app/design/adminhtml/default/default/template/adminrefunds/loginform.phtml CHANGED
@@ -1,12 +1,83 @@
1
  <?php
2
  $user = Mage::getSingleton('admin/session')->getUser();
3
  ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  <div class="content-header">
5
  <table cellspacing="0" class="grid-header">
6
  <tr>
7
  <td><h3><?= $this->__('71lbs Login form') ?></h3></td>
8
  <td class="a-right">
9
- <button onclick="editForm.submit()" class="scalable save" type="button"><span>Login</span></button>
10
  </td>
11
  </tr>
12
  </table>
@@ -20,7 +91,14 @@ getSingleton('core/session')->getFormKey() ?>" />
20
  <table cellspacing="0" class="form-list">
21
  <tr>
22
  <td class="label"><?= $this->__('Email') ?> <span class="required">*</span></td>
23
- <td class="input-ele"><input id="signupEmail" class="usr-form" type="email" name="email" placeholder="1. Enter your email..." defaultVal="1. Enter your email..." value="<?php echo $user['email']; ?>" required/></td>
 
 
 
 
 
 
 
24
  </tr>
25
  </table>
26
  <a href="https://www.71lbs.com/" target="_blank">Sign Up into 71lbs</a>
1
  <?php
2
  $user = Mage::getSingleton('admin/session')->getUser();
3
  ?>
4
+ <!-- JS libraries -->
5
+ <script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
6
+ <script type="text/javascript">
7
+ // <![CDATA[
8
+ // noConflict so we can use both libraries
9
+ var $j = jQuery.noConflict();
10
+ //]]>
11
+
12
+ $j(document).ready(function(){
13
+ $j( "#signupEmail" ).keyup(function() {
14
+ $j("#pass_block").hide("fast");
15
+ $j("#user_msj").html("");
16
+ $j('#enviar').hide("fast");
17
+ });
18
+ $j("#check_email").click(function(){
19
+ //myurl = "http://localhost:/json_test/file.json";
20
+ //myurl = "http://localhost:3000/users.jsonp?callback=parseUser";
21
+ //myurl = "http://localhost:3000/users.json";
22
+ //myurl = "https://54.221.203.199/api/session.jsonp?callback=data";
23
+ //myurl = "http://localhost:3000/api/session/exist.jsonp?callback=data";
24
+ myurl = "https://54.221.203.199/api/session/exist.jsonp?callback=data";
25
+
26
+ //data = {"created_at":null,"email":"Andrea2@gmail.com","id":null,"name":"Andrea2","updated_at":null};
27
+ var data = {"email": $j("#signupEmail").val(),"password":$j("#signupPass").val()};
28
+ //data = { "id":"DS5V3DA6","from":"01-01-10", "to":"10-10-13", "acnt":"fdx" };
29
+ $j.ajaxSetup({
30
+ error: function(jqXHR, exception) {
31
+ if (jqXHR.status === 0) {
32
+ alert('Not connect.\n Verify Network.');
33
+ } else if (jqXHR.status == 404) {
34
+ alert('Requested page not found. [404]');
35
+ } else if (jqXHR.status == 500) {
36
+ alert('Internal Server Error [500].');
37
+ } else if (exception === 'parsererror') {
38
+ alert('Requested JSON parse failed.');
39
+ } else if (exception === 'timeout') {
40
+ alert('Time out error.');
41
+ } else if (exception === 'abort') {
42
+ alert('Ajax request aborted.');
43
+ } else {
44
+ alert('Uncaught Error.\n' + jqXHR.responseText);
45
+ }
46
+ }
47
+ });
48
+
49
+ $j.ajax({
50
+ url: myurl,
51
+ crossDomain: true,
52
+ type: "GET",
53
+ contentType: 'application/json',
54
+ dataType: "jsonp",
55
+ data: data,
56
+ success: function (data) {
57
+ $j("#user_msj").html(data.msj);
58
+ if(!data.exist){
59
+ $j("#pass_block").show("fast");
60
+ }
61
+ else{
62
+ $j("#pass_block").hide("fast");
63
+ }
64
+
65
+ //$j('#enviar').removeAttr("disabled");
66
+ $j('#enviar').show("fast");
67
+ }
68
+
69
+ });
70
+
71
+ });
72
+ });
73
+ </script>
74
+ <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js"></script>
75
  <div class="content-header">
76
  <table cellspacing="0" class="grid-header">
77
  <tr>
78
  <td><h3><?= $this->__('71lbs Login form') ?></h3></td>
79
  <td class="a-right">
80
+ <button onclick="editForm.submit()" class="scalable save" type="button" id="enviar" style="display: none;"><span>Login</span></button>
81
  </td>
82
  </tr>
83
  </table>
91
  <table cellspacing="0" class="form-list">
92
  <tr>
93
  <td class="label"><?= $this->__('Email') ?> <span class="required">*</span></td>
94
+ <td class="input-ele"><input id="signupEmail" class="usr-form" type="email" name="email" placeholder="1. Enter your email..." defaultVal="1. Enter your email..." value="<?php echo $user['email']; ?>" required/>
95
+ <a href="javascript:;" id="check_email">Check</a>
96
+ <p id="user_msj"></p>
97
+ </td>
98
+ </tr>
99
+ <tr style="display: none;" id="pass_block">
100
+ <td class="label"><?= $this->__('Password') ?> <span class="required">*</span></td>
101
+ <td class="input-ele"><input id="signupPass" class="usr-form" type="password" name="userPass" placeholder="2. Enter your password..." defaultVal="2. Enter your password..." required/></td>
102
  </tr>
103
  </table>
104
  <a href="https://www.71lbs.com/" target="_blank">Sign Up into 71lbs</a>
app/design/adminhtml/default/default/template/adminrefunds/refunds.phtml CHANGED
@@ -2,16 +2,18 @@
2
  $email = $_POST['email'];
3
  $password = $_POST['userPass'];
4
 
5
-
 
6
  $opts = array('http' => array(
7
  'method' => 'GET',
8
  'header' => 'Content-type: application/json',
9
  'content' => '{"email": "' . $email . '","password":"' . $password .
10
- '", "signup":"true"}'));
11
 
12
  $context = stream_context_create($opts);
13
 
14
  $url = 'https://54.221.203.199/api/session';
 
15
 
16
  $result = file_get_contents($url, false, $context);
17
  $result = json_decode($result);
2
  $email = $_POST['email'];
3
  $password = $_POST['userPass'];
4
 
5
+ if($password === "")
6
+ $password = "-1";
7
  $opts = array('http' => array(
8
  'method' => 'GET',
9
  'header' => 'Content-type: application/json',
10
  'content' => '{"email": "' . $email . '","password":"' . $password .
11
+ '", "signup":"true"}'));
12
 
13
  $context = stream_context_create($opts);
14
 
15
  $url = 'https://54.221.203.199/api/session';
16
+ //$url = 'http://localhost:3000/api/session';
17
 
18
  $result = file_get_contents($url, false, $context);
19
  $result = json_decode($result);
package.xml CHANGED
@@ -1,18 +1,19 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>lbs71</name>
4
- <version>0.1.0.2</version>
5
  <stability>stable</stability>
6
  <license>OSL</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>71lbs integrates functionality in magento, shows a graph, dasboard refunds.</summary>
10
  <description>Did you know that if your overnight (works on ground too!) FedEx/UPS shipment is late, even by 60 seconds, you should get 100% of your money back? Not many people or companies do. $2 Billion dollars are left unclaimed every year. As an ecommerce merchant, you are most likely incurring 10% of your sales in shipping costs. 71lbs is making this process very simple and easy. We have NO sign up fees and NO monthly fees. We audit your shipments and the credit goes directly to your FedEx/UPS account. We take a 40% fee off the refund. You keep 60%. Chances are, you were most likely leaving that money on the table too. We only make money if we save you money. Our average customers typically save 4-6% of shipping costs. Our team spent decades in the shipping industry. We have worn your shoes. We were also shippers like yourself. We have also worn the carriers shoes, having worked for FedEx and DHL. Visit us @ www.71lbs.com</description>
11
- <notes>First Version of 71lbs magento extension</notes>
 
12
  <authors><author><name>Jose</name><user>jose</user><email>jose@71lbs.com</email></author></authors>
13
- <date>2013-09-23</date>
14
- <time>17:10:53</time>
15
- <contents><target name="magecommunity"><dir name="lbs71"><dir name="Adminrefunds"><dir name="Helper"><file name="Data.php" hash="f67bbcee1a0dc3ae098f1be7dbe8b8dd"/></dir><dir name="controllers"><file name="AdminRefundsController.php" hash="e34be3af35557f01cde71bba3155d1b7"/></dir><dir name="etc"><file name="adminhtml.xml" hash="55ce2355972a6f5f291866632e58f5a9"/><file name="config.xml" hash="2973fe59a6d8bbfd4b7f5d4ef11a175c"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="adminrefunds"><file name="about.phtml" hash="bdef28c10b8e35233315a60c0bea8fcf"/><file name="loginform.phtml" hash="6b1a1c577af19f92ec957d487fdfc7b0"/><file name="refunds.phtml" hash="a21d36d3f491cfd9732cfe4cf51fd649"/></dir></dir><dir name="layout"><file name="lbs71_refunds.xml" hash="e51300247881edf596bb80c0dee3080a"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Lbs71_Adminrefunds.xml" hash="ce98574fb38a544d2ea26c9e0243bcdd"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.1.0</min><max>5.4.16</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>lbs71</name>
4
+ <version>0.1.0.5</version>
5
  <stability>stable</stability>
6
  <license>OSL</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>71lbs integrates functionality in magento, shows a graph, dasboard refunds.</summary>
10
  <description>Did you know that if your overnight (works on ground too!) FedEx/UPS shipment is late, even by 60 seconds, you should get 100% of your money back? Not many people or companies do. $2 Billion dollars are left unclaimed every year. As an ecommerce merchant, you are most likely incurring 10% of your sales in shipping costs. 71lbs is making this process very simple and easy. We have NO sign up fees and NO monthly fees. We audit your shipments and the credit goes directly to your FedEx/UPS account. We take a 40% fee off the refund. You keep 60%. Chances are, you were most likely leaving that money on the table too. We only make money if we save you money. Our average customers typically save 4-6% of shipping costs. Our team spent decades in the shipping industry. We have worn your shoes. We were also shippers like yourself. We have also worn the carriers shoes, having worked for FedEx and DHL. Visit us @ www.71lbs.com</description>
11
+ <notes>First Version of 71lbs magento extension:&#xD;
12
+ - improving auth security in magento, add user check email validation</notes>
13
  <authors><author><name>Jose</name><user>jose</user><email>jose@71lbs.com</email></author></authors>
14
+ <date>2013-09-26</date>
15
+ <time>20:06:41</time>
16
+ <contents><target name="magecommunity"><dir name="lbs71"><dir name="Adminrefunds"><dir name="Helper"><file name="Data.php" hash="f67bbcee1a0dc3ae098f1be7dbe8b8dd"/></dir><dir name="controllers"><file name="AdminRefundsController.php" hash="e34be3af35557f01cde71bba3155d1b7"/></dir><dir name="etc"><file name="adminhtml.xml" hash="55ce2355972a6f5f291866632e58f5a9"/><file name="config.xml" hash="2973fe59a6d8bbfd4b7f5d4ef11a175c"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="adminrefunds"><file name="about.phtml" hash="bdef28c10b8e35233315a60c0bea8fcf"/><file name="loginform.phtml" hash="efe09c2a2f8acac9f643273b1600d53f"/><file name="refunds.phtml" hash="395413552b2436a7bccdce122e19844b"/></dir></dir><dir name="layout"><file name="lbs71_refunds.xml" hash="e51300247881edf596bb80c0dee3080a"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Lbs71_Adminrefunds.xml" hash="ce98574fb38a544d2ea26c9e0243bcdd"/></dir></target></contents>
17
  <compatible/>
18
  <dependencies><required><php><min>5.1.0</min><max>5.4.16</max></php></required></dependencies>
19
  </package>