lbs71 - Version 0.2.0.0

Version Notes

Contains direct access to 71lbs analytics

Download this release

Release Info

Developer Jose
Extension lbs71
Version 0.2.0.0
Comparing to
See all releases


Code changes from version 0.1.0.9 to 0.2.0.0

app/code/community/Lbs71/Refund/Helper/Data.php ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ <?php
2
+ class Lbs71_Refund_Helper_Data extends Mage_Core_Helper_Abstract
3
+ {
4
+ }
app/code/community/Lbs71/Refund/controllers/RefundController.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Lbs71_Refund_RefundController extends Mage_Adminhtml_Controller_Action
3
+ {
4
+ public function indexAction()
5
+ {
6
+ //Form template
7
+ $this->loadLayout()->_setActiveMenu('lbs71/shipping');
8
+
9
+ //create a text block with the name of "example-block"
10
+ $block = $this->getLayout()->createBlock('core/template', 'example-block')->
11
+ setTemplate('refund/loginform.phtml');
12
+
13
+ $this->_addContent($block);
14
+ $this->renderLayout();
15
+ }
16
+
17
+ public function aboutAction()
18
+ {
19
+ //Form template
20
+ $this->loadLayout()->_setActiveMenu('lbs71/about');
21
+
22
+ //create a text block with the name of "example-block"
23
+ $block = $this->getLayout()->createBlock('core/template', 'example-block')->
24
+ setTemplate('refund/about.phtml');
25
+
26
+ $this->_addContent($block);
27
+ $this->renderLayout();
28
+ }
29
+ }
app/code/community/{lbs71/Adminrefunds → Lbs71/Refund}/etc/adminhtml.xml RENAMED
@@ -1,20 +1,20 @@
1
  <config>
2
  <menu>
3
- <lbs71 translate="title" module="lbs71_adminrefunds">
4
  <title>71Lbs</title>
5
- <sort_order>1</sort_order>
6
  <children>
7
- <example>
8
  <title>View Refunds</title>
9
  <sort_order>1</sort_order>
10
- <action>adminhtml/adminrefunds/index</action>
11
- </example>
12
  </children>
13
  <children>
14
  <about>
15
  <title>About</title>
16
  <sort_order>2</sort_order>
17
- <action>adminhtml/adminrefunds/about</action>
18
  </about>
19
  </children>
20
  </lbs71>
@@ -24,13 +24,13 @@
24
  <resources>
25
  <admin>
26
  <children>
27
- <lbs71 translate="title" module="lbs71_adminrefunds">
28
  <title>Top Level 71lbs Refunds Menu Item</title>
29
  <sort_order>1</sort_order>
30
  <children>
31
- <example>
32
  <title>Refunds Menu Item</title>
33
- </example>
34
  </children>
35
  <children>
36
  <about>
@@ -43,4 +43,4 @@
43
  </resources>
44
  </acl>
45
 
46
- </config>
1
  <config>
2
  <menu>
3
+ <lbs71 translate="title" module="lbs71_refund">
4
  <title>71Lbs</title>
5
+ <sort_order>89</sort_order>
6
  <children>
7
+ <shipping>
8
  <title>View Refunds</title>
9
  <sort_order>1</sort_order>
10
+ <action>adminhtml/refund/index</action>
11
+ </shipping>
12
  </children>
13
  <children>
14
  <about>
15
  <title>About</title>
16
  <sort_order>2</sort_order>
17
+ <action>adminhtml/refund/about</action>
18
  </about>
19
  </children>
20
  </lbs71>
24
  <resources>
25
  <admin>
26
  <children>
27
+ <lbs71 translate="title" module="lbs71_refund">
28
  <title>Top Level 71lbs Refunds Menu Item</title>
29
  <sort_order>1</sort_order>
30
  <children>
31
+ <shipping>
32
  <title>Refunds Menu Item</title>
33
+ </shipping>
34
  </children>
35
  <children>
36
  <about>
43
  </resources>
44
  </acl>
45
 
46
+ </config>
app/code/community/Lbs71/Refund/etc/config.xml ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Lbs71_Refund>
5
+ <version>2.0.0</version>
6
+ </Lbs71_Refund>
7
+ </modules>
8
+ <admin>
9
+ <routers>
10
+ <adminhtml>
11
+ <args>
12
+ <modules>
13
+ <Lbs71_Refund after="Mage_Adminhtml">Lbs71_Refund</Lbs71_Refund>
14
+ </modules>
15
+ </args>
16
+ </adminhtml>
17
+ </routers>
18
+ </admin>
19
+
20
+ <global>
21
+ <helpers>
22
+ <lbs71_refund>
23
+ <class>Lbs71_Refund_Helper</class>
24
+ </lbs71_refund>
25
+ </helpers>
26
+ </global>
27
+ </config>
app/code/community/lbs71/Adminrefunds/Helper/Data.php DELETED
@@ -1,4 +0,0 @@
1
- <?php
2
- class Lbs71_Adminrefunds_Helper_Data extends Mage_Core_Helper_Abstract
3
- {
4
- }
 
 
 
 
app/code/community/lbs71/Adminrefunds/controllers/AdminRefundsController.php DELETED
@@ -1,49 +0,0 @@
1
- <?php
2
- class Lbs71_Adminrefunds_AdminrefundsController extends Mage_Adminhtml_Controller_Action
3
- {
4
- public function indexAction()
5
- {
6
- //Form template
7
- $this->loadLayout()->_setActiveMenu('lbs71/example');
8
-
9
- //create a text block with the name of "example-block"
10
- $block = $this->getLayout()->createBlock('core/template', 'example-block')->
11
- setTemplate('adminrefunds/loginform.phtml');
12
-
13
- $this->_addContent($block);
14
-
15
- $this->renderLayout();
16
- }
17
-
18
- public function postAction(){
19
-
20
- //Form template
21
- $this->loadLayout()->_setActiveMenu('lbs71/example');
22
-
23
- //create a text block with the name of "example-block"
24
- $block = $this->getLayout()->createBlock('core/template', 'example-block')->
25
- setTemplate('adminrefunds/refunds.phtml');
26
-
27
- $this->_addContent($block);
28
- $this->renderLayout();
29
-
30
- $email = '';
31
- $password = '';
32
-
33
-
34
-
35
- }
36
-
37
- public function aboutAction(){
38
- //Form template
39
- $this->loadLayout()->_setActiveMenu('lbs71/example');
40
-
41
- //create a text block with the name of "example-block"
42
- $block = $this->getLayout()->createBlock('core/template', 'example-block')->
43
- setTemplate('adminrefunds/about.phtml');
44
-
45
- $this->_addContent($block);
46
- $this->_setActiveMenu('lbs71/about');
47
- $this->renderLayout();
48
- }
49
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/lbs71/Adminrefunds/etc/config.xml DELETED
@@ -1,27 +0,0 @@
1
- <?xml version="1.0"?>
2
- <config>
3
- <modules>
4
- <Lbs71_Adminrefunds>
5
- <version>1.0.0</version>
6
- </Lbs71_Adminrefunds>
7
- </modules>
8
- <admin>
9
- <routers>
10
- <adminhtml>
11
- <args>
12
- <modules>
13
- <Lbs71_Adminrefunds after="Mage_Adminhtml">Lbs71_Adminrefunds</Lbs71_Adminrefunds>
14
- </modules>
15
- </args>
16
- </adminhtml>
17
- </routers>
18
- </admin>
19
-
20
- <global>
21
- <helpers>
22
- <lbs71_adminrefunds>
23
- <class>Lbs71_Adminrefunds_Helper</class>
24
- </lbs71_adminrefunds>
25
- </helpers>
26
- </global>
27
- </config>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/adminhtml/default/default/layout/lbs71_refunds.xml CHANGED
@@ -1,8 +1,8 @@
1
  <?xml version="1.0"?>
2
  <layout version="0.1.0">
3
- <adminhtml_adminrefunds_index>
4
- <reference name="content">
5
- <block type="lbs71_refunds/adminhtml_form" name="form" template="lbs71/loginform.phtml" />
6
- </reference>
7
- </adminhtml_adminrefunds_index>
8
- </layout>
1
  <?xml version="1.0"?>
2
  <layout version="0.1.0">
3
+ <adminhtml_refund_index>
4
+ <reference name="content">
5
+ <block type="lbs71_refund/adminhtml_form" name="form" template="lbs71/loginform.phtml" />
6
+ </reference>
7
+ </adminhtml_refund_index>
8
+ </layout>
app/design/adminhtml/default/default/template/adminrefunds/_analytics.phtml DELETED
@@ -1,411 +0,0 @@
1
-
2
- <div id="ref_content" class="contents" style="overflow:hidden">
3
- <!-- 1140px Grid styles for IE -->
4
- <!--[if lte IE 9]><link rel="stylesheet" href="https://www.71lbs.com/assets/ie.css" type="text/css" media="screen" /><![endif]-->
5
- <!-- The 1140px Grid - http://cssgrid.net/ -->
6
- <link rel="stylesheet" href="https://www.71lbs.com/assets/1140.css" type="text/css" media="screen" />
7
- <!-- Jquery ui styles -->
8
- <link href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/themes/redmond/jquery-ui.css" media="screen" rel="stylesheet" type="text/css" />
9
- <!-- Your styles -->
10
- <link rel="stylesheet" href="https://www.71lbs.com/assets/businesses.css" type="text/css" media="screen" />
11
- <link rel="stylesheet" href="https://www.71lbs.com/assets/style.css" type="text/css" media="screen" />
12
- <link rel="stylesheet" href="https://www.71lbs.com/assets/users.css" type="text/css" media="screen" />
13
- <link rel="stylesheet" href="https://www.71lbs.com/assets/signup.css" type="text/css" media="screen" />
14
- <link rel="stylesheet" href="https://www.71lbs.com/assets/signup2.css" type="text/css" media="screen" />
15
- <!-- JS libraries -->
16
- <script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
17
- <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js"></script>
18
- <script type="text/javascript" src="https://www.google.com/jsapi"></script>
19
- <!--[if lte IE 8]>
20
- <script language="javascript" type="text/javascript" src="/assets/flot/excanvas.min.js"></script>
21
- <![endif]-->
22
- <script language="javascript" type="text/javascript" src="http://localhost:3000/assets/flot/jquery.flot.js"></script>
23
- <script language="javascript" type="text/javascript" src="http://localhost:3000/assets/flot/jquery.flot.pie.js"></script>
24
- <script type="text/javascript">
25
- // <![CDATA[
26
- // noConflict so we can use both libraries
27
- var $j = jQuery.noConflict();
28
- //]]>
29
- </script>
30
-
31
-
32
- <div id="ref_content" class="contents" style="overflow:hidden">
33
-
34
- <!--[if lte IE 8]>
35
- <script language="javascript" type="text/javascript" src="https://www.71lbs.com/assets/flot/excanvas.min.js"></script>
36
- <![endif]-->
37
- <script language="javascript" type="text/javascript" src="https://www.71lbs.com/assets/flot/jquery.flot.js"></script>
38
- <script language="javascript" type="text/javascript" src="https://www.71lbs.com/assets/flot/jquery.flot.pie.js"></script>
39
-
40
- <div id="top-info" style="width:<?php echo $result->ref_width ?>px;height:135px;text-align:center;background-color:#E8E8E8;border-radius: 30px;">
41
-
42
- <div id="disp1" style="width:<?php echo $result->ref_width/4 ?>px;float:left;">
43
- <center>
44
- <img src="https://www.71lbs.com/assets/ytd-refunds.png" style="height:50px;width:50px;padding-top:5px"></img>
45
- <div id="ytd-refunds" style="font-size:20px;font-weight:bold;color:white;background-color:rgb(46, 125, 189);width:<?php echo $result->ref_width/6 ?>px;height:24px;"></div>
46
- </center>
47
- <span style="font-size:20px">YTD Refunds</span>
48
- </div>
49
-
50
- <div id="disp2" style="width:<?php echo $result->ref_width/4 ?>px;float:left;">
51
- <center>
52
- <img src="https://www.71lbs.com/assets/average-refunds.png" style="height:50px;width:50px;padding-top:5px"></img>
53
- <div id="average-refunds" style="font-size:20px;font-weight:bold;color:white;background-color:rgb(46, 125, 189);width:<?php echo $result->ref_width/6 ?>px;height:24px;"></div>
54
- </center>
55
- <span style="font-size:20px">Average Refund</span>
56
- </div>
57
-
58
- <div id="disp3" style="width:<?php echo $result->ref_width/4 ?>px;float:left;">
59
- <center>
60
- <img src="https://www.71lbs.com/assets/monthly-shipping-spend.png" style="height:50px;width:50px;padding-top:5px"></img>
61
- <div id="monthly-shipping-spend" style="font-size:20px;font-weight:bold;color:white;background-color:rgb(46, 125, 189);width:<?php echo $result->ref_width/6 ?>px;height:24px;"></div>
62
- </center>
63
- <span style="font-size:20px">Monthly<br>Shipping Spend</span>
64
- </div>
65
-
66
- <div id="disp4" style="width:<?php echo $result->ref_width/4 ?>px;float:left;">
67
- <center>
68
- <img src="https://www.71lbs.com/assets/accounts-onboarded.png" style="height:50px;width:50px;padding-top:5px"></img>
69
- <div id="accounts-onboarded" style="font-size:20px;font-weight:bold;color:white;background-color:rgb(46, 125, 189);width:<?php echo $result->ref_width/6 ?>px;height:24px;"></div>
70
- </center>
71
- <span style="font-size:20px">Accounts<br>Onboarded</span>
72
- </div>
73
-
74
- <br style="clear: left;" />
75
- </div>
76
-
77
- <br>
78
-
79
- <div id="flot-charts" style="width:<?php echo $result->ref_width ?>px;text-align:center;">
80
-
81
- <div style="float:left;width:<?php echo $result->ref_width/2 ?>px;height:30px;font-size:20px;font-weight:bold;">Your Refund History</div>
82
- <div style="float:left;width:<?php echo $result->ref_width/2 ?>px;height:30px;font-size:20px;font-weight:bold;">Your Shipping Spend: <span id="total-shipping-spend"></span></div>
83
-
84
- <div id="your-refunds" style="float:left;width:<?php echo $result->ref_width/2 ?>px;height:<?php echo $result->ref_width/2 ?>px"></div>
85
- <div id="shipping-spend" style="float:left;width:<?php echo $result->ref_width/2 ?>px;height:<?php echo $result->ref_width/2 ?>px"></div>
86
-
87
- <br style="clear: left;" />
88
-
89
- </div>
90
-
91
- <div id="options" style="width:<?php echo $result->ref_width ?>px;text-align:center;">
92
-
93
- <div id="options1" style="float:left;width:<?php echo $result->ref_width/2 ?>px;text-align:center;">
94
- <div id="bar-display" style="width:<?php echo $result->ref_width/2 ?>px;height:50px"></div>
95
- <br>
96
- <div id="bottons1" style="width:<?php echo $result->ref_width/2 ?>px;height:50px">
97
- <button onclick="buttonClick('one')" style="width:100px">Graph</button>
98
- <button onclick="buttonClick('one')" style="width:100px">Table</button>
99
- <br>
100
- <button onclick="buttonClick('two')" style="width:100px">YTD</button>
101
- <button onclick="buttonClick('two')" style="width:100px">This Month</button>
102
- <button onclick="buttonClick('two')" style="width:100px">Last Month</button>
103
- </div>
104
- </div>
105
-
106
- <div id="options2" style="float:left;width:<?php echo $result->ref_width/2 ?>px;text-align:center;">
107
- <div id="pie-display2" style="width:<?php echo $result->ref_width/2 ?>px;height:30px"></div>
108
- <div id="pie-display" style="width:<?php echo $result->ref_width/2 ?>px;height:20px"></div>
109
- <br>
110
- <div id="bottons1" style="width:<?php echo $result->ref_width/2 ?>px;height:50px">
111
- <button onclick="pieButton('percentage')" style="width:100px">Percent</button>
112
- <button onclick="pieButton('value')" style="width:100px">$ Value</button>
113
- <br>
114
- <button onclick="pieButton('upsfedex')" style="width:100px">FDX & UPS</button>
115
- <button onclick="pieButton('fedex')" style="width:100px">FDX</button>
116
- <button onclick="pieButton('ups')" style="width:100px">UPS</button>
117
- </div>
118
- </div>
119
-
120
- <br style="clear: left;" />
121
-
122
- </div>
123
-
124
- <script type="text/javascript">
125
-
126
- emptyData = 0
127
- upsSpend = 0
128
- fedexSpend = 0
129
- upsfedexSpend = 0
130
-
131
- <?php if($result->hasFedex) : ?>
132
- fedexSpend = [
133
- <?php foreach($result->fedexShippingSpendSort as $value) :?>
134
- <?php $type = $value[0] ?>
135
- <?php $amount = $value[1] ?>
136
- <?php $color = $value[2] ?>
137
- <?php if ($amount > 0) :?>
138
- {label: "<?php echo $type ?>", data: <?php echo $amount ?>, color: "hsla(<?php echo $color ?>, 61%, 46%, .9)"},
139
- <?php endif ?>
140
- <?php endforeach ?>
141
- ]
142
- <?php endif ?>
143
-
144
- <?php if($result->hasUPS) : ?>
145
- upsSpend = [
146
-
147
- <?php foreach($result->upsShippingSpendSort as $value) :?>
148
- <?php $type = $value[0] ?>
149
- <?php $amount = $value[1] ?>
150
- <?php $color = $value[2] ?>
151
- <?php if ($amount > 0) :?>
152
- {label: "<?php echo $type ?>", data: <?php echo $amount ?>, color: "hsla(<?php echo $color ?>, 61%, 46%, .9)"},
153
- <?php endif ?>
154
- <?php endforeach ?>
155
- ]
156
- <?php endif ?>
157
-
158
- <?php if($result->hasUPS && $result->hasFedex) : ?>
159
- upsfedexSpend = [
160
-
161
- <?php foreach($result->upsfedexShippingSpendMergeSort as $value) :?>
162
- <?php $type = $value[0] ?>
163
- <?php $amount = $value[1] ?>
164
- <?php $color = $value[2] ?>
165
- <?php if ($amount > 0) :?>
166
- {label: "<?php echo $type ?>", data: <?php echo $amount ?>, color: "hsla(<?php echo $color ?>, 61%, 46%, .9)"},
167
- <?php endif ?>
168
- <?php endforeach ?>
169
-
170
- ]
171
- <?php elseif($result->hasUPS) :?>
172
- upsfedexSpend = [
173
- <?php foreach($result->upsShippingSpendSort as $value) :?>
174
- <?php $type = $value[0] ?>
175
- <?php $amount = $value[1] ?>
176
- <?php $color = $value[2] ?>
177
- <?php if ($amount > 0) :?>
178
- {label: "<?php echo $type ?>", data: <?php echo $amount ?>, color: "hsla(<?php echo $color ?>, 61%, 46%, .9)"},
179
- <?php endif ?>
180
- <?php endforeach ?>
181
-
182
-
183
- ]
184
- <?php elseif($result->hasFedex) :?>
185
- upsfedexSpend = [
186
-
187
- <?php foreach($result->fedexShippingSpendSort as $value) :?>
188
- <?php $type = $value[0] ?>
189
- <?php $amount = $value[1] ?>
190
- <?php $color = $value[2] ?>
191
- <?php if ($amount > 0) :?>
192
- {label: "<?php echo $type ?>", data: <?php echo $amount ?>, color: "hsla(<?php echo $color ?>, 61%, 46%, .9)"},
193
- <?php endif ?>
194
- <?php endforeach ?>
195
- ]
196
- <?php endif ?>
197
-
198
- <?php if (!is_numeric($result->refundsPerMonth)) :?>
199
- refundData = [
200
- <?php foreach ($result->refundsPerMonth as $month => $refundsPerMonth): ?>
201
- [<?php echo $month ?>,<?php echo $refundsPerMonth->refundAmt ?>],
202
- <?php endforeach; ?>
203
-
204
- ]
205
- <?php else :?>
206
- refundData = [ [1,-1] ]
207
- <?php endif ?>
208
-
209
- shipper = "upsfedex"
210
- showType = "percentage"
211
-
212
- pieButton(shipper)
213
- graphButton('')
214
-
215
- $j("#ytd-refunds").html("<?php echo $result->totalRefundAmt ?>");
216
- $j("#average-refunds").html("<?php echo $result->averageRefunds ?>");
217
- $j("#monthly-shipping-spend").html("<?php echo $result->totalShippingSpendPerMonth ?>");
218
- $j("#accounts-onboarded").html("<?php echo $result->numOfAccounts ?>");
219
-
220
- $j("#shipping-spend").bind("plothover", pieHover);
221
- //$j("#shipping-spend").bind("plotclick", pieClick);
222
-
223
- function pieHover(event, pos, obj)
224
- {
225
- if (!obj)
226
- return;
227
-
228
- percent = parseFloat(obj.series.percent).toFixed(2);
229
- dollarValue = (obj.series.data[0][1] + "").replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1,")
230
- $j("#pie-display2").html('<span style="font-weight: bold; color: '+obj.series.color+'">'+obj.series.label+' ('+percent+'%): $'+dollarValue+'</span>');
231
- }
232
-
233
- function pieClick(event, pos, obj)
234
- {
235
- if (!obj)
236
- return;
237
-
238
- percent = parseFloat(obj.series.percent).toFixed(2);
239
-
240
-
241
- alert('WHATEVER YOU WANT HERE');
242
- }
243
-
244
- function pieButton(input)
245
- {
246
- $j("#pie-display2").html('')
247
-
248
- if (input == "fedex")
249
- {
250
- showing = "fedex"
251
- data = fedexSpend
252
- $j("#total-shipping-spend").html("<?php echo $result->totalFedex ?>");
253
-
254
- if (showType == "percentage")
255
- $j("#pie-display").html("Displaying: <b>FDX (Percent)</b>");
256
- else
257
- $j("#pie-display").html("Displaying: <b>FDX ($ Value)</b>");
258
- }
259
- else if (input == "ups")
260
- {
261
- showing = "ups"
262
- data = upsSpend
263
- $j("#total-shipping-spend").html("<?php echo $result->totalUPS ?>");
264
-
265
- if (showType == "percentage")
266
- $j("#pie-display").html("Displaying: <b>UPS (Percent)</b>");
267
- else
268
- $j("#pie-display").html("Displaying: <b>UPS ($ Value)</b>");
269
- }
270
- else if (input == "upsfedex")
271
- {
272
- showing = "upsfedex"
273
- data = upsfedexSpend
274
- $j("#total-shipping-spend").html("<?php echo $result->totalUPSFedex ?>");
275
-
276
- if (showType == "percentage")
277
- $j("#pie-display").html("Displaying: <b>FDX & UPS (Percent)</b>");
278
- else
279
- $j("#pie-display").html("Displaying: <b>FDX & UPS ($ Value)</b>");
280
- }
281
-
282
- if (input == "percentage")
283
- {
284
- showType = "percentage"
285
-
286
- if (showing == "ups")
287
- $j("#pie-display").html("Displaying: <b>UPS (Percent)</b>");
288
- else if (showing == "fedex")
289
- $j("#pie-display").html("Displaying: <b>FDX (Percent)</b>");
290
- else
291
- $j("#pie-display").html("Displaying: <b>FDX & UPS (Percent)</b>");
292
- }
293
- else if (input == "value")
294
- {
295
- showType = "value"
296
-
297
- if (showing == "ups")
298
- $j("#pie-display").html("Displaying: <b>UPS ($ Value)</b>");
299
- else if (showing == "fedex")
300
- $j("#pie-display").html("Displaying: <b>FDX ($ Value)</b>");
301
- else
302
- $j("#pie-display").html("Displaying: <b>FDX & UPS ($ Value)</b>");
303
- }
304
-
305
- if (data != 0)
306
- {
307
- $j.plot($j("#shipping-spend"), data,
308
- {
309
- series:
310
- {
311
- pie:
312
- {
313
- show: true,
314
- radius: .9,
315
-
316
- label:
317
- {
318
- show: true,
319
- radius: .5,
320
- threshold: 0.01,
321
-
322
- formatter: function (label, series)
323
- {
324
- if (showType == "value")
325
- return '<div style="border:1px solid grey;font-size:8pt;text-align:center;padding:5px;color:white;">' + label + ': $' + (series.data[0][1] + "").replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1,") + '</div>';
326
- else if (showType == "percentage")
327
- return '<div style="border:1px solid grey;font-size:8pt;text-align:center;padding:5px;color:white;">' + label + ': ' + series.percent.toFixed(1) + '%</div>';
328
- },
329
-
330
- borderWidth: 0,
331
-
332
- background:
333
- {
334
- opacity: .9
335
- }
336
- }
337
- }
338
- },
339
-
340
- grid:
341
- {
342
- hoverable: true,
343
- clickable: true
344
- },
345
-
346
- legend: { show: false },
347
-
348
- });
349
- }
350
- else
351
- {
352
- $j("#shipping-spend").html('<img style="height:<?php echo $result->ref_width/2 ?>px;width:<?php echo $result->ref_width/2 ?>px;padding-top:5px" src="https://www.71lbs.com/assets/no-data.png"></img>');
353
- }
354
- }
355
-
356
- function graphButton(input)
357
- {
358
- var monthNames = [ "", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ];
359
-
360
- currMonth = new Date().getMonth() + 1
361
-
362
- lowestMonth = refundData[0][0]
363
-
364
- for (i=0; i<refundData.length; i++)
365
- {
366
- if (refundData[i][0] < lowestMonth)
367
- lowestMonth = refundData[i][0]
368
- }
369
-
370
- data123 = [
371
- {
372
- color: "rgb(46, 125, 189)",
373
- label: "Refunds Per Month",
374
- data: refundData,
375
- bars:
376
- {
377
- show: true,
378
- barWidth: .7,
379
- fill: .9,
380
- align: "center"
381
- }
382
- }
383
- ]
384
-
385
- $j.plot($j("#your-refunds"),data123,
386
- {
387
- xaxis:
388
- {
389
- autoscaleMargin: .1,
390
- ticks: [ [1,'Jan'],[2,'Feb'],[3,'Mar'],[4,'Apr'],[5,'May'],[6,'Jun'],[7,'Jul'],[8,'Aug'],[9,'Sep'],[10,'Oct'],[11,'Nov'],[12,'Dec'] ]
391
- },
392
-
393
- yaxis:
394
- {
395
- min: 0,
396
- ticks: 10,
397
- tickFormatter: function(val, axis)
398
- {
399
- return "$" + (val.toFixed(2) + "").replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1,")
400
- }
401
- },
402
-
403
- legend: { show: false }
404
- });
405
- }
406
-
407
- </script>
408
-
409
-
410
-
411
- </div> <!-- end refunds -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/adminhtml/default/default/template/adminrefunds/_no_analytics.phtml DELETED
@@ -1,490 +0,0 @@
1
- <!-- 1140px Grid styles for IE -->
2
- <!--[if lte IE 9]><link rel="stylesheet" href="https://www.71lbs.com/assets/ie.css" type="text/css" media="screen" /><![endif]-->
3
- <!-- The 1140px Grid - http://cssgrid.net/ -->
4
- <link rel="stylesheet" href="https://www.71lbs.com/assets/1140.css" type="text/css" media="screen" />
5
- <!-- Jquery ui styles -->
6
- <link href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/themes/redmond/jquery-ui.css" media="screen" rel="stylesheet" type="text/css" />
7
- <!-- Your styles -->
8
- <link rel="stylesheet" href="https://www.71lbs.com/assets/businesses.css" type="text/css" media="screen" />
9
- <link rel="stylesheet" href="https://www.71lbs.com/assets/style.css" type="text/css" media="screen" />
10
- <link rel="stylesheet" href="https://www.71lbs.com/assets/users.css" type="text/css" media="screen" />
11
- <link rel="stylesheet" href="https://www.71lbs.com/assets/signup.css" type="text/css" media="screen" />
12
- <link rel="stylesheet" href="https://www.71lbs.com/assets/signup2.css" type="text/css" media="screen" />
13
- <!-- JS libraries -->
14
- <script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
15
- <script type="text/javascript">
16
- // <![CDATA[
17
- // noConflict so we can use both libraries
18
- var $j = jQuery.noConflict();
19
- //]]>
20
- </script>
21
- <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js"></script>
22
- <script type="text/javascript" src="https://www.google.com/jsapi"></script>
23
- <script type="text/javascript">
24
- //Google API charts
25
- google.load("visualization", "1", {packages:["corechart"]});
26
- google.setOnLoadCallback(drawChart);
27
- function drawChart() {
28
- var data = new google.visualization.DataTable();
29
- //Add number of Columns
30
- data.addColumn('string', 'Month');
31
- data.addColumn('number', 'Refund');
32
-
33
- var monthNames = [ "January", "February", "March", "April", "May", "June",
34
- "July", "August", "September", "October", "November", "December" ];
35
-
36
- //get first month and last month since business started
37
- //if not fedex refunds is empty
38
-
39
- //loop to display a chart with all the months since
40
- //business started in current year
41
- for (var i = <?php echo $result->first_month; ?>; i <= <?php echo $result->
42
- last_month; ?>; i++) {
43
- data.addRow([monthNames[i - 1],0]);//Add a row for each refund by month key
44
- }
45
-
46
- //Design chart
47
- var options = {
48
- title: 'Total of Refunds Month over Month',
49
- titleTextStyle: {color:'979797', fontSize: 12},
50
- hAxis: {title: 'Month', titleTextStyle: {color: '979797', fontSize: 12}},
51
- vAxis: {title: 'Economic Value of Refunds Revenue', titleTextStyle: {color: '979797', fontSize: 12}, minValue:0, maxValue:<?php echo
52
- $result->max_value; ?>},
53
- fontName: 'Arial, Helvetica, sans-serif',
54
- animation: { duration: 1000, easing: 'out'}
55
- };
56
-
57
- var chart = new google.visualization.ColumnChart(document.getElementById('chart_div'));
58
- chart.draw(data, options);
59
-
60
- //create animation of bars going up
61
- //Get hash of total refunds by months for fedex
62
- //if not fedex empty do foreach
63
- <?php if ($result->fdx_monthly_refunds): ?>
64
- setTimeout(function(){
65
- <?php foreach ($result->fdx_monthly_refunds as $key => $value): ?>
66
- data.setValue(<?php echo $value[0]; ?> - <?php echo $result->
67
- first_month; ?>,1,<?php echo
68
- $value[1] ?>); //setValue(row index,column index, value)
69
- <?php endforeach ?>
70
- chart.draw(data, options);
71
- },500);
72
- <?php endif ?>
73
-
74
- //create animation of bars going up
75
- //Get hash of total refunds by months for ups
76
- //if not ups empty do foreach
77
- <?php if ($result->ups_monthly_refunds): ?>
78
- setTimeout(function(){
79
-
80
- <?php foreach ($result->ups_monthly_refunds as $key => $value): ?>
81
- var preValue = data.getValue(<?php echo $value[0]; ?> - <?php echo
82
- $result->first_month; ?>,1); //get value thats there now and add it to next value
83
- data.setValue(<?php echo $value[0]; ?> - <?php echo $result->
84
- first_month; ?>,1,<?php echo
85
- $value[1] ?> + preValue); //setValue(row index,column index, value)
86
- <?php endforeach ?>
87
- chart.draw(data, options);
88
- },2500);
89
- <?php endif ?>
90
-
91
- }
92
-
93
- </script>
94
- <script>
95
-
96
- $j(function() {
97
-
98
-
99
- <!-- Jquery ui datepicker -->
100
- $j( "#fdx_from" ).datepicker({
101
- defaultDate: "+1w",
102
- changeMonth: true,
103
- numberOfMonths: 1,
104
- maxDate: -1,
105
- autoSize: true,
106
- onClose: function( selectedDate ) {
107
- $j( "#fdx_to" ).datepicker( "option", "minDate", selectedDate );
108
- },
109
- onSelect: function()
110
- {
111
- if ($j("#fdx_to").datepicker("getDate") != null)
112
- getDataForRange("fdx");
113
- }
114
- });
115
-
116
- $j( "#fdx_to" ).datepicker({
117
- defaultDate: "+1w",
118
- changeMonth: true,
119
- numberOfMonths: 1,
120
- maxDate: 0,
121
- autoSize: true,
122
- onClose: function( selectedDate ) {
123
- $j( "#fdx_from" ).datepicker( "option", "maxDate", selectedDate );
124
- },
125
- onSelect: function()
126
- {
127
- if ($j("#fdx_from").datepicker("getDate") != null)
128
- getDataForRange("fdx");
129
- }
130
- });
131
-
132
- $j( "#ups_from" ).datepicker({
133
- defaultDate: "+1w",
134
- changeMonth: true,
135
- numberOfMonths: 1,
136
- maxDate: -1,
137
- autoSize: true,
138
- onClose: function( selectedDate ) {
139
- $j( "#ups_to" ).datepicker( "option", "minDate", selectedDate );
140
- },
141
- onSelect: function()
142
- {
143
- if ($j("#ups_to").datepicker("getDate") != null)
144
- getDataForRange("ups");
145
- }
146
- });
147
-
148
- $j( "#ups_to" ).datepicker({
149
- defaultDate: "+1w",
150
- changeMonth: true,
151
- numberOfMonths: 1,
152
- maxDate: 0,
153
- autoSize: true,
154
- onClose: function( selectedDate ) {
155
- $j( "#ups_from" ).datepicker( "option", "maxDate", selectedDate );
156
- },
157
- onSelect: function()
158
- {
159
- if ($j("#ups_from").datepicker("getDate") != null)
160
- getDataForRange("ups");
161
- }
162
- });
163
-
164
- $j(".profile_li").hover(
165
- function() {
166
- $j(".profile_li").css({'background-color': '#ffffff', 'border-color': '#ffffff'});
167
- $j(this).css({'background-color': '#FDFDFD', 'border-color': '#ECE3E3'})
168
- },
169
- function() {
170
- $j(".profile_li").css({'background-color': '#ffffff', 'border-color': '#ffffff'});
171
- }
172
- );
173
- });
174
-
175
- function getDataForRange(acnt_type)
176
- {
177
- if (acnt_type == "fdx") {
178
- var fromDate = $j("#fdx_from").datepicker("getDate");
179
- var toDate = $j("#fdx_to").datepicker("getDate");
180
- }
181
- else {
182
- var fromDate = $j("#ups_from").datepicker("getDate");
183
- var toDate = $j("#ups_to").datepicker("getDate");
184
- }
185
-
186
- fromDate = $j.datepicker.formatDate('mm-dd-yy', fromDate);
187
- toDate = $j.datepicker.formatDate('mm-dd-yy', toDate);
188
-
189
- var json = { "id":"<?php echo $result->business_id ?>","from":fromDate, "to":toDate, "acnt":acnt_type, "callback":"data" };
190
- var sid ="<?php echo $result->business_id ?>";
191
- my_url = "https://54.221.203.199/api/session/selectRefundRange.jsonp?id="+ sid +"&from=" + fromDate + "&to="+toDate+"&acnt="+acnt_type+"&callback=data";
192
-
193
- $j.ajaxSetup({
194
- error: function(jqXHR, exception) {
195
- if (jqXHR.status === 0) {
196
- alert('Not connect.\n Verify Network.');
197
- } else if (jqXHR.status == 404) {
198
- alert('Requested page not found. [404]');
199
- } else if (jqXHR.status == 500) {
200
- alert('Internal Server Error [500].');
201
- } else if (exception === 'parsererror') {
202
- alert('Requested JSON parse failed.');
203
- } else if (exception === 'timeout') {
204
- alert('Time out error.');
205
- } else if (exception === 'abort') {
206
- alert('Ajax request aborted.');
207
- } else {
208
- alert('Uncaught Error.\n' + jqXHR.responseText);
209
- }
210
- }
211
- });
212
-
213
- $j.ajax({
214
- url: my_url,
215
- type: "GET",
216
- dataType: "jsonp",
217
- success: function (result) {
218
- if (acnt_type == "fdx")
219
- populateFedexTable(result);
220
- else
221
- populateUpsTable(result);
222
- },
223
- error: function (req, msg, obj) {
224
- alert("The requested data could not be processed "+ msg);
225
- }
226
- });
227
-
228
- }
229
-
230
- function populateFedexTable(result)
231
- {
232
- if (result.totalRefunds > 0) {
233
- fedexRefunds = result.refunds;
234
- //links = result.links
235
- dates = result.datesArray;
236
- $j("#fdx").empty();
237
- count = 1;
238
-
239
- $j.each( fedexRefunds, function( i, value ) {
240
- //url = '&nbsp; &nbsp;';
241
-
242
- //if(links[i] != '-1')
243
- //url = "<a href='" +links[i] +"'>refund capture</a>";
244
-
245
- if (count) { //Appended elements belong to class 'even', use for background color white
246
-
247
- $j("#fdx").append("<span class='even f_acnt'>"+fedexRefunds[i].payer_acnt+
248
- "</span><span class='even f_track'>"+fedexRefunds[i].tracking+
249
- "</span><span class='even f_date'>"+dates[i]+"</span><span class='even f_ref'>"+
250
- fedexRefunds[i].refund_amt+"</span><br />");// <span class='even f_acnt'>"+ url +"</span><br />");
251
- count = 0;
252
- }
253
- else { //Appended elements belong to class 'prime', use for background color gray
254
- $j("#fdx").append("<span class='prime f_acnt'>"+fedexRefunds[i].payer_acnt+
255
- "</span><span class='prime f_track'>"+fedexRefunds[i].tracking+
256
- "</span><span class='prime f_date'>"+dates[i]+"</span><span class='prime f_ref'>"+
257
- fedexRefunds[i].refund_amt+"</span><br />");// <span class='prime f_acnt'>"+ url +"</span><br />");
258
- count = 1;
259
- }
260
- });
261
-
262
- $j(".dash-wrapper").height($j(".dash-right").height() + 300); //recalculate new height for wrapper
263
- $j(".vertical2").height($j(".dash-wrapper").height() - 290); //recalculate new height for image
264
-
265
- $j("#refundsFdx").html("$"+result.totalRefunds);
266
- }
267
- else {
268
- $j(alert("There are no refunds available for the selected dates"));
269
- }
270
- }
271
-
272
- function populateUpsTable(result)
273
- {
274
- if (result.totalRefunds > 0) {
275
- upsRefunds = result.refunds;
276
- dates = result.datesArray;
277
- $j("#ups").empty();
278
- count = 1;
279
-
280
- $j.each( upsRefunds, function( i, value ) {
281
- if (count) {
282
- $j("#ups").append("<span class='even f_acnt'>"+upsRefunds[i].acnt_nbr+"</span><span class='even f_track'>"+
283
- upsRefunds[i].tracking+"</span><span class='even f_date'>"+dates[i]+
284
- "</span><span class='even f_inv'>"+upsRefunds[i].invoice_nbr+
285
- "</span><span class='even f_ref'>"+upsRefunds[i].refund_amt+"</span><br />");
286
- count = 0;
287
- }
288
- else {
289
- $j("#ups").append("<span class='even f_acnt'>"+upsRefunds[i].acnt_nbr+"</span><span class='even f_track'>"+
290
- upsRefunds[i].tracking+"</span><span class='even f_date'>"+dates[i]+
291
- "</span><span class='even f_inv'>"+upsRefunds[i].invoice_nbr+
292
- "</span><span class='even f_ref'>"+upsRefunds[i].refund_amt+"</span><br />");
293
- count = 1;
294
- }
295
-
296
- });
297
-
298
- $j(".dash-wrapper").height($j(".dash-right").height() + 300); //recalculate new height for wrapper
299
- $j(".vertical2").height($j(".dash-wrapper").height() - 290); //recalculate new height for image
300
- $j("#refundsUps").html("$"+result.totalRefunds);
301
- }
302
- else {
303
- $j(alert("There are no refunds available for the selected dates"));
304
- }
305
- }
306
-
307
-
308
-
309
- //mimic folder tabs to display graph and table
310
- $j(document).ready(function() {
311
- $j("#content").children("div").hide(); // Initially hide all content
312
- $j("#tabs li:first").attr("id","current"); // Activate first tab
313
- $j("#content div:first").fadeIn(); // Show first tab content
314
-
315
- $j('#tabs a').click(function(e) {
316
- e.preventDefault();
317
- if ($j(this).closest("li").attr("id") == "current"){ //detection for current tab
318
- return
319
- }
320
- else{
321
- $j("#content").children("div").hide(); //Hide all content
322
- $j("#tabs li").attr("id",""); //Reset id's
323
- $j(this).parent().attr("id","current"); // Activate this
324
- $j('#' + $j(this).attr('name')).fadeIn(); // Show content for current tab
325
- }
326
- });
327
- });
328
- //Business profile selections
329
- </script>
330
-
331
- <form autocomplete="off">
332
-
333
- <div class="dash-wrapper">
334
-
335
- <span class="b_name"><?php echo $result->business_name ?></span>
336
- <div style="clear:both"></div>
337
-
338
- <div class="dash-left">
339
- <!-- Void -->
340
- </div><!-- end dash-left -->
341
- <div class="vertical1"></div>
342
- <!--<div class="vertical2"></div>-->
343
-
344
- <div class="dash-right">
345
- <div id="ref_content" class="contents" style="overflow:hidden">
346
- <span class="welcome">Welcome to 71 Pounds</span>
347
- <div class="yr_date">Year to date refunds: <?php echo $result->yearly_total ?></div>
348
- <?php if ($result->yearly_total > 0): ?>
349
- <p class="last_updated_refunds">Last updated: <?php echo $result->last_update ?></p>
350
- <?php endif ?>
351
-
352
- <div id="dataChartsTables">
353
- <ul id="tabs">
354
- <li><a href="#" name="tab1">Graph</a></li>
355
- <li><a href="#" name="tab2">Table</a></li>
356
- </ul>
357
-
358
- <div id="content">
359
-
360
- <div id="tab1">
361
- <div id="chart_div"></div>
362
- </div><!-- tab1 -->
363
-
364
- <div id="tab2">
365
- <div class="totals">
366
- <span class="f_this"> <?php echo ($result->fdx_this_month); ?> </span>
367
- <span class="f_last"><?php echo ($result->fdx_prev_month); ?> </span>
368
- <span class="f_year"><?php echo ($result->yearly_fdx_ref); ?> </span>
369
- <span class="u_this"><?php echo ($result->ups_this_month); ?> </span>
370
- <span class="u_last"><?php echo ($result->ups_prev_month); ?> </span>
371
- <span class="u_year"><?php echo ($result->yearly_ups_ref); ?> </span>
372
- <span class="t_this"><?php echo ($result->month_total); ?> </span>
373
- <span class="t_last"><?php echo ($result->prev_total); ?> </span>
374
- <span class="t_year"><?php echo($result->yearly_total); ?> </span>
375
- </div>
376
- </div><!-- tab2 -->
377
- </div>
378
- </div>
379
-
380
- <?php if ($result->fdx_uname !== null && $result->fdx_uname != ""): ?>
381
- <span class="f_latest">Current month activity - FedEx</span>
382
- <div style="margin-top: 50px"></div>
383
- <div style="width:790px">
384
- <div class="acnt_tbl2" style="border-left:1px solid #DADADA;width:140px">Account Number</div>
385
- <div class="acnt_tbl2" style="width:140px;padding-left:50px">Tracking</div>
386
- <div class="acnt_tbl2" style="width:85px">Date</div>
387
- <div class="acnt_tbl2" style="width:130px;padding-left: 30px">Refund Amount</div>
388
- <div style="clear:both"></div>
389
-
390
- <div id="fdx">
391
- <?php $count = 0 ?>
392
- <?php foreach ($result->fedex_refunds as $key => $value): ?>
393
- <?php if ($count == 0): ?>
394
- <span class="even f_acnt"><?php echo $value->payer_acnt ?></span>
395
- <span class="even f_track"><?php echo $value->tracking ?></span>
396
- <span class="even f_date"><?php echo $value->invoice_dt ?></span>
397
- <span class="even f_ref">$<?php echo $value->refund_amt ?></span>
398
-
399
- <?php $count = 1 ?>
400
- <?php else: ?>
401
- <span class="prime f_acnt"><?php echo $value->payer_acnt ?></span>
402
- <span class="prime f_track"><?php echo $value->tracking ?></span>
403
- <span class="prime f_date"><?php echo $value->invoice_dt ?></span>
404
- <span class="prime f_ref">$<?php echo $value->refund_amt ?></span>
405
- <?php $count = 0 ?>
406
- <?php endif ?>
407
- <?php endforeach ?>
408
- <div style="clear:both"></div>
409
-
410
- </div>
411
- <div style="clear:both"></div>
412
- <div class="totals_div1">
413
- <span style="margin-left: 360px;">Total Refunds</span>
414
- </div>
415
- <div class="totals_div2">
416
- <span id="refundsFdx" class="f_total"><?php echo $result->fdx_this_month ?></span>
417
- </div>
418
- </div>
419
- <span class="from">From</span>
420
- <input type="text" id="fdx_from" class="date_input" />
421
- <span>to</span>
422
- <input type="text" id="fdx_to" class="date_input" />
423
- <?php endif ?>
424
- <br/>
425
- <?php if ($result->ups_uname !== null && $result->ups_uname != ""): ?>
426
- <span class="f_latest">Current month activity - UPS</span>
427
- <div style="margin-top: 50px"></div>
428
-
429
- <div style="width:900px">
430
- <div class="acnt_tbl2" style="border-left:1px solid #DADADA;width:140px">Account Number</div>
431
- <div class="acnt_tbl2" style="width:160px;padding-left:30px">Tracking</div>
432
- <div class="acnt_tbl2" style="width:85px">Date</div>
433
- <div class="acnt_tbl2" style="width:130px;padding-left:30px">Invoice Number</div>
434
- <div class="acnt_tbl2" style="width:130px;padding-left: 30px">Refund Amount</div>
435
- <div style="clear:both"></div>
436
-
437
- <div id="ups">
438
- <?php $count = 0 ?>
439
- <?php foreach ($result->ups_refunds as $key => $value): ?>
440
- <?php if ($count == 0): ?>
441
- <span class="even f_acnt"><?php echo $value->acnt_nbr ?></span>
442
- <span class="even f_track"><?php echo $value->tracking ?></span>
443
- <span class="even f_date"><?php echo $value->invoice_dt ?></span>
444
- <span class="even f_inv"><?php echo $value->invoice_nbr ?></span>
445
- <span class="even f_ref">$<?php echo $value->refund_amt ?></span>
446
- <?php $count = 1 ?>
447
- <?php else: ?>
448
- <span class="prime f_acnt"><?php echo $value->acnt_nbr ?></span>
449
- <span class="prime f_track"><?php echo $value->tracking ?></span>
450
- <span class="prime f_date"><?php echo $value->invoice_dt ?></span>
451
- <span class="prime f_inv"><?php echo $value->invoice_nbr ?></span>
452
- <span class="prime f_ref">$<?php echo $value->refund_amt ?></span>
453
- <?php $count = 0 ?>
454
- <?php endif ?>
455
- <div style="clear:both"></div>
456
- <?php endforeach ?>
457
- </div>
458
- </div>
459
- <div style="clear:both"></div>
460
- <div class="totals_div1" style="width:623px">
461
- <span style="margin-left:520px;">Total Refunds</span>
462
- </div>
463
- <div class="totals_div2" style="margin-left:630px">
464
- <span id="refundsUps" class="f_total"><?php echo $result->ups_this_month ?></span>
465
- </div>
466
-
467
- <span class="from">From</span>
468
- <input type="text" id="ups_from" class="date_input" />
469
- <span>to</span>
470
- <input type="text" id="ups_to" class="date_input" />
471
- <?php endif ?>
472
-
473
- </div> <!-- end refunds -->
474
-
475
- <!-- Accounts -->
476
- <div id="acnt_content" class="contents" style="display:none">
477
- <!-- Void -->
478
- </div>
479
-
480
- <!-- Users -->
481
- <div id="usr_content" class="contents" style="display:none; overflow: hidden;">
482
- <!-- Void -->
483
- </div>
484
- </div>
485
- </div>
486
- <a href="https://www.71lbs.com/businesses/<?php echo $result->business_id ?>" target="_blank">More Information</a>
487
-
488
- </form>
489
- <div id="test">
490
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/adminhtml/default/default/template/adminrefunds/about.phtml DELETED
@@ -1,4 +0,0 @@
1
- <iframe src="https://www.71lbs.com/about" width="100%" height="250">
2
- <p>Your browser does not support iframes.</p>
3
- </iframe>
4
- <a href="https://www.71lbs.com/" target="_blank">More Information</a>
 
 
 
 
app/design/adminhtml/default/default/template/adminrefunds/loginform.phtml DELETED
@@ -1,114 +0,0 @@
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
- myurl = "https://www.71lbs.com/api/session/exist.jsonp?callback=data";
26
- //myurl = "http://localhost:3000/api/session/exist.jsonp?callback=data";
27
-
28
- //data = {"created_at":null,"email":"Andrea2@gmail.com","id":null,"name":"Andrea2","updated_at":null};
29
- var data = {"email": $j("#signupEmail").val(),"password":$j("#signupPass").val()};
30
- //data = { "id":"DS5V3DA6","from":"01-01-10", "to":"10-10-13", "acnt":"fdx" };
31
- $j.ajaxSetup({
32
- error: function(jqXHR, exception) {
33
- if (jqXHR.status === 0) {
34
- alert('Not connect.\n Verify Network.');
35
- } else if (jqXHR.status == 404) {
36
- alert('Requested page not found. [404]');
37
- } else if (jqXHR.status == 500) {
38
- alert('Internal Server Error [500].');
39
- } else if (exception === 'parsererror') {
40
- alert('Requested JSON parse failed.');
41
- } else if (exception === 'timeout') {
42
- alert('Time out error.');
43
- } else if (exception === 'abort') {
44
- alert('Ajax request aborted.');
45
- } else {
46
- alert('Uncaught Error.\n' + jqXHR.responseText);
47
- }
48
- }
49
- });
50
-
51
- $j.ajax({
52
- url: myurl,
53
- crossDomain: true,
54
- type: "GET",
55
- contentType: 'application/json',
56
- dataType: "jsonp",
57
- data: data,
58
- success: function (data) {
59
- $j("#user_msj").html(data.msj);
60
- if(!data.exist){
61
- $j("#pass_block").show("fast");
62
- }
63
- else{
64
- $j("#pass_block").hide("fast");
65
- }
66
-
67
- //$j('#enviar').removeAttr("disabled");
68
- $j('#enviar').show("fast");
69
- }
70
-
71
- });
72
-
73
- });
74
- });
75
- </script>
76
- <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js"></script>
77
- <div class="content-header">
78
- <table cellspacing="0" class="grid-header">
79
- <tr>
80
- <td><h3><?= $this->__('71lbs Login form') ?></h3></td>
81
- <td class="a-right">
82
- <button onclick="editForm.submit()" class="scalable save" type="button" id="enviar" style="display: none;"><span>Login</span></button>
83
- </td>
84
- </tr>
85
- </table>
86
- </div>
87
- <div class="entry-edit">
88
- <form id="edit_form" autocomplete="off" name="edit_form" method="post" action="<?php echo $this->getUrl('*/*/post') ?>">
89
- <input name="form_key" type="hidden" value="<?php echo Mage::
90
- getSingleton('core/session')->getFormKey() ?>" />
91
- <h4 class="icon-head head-edit-form fieldset-legend"><?= $this->__('Enter the email address associated with your account of 71lbs') ?></h4>
92
- <fieldset id="my-fieldset">
93
- <table cellspacing="0" class="form-list">
94
- <tr>
95
- <td class="label"><?= $this->__('Email') ?> <span class="required">*</span></td>
96
- <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/>
97
- <a href="javascript:;" id="check_email">Check</a>
98
- <p id="user_msj"></p>
99
- </td>
100
- </tr>
101
- <tr style="display: none;" id="pass_block">
102
- <td class="label"><?= $this->__('Password') ?> <span class="required">*</span></td>
103
- <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>
104
- </tr>
105
- </table>
106
- <a href="https://www.71lbs.com/" target="_blank">Sign Up into 71lbs</a>
107
- </fieldset>
108
- </form>
109
- </div>
110
- <script type="text/javascript">
111
- var editForm = new varienForm('edit_form');
112
- </script>
113
- <div id='resultarea'>
114
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/adminhtml/default/default/template/adminrefunds/refunds.phtml DELETED
@@ -1,38 +0,0 @@
1
- <?php
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://www.71lbs.com/api/session';
16
- //$url = 'https://54.221.203.199/api/session';
17
- //$url = 'http://localhost:3000/api/session';
18
- //testing
19
- //$url = 'http://localhost/test.json';
20
- //$url = 'http://localhost/no_analytics.json';
21
-
22
- $result = file_get_contents($url, false, $context);
23
- $result = json_decode($result);
24
-
25
- //debug
26
- //var_dump($result);
27
- //setlocale(LC_MONETARY, 'en_US');
28
-
29
- if($result->error){
30
- echo("<div style='color: red'><b>Error:</b> " . $result->msj) . "</div>";
31
- echo '<a href="javascript:history.go(-1)" title="Back">&laquo; Go back</a>';
32
- exit();
33
- }
34
- if ($result->analytics_is_active)
35
- require_once("_analytics.phtml");
36
- else
37
- require_once("_no_analytics.phtml");
38
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/adminhtml/default/default/template/refund/about.phtml ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ <iframe src="https://www.71lbs.com/about?partner_cd=mag71&xlayout=iframe" width="100%" height="500">
2
+ <p>Your browser does not support iframes.</p>
3
+ </iframe>
4
+ <a href="https://www.71lbs.com/?partner_cd=mag71" target="_blank">More Information</a>
app/design/adminhtml/default/default/template/refund/loginform.phtml ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <iframe src="https://my.71lbs.com?partner_cd=mag71&xlayout=iframe" width="100%" height="750">
2
+ <p>Your browser does not support iframes.</p>
3
+ </iframe>
app/etc/modules/{Lbs71_Adminrefunds.xml → Lbs71_Refund.xml} RENAMED
@@ -1,10 +1,10 @@
1
  <?xml version="1.0"?>
2
  <config>
3
  <modules>
4
- <Lbs71_Adminrefunds>
5
  <active>true</active>
6
  <codePool>community</codePool>
7
  <depends></depends>
8
- </Lbs71_Adminrefunds>
9
  </modules>
10
- </config>
1
  <?xml version="1.0"?>
2
  <config>
3
  <modules>
4
+ <Lbs71_Refund>
5
  <active>true</active>
6
  <codePool>community</codePool>
7
  <depends></depends>
8
+ </Lbs71_Refund>
9
  </modules>
10
+ </config>
package.xml CHANGED
@@ -1,19 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>lbs71</name>
4
- <version>0.1.0.9</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>2014-01-07</date>
15
- <time>19:54:22</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="_analytics.phtml" hash="e1a89398abcf4e50dd947f84cf12d2dd"/><file name="_no_analytics.phtml" hash="4093e0e733aa1dafcf04ac498f4264c5"/><file name="about.phtml" hash="bdef28c10b8e35233315a60c0bea8fcf"/><file name="loginform.phtml" hash="172f8d04e37ef043682f35412ea985fd"/><file name="refunds.phtml" hash="365d17bebdabf52aba2be4283bd8c417"/></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>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>lbs71</name>
4
+ <version>0.2.0.0</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>Contains direct access to 71lbs analytics</notes>
12
+ <authors><author><name>Jose</name><user>Jose</user><email>jose@71lbs.com</email></author></authors>
13
+ <date>2015-01-05</date>
14
+ <time>23:10:44</time>
15
+ <contents><target name="magecommunity"><dir name="Lbs71"><dir name="Refund"><dir name="Helper"><file name="Data.php" hash="bfc928b520cb02b81b20f331193de2c7"/></dir><dir name="controllers"><file name="RefundController.php" hash="8750ed40839b67394f4d6e817283600d"/></dir><dir name="etc"><file name="adminhtml.xml" hash="5fffb69adcb2555391db3e0e636968f6"/><file name="config.xml" hash="9f81a719203affbe5c85e7016fd4c082"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="refund"><file name="about.phtml" hash="41dd81355db6869d84872242f485bf21"/><file name="loginform.phtml" hash="de6d8a78d8d7381c05954d4405c2d6cf"/></dir></dir><dir name="layout"><file name="lbs71_refunds.xml" hash="b2bdbd762339d5b5923366fa32f614e1"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Lbs71_Refund.xml" hash="81ee9b11934aaa96b6bbbaeb18e6c601"/></dir></target></contents>
 
16
  <compatible/>
17
+ <dependencies><required><php><min>5.1.0</min><max>5.5.9</max></php><package><name>Mage_Core_Modules</name><channel>community</channel><min>1.5</min><max>1.9</max></package></required></dependencies>
18
  </package>