facebookfreebelvg - Version 1.0.1

Version Notes

Please, feel free to contact us at store@belvg.com

Download this release

Release Info

Developer Magento Core Team
Extension facebookfreebelvg
Version 1.0.1
Comparing to
See all releases


Code changes from version 1.0.0 to 1.0.1

Files changed (64) hide show
  1. app/code/community/Belvg/Dashboard/Block/Adminhtml/Dashboard.php +0 -98
  2. app/code/community/Belvg/Dashboard/Block/Adminhtml/Dashboard/Diagrams.php +0 -59
  3. app/code/community/Belvg/Dashboard/Block/Adminhtml/Dashboard/Graph.php +0 -611
  4. app/code/community/Belvg/Dashboard/Block/Adminhtml/Dashboard/Orders/Grid.php +0 -115
  5. app/code/community/Belvg/Dashboard/Block/Adminhtml/Dashboard/Sales.php +0 -45
  6. app/code/community/Belvg/Dashboard/Block/Adminhtml/Dashboard/Tab/Amounts.php +0 -36
  7. app/code/community/Belvg/Dashboard/Block/Adminhtml/Dashboard/Tab/Orders.php +0 -35
  8. app/code/community/Belvg/Dashboard/Block/Adminhtml/Dashboard/Totals.php +0 -45
  9. app/code/community/Belvg/Dashboard/Helper/Dashboard/Order.php +0 -63
  10. app/code/community/Belvg/Dashboard/Helper/Data.php +0 -34
  11. app/code/community/Belvg/Dashboard/Model/Mysql4/Order/Collection.php +0 -643
  12. app/code/community/Belvg/Dashboard/controllers/DashboardController.php +0 -69
  13. app/code/community/Belvg/Dashboard/etc/adminhtml.xml +0 -63
  14. app/code/community/Belvg/Dashboard/etc/config.xml +0 -81
  15. app/code/community/Belvg/Dashboard/etc/system.xml +0 -85
  16. app/code/community/Belvg/FacebookAll/Block/Active.php +0 -85
  17. app/code/community/Belvg/FacebookAll/Block/Links.php +0 -52
  18. app/code/community/Belvg/FacebookAll/Helper/Active.php +0 -153
  19. app/code/community/Belvg/FacebookAll/Helper/Data.php +0 -35
  20. app/code/community/Belvg/FacebookAll/Model/FacebookAll.php +0 -39
  21. app/code/community/Belvg/FacebookAll/Model/Mysql4/Setup.php +0 -34
  22. app/code/community/Belvg/FacebookAll/Model/System/Config/Source/Color.php +0 -42
  23. app/code/community/Belvg/FacebookAll/Model/System/Config/Source/Font.php +0 -46
  24. app/code/community/Belvg/FacebookAll/Model/System/Config/Source/Layout.php +0 -43
  25. app/code/community/Belvg/FacebookAll/controllers/CustomerController.php +0 -135
  26. app/code/community/Belvg/FacebookAll/controllers/Wishlist/IndexController.php +0 -138
  27. app/code/community/Belvg/FacebookAll/etc/adminhtml.xml +0 -56
  28. app/code/community/Belvg/FacebookAll/etc/config.xml +0 -146
  29. app/code/community/Belvg/FacebookAll/etc/system.xml +0 -361
  30. app/code/community/Belvg/FacebookAll/sql/facebookall_setup/mysql4-install-1.0.1.php +0 -51
  31. app/code/community/Belvg/FaceboookFree/etc/config.xml +1 -1
  32. app/code/community/Belvg/Fullscreenzoom/etc/adminhtml.xml +0 -56
  33. app/code/community/Belvg/Fullscreenzoom/etc/config.xml +0 -48
  34. app/code/community/Belvg/Fullscreenzoom/etc/system.xml +0 -86
  35. app/code/community/Belvg/Twitter/Block/Adminhtml/Settings.php +0 -71
  36. app/code/community/Belvg/Twitter/Block/Adminhtml/Settings/Tab/General.php +0 -174
  37. app/code/community/Belvg/Twitter/Block/Adminhtml/Settings/Tabs.php +0 -54
  38. app/code/community/Belvg/Twitter/Block/Adminhtml/Twitter.php +0 -43
  39. app/code/community/Belvg/Twitter/Block/Adminhtml/Twitter/Edit.php +0 -78
  40. app/code/community/Belvg/Twitter/Block/Adminhtml/Twitter/Edit/Form.php +0 -49
  41. app/code/community/Belvg/Twitter/Block/Adminhtml/Twitter/Edit/Tab/Form.php +0 -167
  42. app/code/community/Belvg/Twitter/Block/Adminhtml/Twitter/Edit/Tab/Settings.php +0 -196
  43. app/code/community/Belvg/Twitter/Block/Adminhtml/Twitter/Edit/Tabs.php +0 -59
  44. app/code/community/Belvg/Twitter/Block/Adminhtml/Twitter/Grid.php +0 -148
  45. app/code/community/Belvg/Twitter/Block/Twitter.php +0 -88
  46. app/code/community/Belvg/Twitter/Block/Twitterbtn.php +0 -61
  47. app/code/community/Belvg/Twitter/Helper/Data.php +0 -36
  48. app/code/community/Belvg/Twitter/Model/Ipad.php +0 -40
  49. app/code/community/Belvg/Twitter/Model/Main.php +0 -99
  50. app/code/community/Belvg/Twitter/Model/Mysql4/Twitter.php +0 -40
  51. app/code/community/Belvg/Twitter/Model/Mysql4/Twitter/Collection.php +0 -40
  52. app/code/community/Belvg/Twitter/Model/Source/Btntype.php +0 -43
  53. app/code/community/Belvg/Twitter/Model/Source/Langtype.php +0 -47
  54. app/code/community/Belvg/Twitter/Model/Status.php +0 -45
  55. app/code/community/Belvg/Twitter/Model/Twitter.php +0 -100
  56. app/code/community/Belvg/Twitter/controllers/AdminController.php +0 -218
  57. app/code/community/Belvg/Twitter/controllers/IndexController.php +0 -45
  58. app/code/community/Belvg/Twitter/controllers/UserController.php +0 -181
  59. app/code/community/Belvg/Twitter/etc/adminhtml.xml +0 -57
  60. app/code/community/Belvg/Twitter/etc/config.xml +0 -169
  61. app/code/community/Belvg/Twitter/etc/system.xml +0 -200
  62. app/code/community/Belvg/Twitter/sql/twitter_setup/mysql4-install-1.1.7.php +0 -77
  63. app/etc/modules/Belvg_FacebookFree.xml +1 -1
  64. package.xml +3 -3
app/code/community/Belvg/Dashboard/Block/Adminhtml/Dashboard.php DELETED
@@ -1,98 +0,0 @@
1
- <?php
2
- /**
3
- * Magento
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
- *
15
- * DISCLAIMER
16
- *
17
- * Do not edit or add to this file if you wish to upgrade Magento to newer
18
- * versions in the future. If you wish to customize Magento for your
19
- * needs please refer to http://www.magentocommerce.com for more information.
20
- *
21
- * @category Mage
22
- * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
- */
26
-
27
- class Belvg_Dashboard_Block_Adminhtml_Dashboard extends Mage_Adminhtml_Block_Dashboard
28
- {
29
- protected $_locale;
30
-
31
- /**
32
- * Location of the "Enable Chart" config param
33
- */
34
- const XML_PATH_ENABLE_CHARTS = 'admin/dashboard/enable_charts';
35
-
36
- public function __construct()
37
- {
38
- parent::__construct();
39
- if (Mage::getStoreConfig('dashboard/settings/enabled')) {
40
- $this->setTemplate('adv_dashboard/index.phtml');
41
- } else {
42
- $this->setTemplate('dashboard/index.phtml');
43
- }
44
-
45
-
46
- }
47
-
48
- protected function _prepareLayout()
49
- {
50
- $this->setChild('lastOrders',
51
- $this->getLayout()->createBlock('adminhtml/dashboard_orders_grid')
52
- );
53
-
54
- $this->setChild('totals',
55
- $this->getLayout()->createBlock('adminhtml/dashboard_totals')
56
- );
57
-
58
- $this->setChild('sales',
59
- $this->getLayout()->createBlock('adminhtml/dashboard_sales')
60
- );
61
-
62
- $this->setChild('lastSearches',
63
- $this->getLayout()->createBlock('adminhtml/dashboard_searches_last')
64
- );
65
-
66
- $this->setChild('topSearches',
67
- $this->getLayout()->createBlock('adminhtml/dashboard_searches_top')
68
- );
69
-
70
- if (Mage::getStoreConfig(self::XML_PATH_ENABLE_CHARTS)) {
71
- $block = $this->getLayout()->createBlock('adminhtml/dashboard_diagrams');
72
- } else {
73
- $block = $this->getLayout()->createBlock('adminhtml/template')
74
- ->setTemplate('dashboard/graph/disabled.phtml')
75
- ->setConfigUrl($this->getUrl('adminhtml/system_config/edit', array('section'=>'admin')));
76
- }
77
- $this->setChild('diagrams', $block);
78
-
79
- $this->setChild('grids',
80
- $this->getLayout()->createBlock('adminhtml/dashboard_grids')
81
- );
82
-
83
- parent::_prepareLayout();
84
- }
85
-
86
- public function getOrderCount() {
87
- $values = Mage::getStoreConfig('dashboard/settings/orders');
88
- $array = explode(',', $values);
89
- foreach ($array as $k => $v) {
90
- $array[$k] = (int)trim($v);
91
- if ($array[$k] <= 0) {
92
- unset($array[$k]);
93
- }
94
- }
95
- sort($array);
96
- return $array;
97
- }
98
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/Dashboard/Block/Adminhtml/Dashboard/Diagrams.php DELETED
@@ -1,59 +0,0 @@
1
- <?php
2
- /**
3
- * Magento
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
- *
15
- * DISCLAIMER
16
- *
17
- * Do not edit or add to this file if you wish to upgrade Magento to newer
18
- * versions in the future. If you wish to customize Magento for your
19
- * needs please refer to http://www.magentocommerce.com for more information.
20
- *
21
- * @category Mage
22
- * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
- */
26
-
27
- /**
28
- * Adminhtml dashboard diagram tabs
29
- *
30
- * @category Mage
31
- * @package Mage_Adminhtml
32
- * @author Magento Core Team <core@magentocommerce.com>
33
- */
34
-
35
- class Belvg_Dashboard_Block_Adminhtml_Dashboard_Diagrams extends Mage_Adminhtml_Block_Dashboard_Diagrams
36
- {
37
- public function __construct()
38
- {
39
- parent::__construct();
40
- $this->setId('diagram_tab');
41
- $this->setDestElementId('diagram_tab_content');
42
- $this->setTemplate('widget/tabshoriz.phtml');
43
- }
44
-
45
- protected function _prepareLayout()
46
- {
47
- $this->addTab('orders', array(
48
- 'label' => $this->__('Orders'),
49
- 'content' => $this->getLayout()->createBlock('adminhtml/dashboard_tab_orders')->toHtml(),
50
- 'active' => true
51
- ));
52
-
53
- $this->addTab('amounts', array(
54
- 'label' => $this->__('Amounts'),
55
- 'content' => $this->getLayout()->createBlock('adminhtml/dashboard_tab_amounts')->toHtml(),
56
- ));
57
- return Mage_Adminhtml_Block_Widget_Tabs::_prepareLayout();
58
- }
59
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/Dashboard/Block/Adminhtml/Dashboard/Graph.php DELETED
@@ -1,611 +0,0 @@
1
- <?php
2
-
3
- class Belvg_Dashboard_Block_Adminhtml_Dashboard_Graph extends Mage_Adminhtml_Block_Dashboard_Abstract
4
- {
5
- /**
6
- * Api URL
7
- */
8
- const API_URL = 'http://chart.apis.google.com/chart';
9
-
10
- /**
11
- * All series
12
- *
13
- * @var array
14
- */
15
- protected $_allSeries = array();
16
-
17
- /**
18
- * Axis labels
19
- *
20
- * @var array
21
- */
22
- protected $_axisLabels = array();
23
-
24
- /**
25
- * Axis maps
26
- *
27
- * @var array
28
- */
29
- protected $_axisMaps = array();
30
-
31
- /**
32
- * Data rows
33
- *
34
- * @var array
35
- */
36
- protected $_dataRows = array();
37
-
38
- /**
39
- * Simple encoding chars
40
- *
41
- * @var string
42
- */
43
- protected $_simpleEncoding = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
44
-
45
- /**
46
- * Extended encoding chars
47
- *
48
- * @var string
49
- */
50
- protected $_extendedEncoding = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-.';
51
-
52
- /**
53
- * Chart width
54
- *
55
- * @var string
56
- */
57
- protected $_width = '587';
58
-
59
- /**
60
- * Chart height
61
- *
62
- * @var string
63
- */
64
- protected $_height = '300';
65
-
66
- /**
67
- * Google chart api data encoding
68
- *
69
- * @var string
70
- */
71
- protected $_encoding = 'e';
72
-
73
- /**
74
- * Html identifier
75
- *
76
- * @var string
77
- */
78
- protected $_htmlId = '';
79
-
80
- /**
81
- * Initialize object
82
- *
83
- * @return void
84
- */
85
- public function __construct()
86
- {
87
- parent::__construct();
88
- if (Mage::getStoreConfig('dashboard/settings/enabled')) {
89
- $this->setTemplate('adv_dashboard/graph.phtml');
90
- } else {
91
- $this->setTemplate('dashboard/graph.phtml');
92
- }
93
-
94
- }
95
-
96
- /**
97
- * Get tab template
98
- *
99
- * @return string
100
- */
101
- protected function _getTabTemplate()
102
- {
103
- if (Mage::getStoreConfig('dashboard/settings/enabled')) {
104
- return 'adv_dashboard/graph.phtml';
105
- } else {
106
- return 'dashboard/graph.phtml';
107
- }
108
- }
109
-
110
- /**
111
- * Set data rows
112
- *
113
- * @param mixed $rows
114
- * @return void
115
- */
116
- public function setDataRows($rows)
117
- {
118
- $this->_dataRows = (array)$rows;
119
- }
120
-
121
- /**
122
- * Add series
123
- *
124
- * @param string $seriesId
125
- * @param array $options
126
- * @return void
127
- */
128
- public function addSeries($seriesId, array $options)
129
- {
130
- $this->_allSeries[$seriesId] = $options;
131
- }
132
-
133
- /**
134
- * Get series
135
- *
136
- * @param string $seriesId
137
- * @return mixed
138
- */
139
- public function getSeries($seriesId)
140
- {
141
- if (isset($this->_allSeries[$seriesId])) {
142
- return $this->_allSeries[$seriesId];
143
- } else {
144
- return false;
145
- }
146
- }
147
-
148
- /**
149
- * Get all series
150
- *
151
- * @return array
152
- */
153
- public function getAllSeries()
154
- {
155
- return $this->_allSeries;
156
- }
157
-
158
- public function getChartData()
159
- {
160
- $params = array(
161
- 'cht' => 'lc',
162
- 'chf' => 'bg,s,f4f4f4|c,lg,90,ffffff,0.1,ededed,0',
163
- 'chm' => 'B,f4d4b2,0,0,0',
164
- 'chco' => 'db4814'
165
- );
166
-
167
- $this->_allSeries = $this->getRowsData($this->_dataRows);
168
-
169
- foreach ($this->_axisMaps as $axis => $attr){
170
- $this->setAxisLabels($axis, $this->getRowsData($attr, true));
171
- }
172
-
173
- $gmtOffset = Mage::getSingleton('core/date')->getGmtOffset();
174
-
175
- $from = Mage::app()->getRequest()->getParam('from', '');
176
- $to = Mage::app()->getRequest()->getParam('to', '');
177
-
178
- list ($dateStart, $dateEnd) = Mage::getResourceModel('reports/order_collection')
179
- ->getDateRange($this->getDataHelper()->getParam('period'), $from, $to, true);
180
- if (strlen($from) && strlen($to)) {
181
- $dateStart = new Zend_Date(strtotime($from));
182
- $dateEnd = new Zend_Date(strtotime($to));
183
- }
184
-
185
- $dates = array();
186
- $datas = array();
187
-
188
- while($dateStart->compare($dateEnd) < 0){
189
- switch ($this->getDataHelper()->getParam('period')) {
190
- case '24h':
191
- $d = $dateStart->toString('yyyy-MM-dd HH:00');
192
- $dateStart->addHour(1);
193
- break;
194
- case '7d':
195
- case '1m':
196
- $d = $dateStart->toString('yyyy-MM-dd');
197
- $dateStart->addDay(1);
198
- break;
199
- case 'custom':
200
- $d = $dateStart->toString('yyyy-MM-dd');
201
- $dateStart->addDay(1);
202
- break;
203
- case '1y':
204
- case '2y':
205
- $d = $dateStart->toString('yyyy-MM');
206
- $dateStart->addMonth(1);
207
- break;
208
- }
209
-
210
- foreach ($this->getAllSeries() as $index=>$serie) {
211
- if (in_array($d, $this->_axisLabels['x'])) {
212
- $datas[$index][] = (float)array_shift($this->_allSeries[$index]);
213
- } else {
214
- $datas[$index][] = 0;
215
- }
216
- }
217
- $dates[] = $d;
218
- }
219
- $result = array();
220
- foreach (array_shift($datas) as $k => $v) {
221
- $result[$k] = array('date'=>explode('-', $dates[$k]), 'data'=>$v);
222
- }
223
- return $result;
224
- }
225
- /**
226
- * Get chart url
227
- *
228
- * @param bool $directUrl
229
- * @return string
230
- */
231
- public function getChartUrl($directUrl = true)
232
- {
233
- $params = array(
234
- 'cht' => 'lc',
235
- 'chf' => 'bg,s,f4f4f4|c,lg,90,ffffff,0.1,ededed,0',
236
- 'chm' => 'B,f4d4b2,0,0,0',
237
- 'chco' => 'db4814'
238
- );
239
-
240
- $this->_allSeries = $this->getRowsData($this->_dataRows);
241
-
242
- foreach ($this->_axisMaps as $axis => $attr){
243
- $this->setAxisLabels($axis, $this->getRowsData($attr, true));
244
- }
245
-
246
- $gmtOffset = Mage::getSingleton('core/date')->getGmtOffset();
247
-
248
- $from = Mage::app()->getRequest()->getParam('from', '');
249
- $to = Mage::app()->getRequest()->getParam('to', '');
250
-
251
- list ($dateStart, $dateEnd) = Mage::getResourceModel('reports/order_collection')
252
- ->getDateRange($this->getDataHelper()->getParam('period'), $from, $to, true);
253
- if (strlen($from) && strlen($to)) {
254
- $dateStart = new Zend_Date(strtotime($from));
255
- $dateEnd = new Zend_Date(strtotime($to));
256
- }
257
-
258
- $dates = array();
259
- $datas = array();
260
-
261
- while($dateStart->compare($dateEnd) < 0){
262
- switch ($this->getDataHelper()->getParam('period')) {
263
- case '24h':
264
- $d = $dateStart->toString('yyyy-MM-dd HH:00');
265
- $dateStart->addHour(1);
266
- break;
267
- case '7d':
268
- case '1m':
269
- $d = $dateStart->toString('yyyy-MM-dd');
270
- $dateStart->addDay(1);
271
- break;
272
- case 'custom':
273
- $d = $dateStart->toString('yyyy-MM-dd');
274
- $dateStart->addDay(1);
275
- break;
276
- case '1y':
277
- case '2y':
278
- $d = $dateStart->toString('yyyy-MM');
279
- $dateStart->addMonth(1);
280
- break;
281
- }
282
-
283
- foreach ($this->getAllSeries() as $index=>$serie) {
284
- if (in_array($d, $this->_axisLabels['x'])) {
285
- $datas[$index][] = (float)array_shift($this->_allSeries[$index]);
286
- } else {
287
- $datas[$index][] = 0;
288
- }
289
- }
290
- $dates[] = $d;
291
- }
292
-
293
- /**
294
- * setting skip step
295
- */
296
- if (count($dates) > 8 && count($dates) < 15) {
297
- $c = 1;
298
- } else if (count($dates) >= 15){
299
- $c = 2;
300
- } else {
301
- $c = 0;
302
- }
303
- /**
304
- * skipping some x labels for good reading
305
- */
306
- $i=0;
307
- foreach ($dates as $k => $d) {
308
- if ($i == $c) {
309
- $dates[$k] = $d;
310
- $i = 0;
311
- } else {
312
- $dates[$k] = '';
313
- $i++;
314
- }
315
- }
316
-
317
- $this->_axisLabels['x'] = $dates;
318
- $this->_allSeries = $datas;
319
-
320
- //Google encoding values
321
- if ($this->_encoding == "s") {
322
- // simple encoding
323
- $params['chd'] = "s:";
324
- $dataDelimiter = "";
325
- $dataSetdelimiter = ",";
326
- $dataMissing = "_";
327
- } else {
328
- // extended encoding
329
- $params['chd'] = "e:";
330
- $dataDelimiter = "";
331
- $dataSetdelimiter = ",";
332
- $dataMissing = "__";
333
- }
334
-
335
- // process each string in the array, and find the max length
336
- foreach ($this->getAllSeries() as $index => $serie) {
337
- $localmaxlength[$index] = sizeof($serie);
338
- $localmaxvalue[$index] = max($serie);
339
- $localminvalue[$index] = min($serie);
340
- }
341
-
342
- if (is_numeric($this->_max)) {
343
- $maxvalue = $this->_max;
344
- } else {
345
- $maxvalue = max($localmaxvalue);
346
- }
347
- if (is_numeric($this->_min)) {
348
- $minvalue = $this->_min;
349
- } else {
350
- $minvalue = min($localminvalue);
351
- }
352
-
353
- // default values
354
- $yrange = 0;
355
- $yLabels = array();
356
- $miny = 0;
357
- $maxy = 0;
358
- $yorigin = 0;
359
-
360
- $maxlength = max($localmaxlength);
361
- if ($minvalue >= 0 && $maxvalue >= 0) {
362
- $miny = 0;
363
- if ($maxvalue > 10) {
364
- $p = pow(10, $this->_getPow($maxvalue));
365
- $maxy = (ceil($maxvalue/$p))*$p;
366
- $yLabels = range($miny, $maxy, $p);
367
- } else {
368
- $maxy = ceil($maxvalue+1);
369
- $yLabels = range($miny, $maxy, 1);
370
- }
371
- $yrange = $maxy;
372
- $yorigin = 0;
373
- }
374
-
375
- $chartdata = array();
376
-
377
- foreach ($this->getAllSeries() as $index => $serie) {
378
- $thisdataarray = $serie;
379
- if ($this->_encoding == "s") {
380
- // SIMPLE ENCODING
381
- for ($j = 0; $j < sizeof($thisdataarray); $j++) {
382
- $currentvalue = $thisdataarray[$j];
383
- if (is_numeric($currentvalue)) {
384
- $ylocation = round((strlen($this->_simpleEncoding)-1) * ($yorigin + $currentvalue) / $yrange);
385
- array_push($chartdata, substr($this->_simpleEncoding, $ylocation, 1) . $dataDelimiter);
386
- } else {
387
- array_push($chartdata, $dataMissing . $dataDelimiter);
388
- }
389
- }
390
- // END SIMPLE ENCODING
391
- } else {
392
- // EXTENDED ENCODING
393
- for ($j = 0; $j < sizeof($thisdataarray); $j++) {
394
- $currentvalue = $thisdataarray[$j];
395
- if (is_numeric($currentvalue)) {
396
- if ($yrange) {
397
- $ylocation = (4095 * ($yorigin + $currentvalue) / $yrange);
398
- } else {
399
- $ylocation = 0;
400
- }
401
- $firstchar = floor($ylocation / 64);
402
- $secondchar = $ylocation % 64;
403
- $mappedchar = substr($this->_extendedEncoding, $firstchar, 1)
404
- . substr($this->_extendedEncoding, $secondchar, 1);
405
- array_push($chartdata, $mappedchar . $dataDelimiter);
406
- } else {
407
- array_push($chartdata, $dataMissing . $dataDelimiter);
408
- }
409
- }
410
- // ============= END EXTENDED ENCODING =============
411
- }
412
- array_push($chartdata, $dataSetdelimiter);
413
- }
414
-
415
- $buffer = implode('', $chartdata);
416
-
417
- $buffer = rtrim($buffer, $dataSetdelimiter);
418
- $buffer = rtrim($buffer, $dataDelimiter);
419
- $buffer = str_replace(($dataDelimiter . $dataSetdelimiter), $dataSetdelimiter, $buffer);
420
-
421
- $params['chd'] .= $buffer;
422
-
423
- $labelBuffer = "";
424
- $valueBuffer = array();
425
- $rangeBuffer = "";
426
-
427
- if (sizeof($this->_axisLabels) > 0) {
428
- $params['chxt'] = implode(',', array_keys($this->_axisLabels));
429
- $indexid = 0;
430
- foreach ($this->_axisLabels as $idx=>$labels){
431
- if ($idx == 'x') {
432
- /**
433
- * Format date
434
- */
435
- foreach ($this->_axisLabels[$idx] as $_index=>$_label) {
436
- if ($_label != '') {
437
- switch ($this->getDataHelper()->getParam('period')) {
438
- case '24h':
439
- $this->_axisLabels[$idx][$_index] = $this->formatTime($_label, 'short', false);
440
- break;
441
- case '7d':
442
- case '1m':
443
- $this->_axisLabels[$idx][$_index] = $this->formatDate($_label);
444
- break;
445
- case '1y':
446
- case '2y':
447
- $formats = Mage::app()->getLocale()->getTranslationList('datetime');
448
- $format = isset($formats['yyMM']) ? $formats['yyMM'] : 'MM/yyyy';
449
- $format = str_replace(array("yyyy", "yy", "MM"), array("Y", "y", "m"), $format);
450
- $this->_axisLabels[$idx][$_index] = date($format, strtotime($_label));
451
- break;
452
- }
453
- } else {
454
- $this->_axisLabels[$idx][$_index] = '';
455
- }
456
-
457
- }
458
-
459
- $tmpstring = implode('|', $this->_axisLabels[$idx]);
460
-
461
- $valueBuffer[] = $indexid . ":|" . $tmpstring;
462
- if (sizeof($this->_axisLabels[$idx]) > 1) {
463
- $deltaX = 100/(sizeof($this->_axisLabels[$idx])-1);
464
- } else {
465
- $deltaX = 100;
466
- }
467
- } else if ($idx == 'y') {
468
- $valueBuffer[] = $indexid . ":|" . implode('|', $yLabels);
469
- if (sizeof($yLabels)-1) {
470
- $deltaY = 100/(sizeof($yLabels)-1);
471
- } else {
472
- $deltaY = 100;
473
- }
474
- // setting range values for y axis
475
- $rangeBuffer = $indexid . "," . $miny . "," . $maxy . "|";
476
- }
477
- $indexid++;
478
- }
479
- $params['chxl'] = implode('|', $valueBuffer);
480
- };
481
-
482
- // chart size
483
- $params['chs'] = $this->getWidth().'x'.$this->getHeight();
484
-
485
- if (isset($deltaX) && isset($deltaY)) {
486
- $params['chg'] = $deltaX . ',' . $deltaY . ',1,0';
487
- }
488
-
489
- // return the encoded data
490
- if ($directUrl) {
491
- $p = array();
492
- foreach ($params as $name => $value) {
493
- $p[] = $name . '=' .urlencode($value);
494
- }
495
- return self::API_URL . '?' . implode('&', $p);
496
- } else {
497
- $gaData = urlencode(base64_encode(serialize($params)));
498
- $gaHash = Mage::helper('adminhtml/dashboard_data')->getChartDataHash($gaData);
499
- $params = array('ga' => $gaData, 'h' => $gaHash);
500
- return $this->getUrl('*/*/tunnel', array('_query' => $params));
501
- }
502
- }
503
-
504
- /**
505
- * Get rows data
506
- *
507
- * @param array $attributes
508
- * @param bool $single
509
- * @return array
510
- */
511
- protected function getRowsData($attributes, $single = false)
512
- {
513
- $items = $this->getCollection()->getItems();
514
-
515
- $options = array();
516
- foreach ($items as $item){
517
- if ($single) {
518
- $options[] = $item->getData($attributes);
519
- } else {
520
- foreach ((array)$attributes as $attr){
521
- $options[$attr][] = $item->getData($attr);
522
- }
523
- }
524
- }
525
- return $options;
526
- }
527
-
528
- /**
529
- * Set axis labels
530
- *
531
- * @param string $axis
532
- * @param array $labels
533
- * @return void
534
- */
535
- public function setAxisLabels($axis, $labels)
536
- {
537
- $this->_axisLabels[$axis] = $labels;
538
- }
539
-
540
- /**
541
- * Set html id
542
- *
543
- * @param string $htmlId
544
- * @return void
545
- */
546
- public function setHtmlId($htmlId)
547
- {
548
- $this->_htmlId = $htmlId;
549
- }
550
-
551
- /**
552
- * Get html id
553
- *
554
- * @return string
555
- */
556
- public function getHtmlId()
557
- {
558
- return $this->_htmlId;
559
- }
560
-
561
- /**
562
- * Return pow
563
- *
564
- * @param int $number
565
- * @return int
566
- */
567
- protected function _getPow($number)
568
- {
569
- $pow = 0;
570
- while ($number >= 10) {
571
- $number = $number/10;
572
- $pow++;
573
- }
574
- return $pow;
575
- }
576
-
577
- /**
578
- * Return chart width
579
- *
580
- * @return string
581
- */
582
- protected function getWidth()
583
- {
584
- return $this->_width;
585
- }
586
-
587
- /**
588
- * Return chart height
589
- *
590
- * @return string
591
- */
592
- protected function getHeight()
593
- {
594
- return $this->_height;
595
- }
596
-
597
- /**
598
- * Prepare chart data
599
- *
600
- * @return void
601
- */
602
- protected function _prepareData()
603
- {
604
- $availablePeriods = array_keys($this->helper('adminhtml/dashboard_data')->getDatePeriods());
605
- $period = $this->getRequest()->getParam('period');
606
-
607
- $this->getDataHelper()->setParam('period',
608
- ($period && (in_array($period, $availablePeriods) || $period=='custom')) ? $period : '24h'
609
- );
610
- }
611
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/Dashboard/Block/Adminhtml/Dashboard/Orders/Grid.php DELETED
@@ -1,115 +0,0 @@
1
- <?php
2
-
3
-
4
- class Belvg_Dashboard_Block_Adminhtml_Dashboard_Orders_Grid extends Mage_Adminhtml_Block_Dashboard_Orders_Grid
5
- {
6
-
7
- public function __construct()
8
- {
9
- parent::__construct();
10
- $this->setId('lastOrdersGrid');
11
- if (Mage::getStoreConfig('dashboard/settings/enabled')) {
12
- $this->setTemplate('adv_dashboard/grid.phtml');
13
- } else {
14
- $this->setTemplate('dashboard/grid.phtml');
15
- }
16
-
17
- $this->setDefaultLimit($this->getRequest()->getParam('order', 5));
18
- }
19
-
20
- protected function _prepareCollection()
21
- {
22
- $collection = Mage::getResourceModel('reports/order_collection')
23
- ->addItemCountExpr()
24
- ->joinCustomerName('customer')
25
- ->orderByCreatedAt();
26
-
27
- if($this->getParam('store') || $this->getParam('website') || $this->getParam('group')) {
28
- if ($this->getParam('store')) {
29
- $collection->addAttributeToFilter('store_id', $this->getParam('store'));
30
- } else if ($this->getParam('website')){
31
- $storeIds = Mage::app()->getWebsite($this->getParam('website'))->getStoreIds();
32
- $collection->addAttributeToFilter('store_id', array('in' => $storeIds));
33
- } else if ($this->getParam('group')){
34
- $storeIds = Mage::app()->getGroup($this->getParam('group'))->getStoreIds();
35
- $collection->addAttributeToFilter('store_id', array('in' => $storeIds));
36
- }
37
-
38
- $collection->addRevenueToSelect();
39
- } else {
40
- $collection->addRevenueToSelect(true);
41
- }
42
-
43
- $this->setCollection($collection);
44
-
45
- return parent::_prepareCollection();
46
- }
47
-
48
- /**
49
- * Prepares page sizes for dashboard grid with las 5 orders
50
- *
51
- * @return void
52
- */
53
- protected function _preparePage()
54
- {
55
- $this->getCollection()->setPageSize($this->getParam($this->getVarNameLimit(), $this->_defaultLimit));
56
- // Remove count of total orders $this->getCollection()->setCurPage($this->getParam($this->getVarNamePage(), $this->_defaultPage));
57
- }
58
-
59
- protected function _prepareColumns()
60
- {
61
- $this->addColumn('increment_id', array(
62
- 'header' => $this->__('Number'),
63
- 'sortable' => false,
64
- 'index' => 'increment_id',
65
- 'width' => '40px',
66
- ));
67
-
68
- $this->addColumn('customer', array(
69
- 'header' => $this->__('Customer'),
70
- 'sortable' => false,
71
- 'index' => 'customer',
72
- 'default' => $this->__('Guest'),
73
- 'width' => '40px',
74
- ));
75
-
76
- $this->addColumn('items', array(
77
- 'header' => $this->__('Items'),
78
- 'align' => 'right',
79
- 'type' => 'number',
80
- 'width' => '40px',
81
- 'sortable' => false,
82
- 'index' => 'items_count'
83
- ));
84
-
85
- $baseCurrencyCode = Mage::app()->getStore((int)$this->getParam('store'))->getBaseCurrencyCode();
86
-
87
- $this->addColumn('total', array(
88
- 'header' => $this->__('Grand Total'),
89
- 'align' => 'right',
90
- 'sortable' => false,
91
- 'type' => 'currency',
92
- 'currency_code' => $baseCurrencyCode,
93
- 'index' => 'revenue'
94
- ));
95
-
96
- $this->addColumn('status', array(
97
- 'header' => $this->__('Status'),
98
- 'sortable' => false,
99
- 'index' => 'status',
100
- 'type' => 'options',
101
- 'width' => '70px',
102
- 'options' => Mage::getSingleton('sales/order_config')->getStatuses(),
103
- ));
104
-
105
- $this->setFilterVisibility(false);
106
- $this->setPagerVisibility(false);
107
-
108
- return parent::_prepareColumns();
109
- }
110
-
111
- public function getRowUrl($row)
112
- {
113
- return $this->getUrl('*/sales_order/view', array('order_id'=>$row->getId()));
114
- }
115
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/Dashboard/Block/Adminhtml/Dashboard/Sales.php DELETED
@@ -1,45 +0,0 @@
1
- <?php
2
-
3
- class Belvg_Dashboard_Block_Adminhtml_Dashboard_Sales extends Mage_Adminhtml_Block_Dashboard_Sales
4
- {
5
- protected function _construct()
6
- {
7
- parent::_construct();
8
- if (Mage::getStoreConfig('dashboard/settings/enabled')) {
9
- $this->setTemplate('adv_dashboard/salebar.phtml');
10
- } else {
11
- $this->setTemplate('dashboard/salebar.phtml');
12
- }
13
-
14
-
15
-
16
- }
17
-
18
- protected function _prepareLayout()
19
- {
20
- $isFilter = $this->getRequest()->getParam('store') || $this->getRequest()->getParam('website') || $this->getRequest()->getParam('group');
21
-
22
- $collection = Mage::getResourceModel('reports/order_collection')
23
- ->calculateSales($isFilter);
24
-
25
- if ($this->getRequest()->getParam('store')) {
26
- $collection->addFieldToFilter('store_id', $this->getRequest()->getParam('store'));
27
- } else if ($this->getRequest()->getParam('website')){
28
- $storeIds = Mage::app()->getWebsite($this->getRequest()->getParam('website'))->getStoreIds();
29
- $collection->addFieldToFilter('store_id', array('in' => $storeIds));
30
- } else if ($this->getRequest()->getParam('group')){
31
- $storeIds = Mage::app()->getGroup($this->getRequest()->getParam('group'))->getStoreIds();
32
- $collection->addFieldToFilter('store_id', array('in' => $storeIds));
33
- }
34
-
35
- $collection->load();
36
- $sales = $collection->getFirstItem();
37
-
38
- $this->addTotal($this->__('Lifetime Sales'), $sales->getLifetime());
39
- $this->addTotal($this->__('Average Orders'), $sales->getAverage());
40
-
41
- if (Mage::getStoreConfig('dashboard/settings/enabled')) {
42
- $this->addTotal($this->__('Daily Sales'), $sales->getDay());
43
- }
44
- }
45
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/Dashboard/Block/Adminhtml/Dashboard/Tab/Amounts.php DELETED
@@ -1,36 +0,0 @@
1
- <?php
2
- class Belvg_Dashboard_Block_Adminhtml_Dashboard_Tab_Amounts extends Belvg_Dashboard_Block_Adminhtml_Dashboard_Graph
3
- {
4
- /**
5
- * Initialize object
6
- *
7
- * @return void
8
- */
9
- public function __construct()
10
- {
11
- $this->setHtmlId('amounts');
12
- parent::__construct();
13
- }
14
-
15
- /**
16
- * Prepare chart data
17
- *
18
- * @return void
19
- */
20
- protected function _prepareData()
21
- {
22
- $this->setDataHelperName('adminhtml/dashboard_order');
23
- $this->getDataHelper()->setParam('store', $this->getRequest()->getParam('store'));
24
- $this->getDataHelper()->setParam('website', $this->getRequest()->getParam('website'));
25
- $this->getDataHelper()->setParam('group', $this->getRequest()->getParam('group'));
26
-
27
- $this->setDataRows('revenue');
28
- $this->_axisMaps = array(
29
- 'x' => 'range',
30
- 'y' => 'revenue'
31
- );
32
-
33
- parent::_prepareData();
34
- }
35
- }
36
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/Dashboard/Block/Adminhtml/Dashboard/Tab/Orders.php DELETED
@@ -1,35 +0,0 @@
1
- <?php
2
- class Belvg_Dashboard_Block_Adminhtml_Dashboard_Tab_Orders extends Belvg_Dashboard_Block_Adminhtml_Dashboard_Graph
3
- {
4
- /**
5
- * Initialize object
6
- *
7
- * @return void
8
- */
9
- public function __construct()
10
- {
11
- $this->setHtmlId('orders');
12
- parent::__construct();
13
- }
14
-
15
- /**
16
- * Prepare chart data
17
- *
18
- * @return void
19
- */
20
- protected function _prepareData()
21
- {
22
- $this->setDataHelperName('adminhtml/dashboard_order');
23
- $this->getDataHelper()->setParam('store', $this->getRequest()->getParam('store'));
24
- $this->getDataHelper()->setParam('website', $this->getRequest()->getParam('website'));
25
- $this->getDataHelper()->setParam('group', $this->getRequest()->getParam('group'));
26
-
27
- $this->setDataRows('quantity');
28
- $this->_axisMaps = array(
29
- 'x' => 'range',
30
- 'y' => 'quantity'
31
- );
32
-
33
- parent::_prepareData();
34
- }
35
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/Dashboard/Block/Adminhtml/Dashboard/Totals.php DELETED
@@ -1,45 +0,0 @@
1
- <?php
2
-
3
- class Belvg_Dashboard_Block_Adminhtml_Dashboard_Totals extends Mage_Adminhtml_Block_Dashboard_Totals
4
- {
5
- protected function _construct()
6
- {
7
- parent::_construct();
8
-
9
- $this->setTemplate('dashboard/totalbar.phtml');
10
- }
11
-
12
- protected function _prepareLayout()
13
- {
14
- $isFilter = $this->getRequest()->getParam('store') || $this->getRequest()->getParam('website') || $this->getRequest()->getParam('group');
15
- $period = $this->getRequest()->getParam('period', '24h');
16
-
17
- /* @var $collection Mage_Reports_Model_Mysql4_Order_Collection */
18
- $collection = Mage::getResourceModel('reports/order_collection')
19
- ->addCreateAtPeriodFilter($period)
20
- ->calculateTotals($isFilter);
21
-
22
- if ($this->getRequest()->getParam('store')) {
23
- $collection->addFieldToFilter('store_id', $this->getRequest()->getParam('store'));
24
- } else if ($this->getRequest()->getParam('website')){
25
- $storeIds = Mage::app()->getWebsite($this->getRequest()->getParam('website'))->getStoreIds();
26
- $collection->addFieldToFilter('store_id', array('in' => $storeIds));
27
- } else if ($this->getRequest()->getParam('group')){
28
- $storeIds = Mage::app()->getGroup($this->getRequest()->getParam('group'))->getStoreIds();
29
- $collection->addFieldToFilter('store_id', array('in' => $storeIds));
30
- } elseif (!$collection->isLive()) {
31
- $collection->addFieldToFilter('store_id',
32
- array('eq' => Mage::app()->getStore(Mage_Core_Model_Store::ADMIN_CODE)->getId())
33
- );
34
- }
35
-
36
- $collection->load();
37
-
38
- $totals = $collection->getFirstItem();
39
-
40
- $this->addTotal($this->__('Revenue'), $totals->getRevenue());
41
- $this->addTotal($this->__('Tax'), $totals->getTax());
42
- $this->addTotal($this->__('Shipping'), $totals->getShipping());
43
- $this->addTotal($this->__('Quantity'), $totals->getQuantity()*1, true);
44
- }
45
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/Dashboard/Helper/Dashboard/Order.php DELETED
@@ -1,63 +0,0 @@
1
- <?php
2
- /**
3
- * Magento
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
- *
15
- * DISCLAIMER
16
- *
17
- * Do not edit or add to this file if you wish to upgrade Magento to newer
18
- * versions in the future. If you wish to customize Magento for your
19
- * needs please refer to http://www.magentocommerce.com for more information.
20
- *
21
- * @category Mage
22
- * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
- */
26
-
27
- /**
28
- * Adminhtml dashboard helper for orders
29
- *
30
- * @category Mage
31
- * @package Mage_Adminhtml
32
- * @author Magento Core Team <core@magentocommerce.com>
33
- */
34
- class Belvg_Dashboard_Helper_Dashboard_Order extends Mage_Adminhtml_Helper_Dashboard_Order
35
- {
36
-
37
- protected function _initCollection()
38
- {
39
- $isFilter = $this->getParam('store') || $this->getParam('website') || $this->getParam('group');
40
-
41
- $from = Mage::app()->getRequest()->getParam('from', 0);
42
- $to = Mage::app()->getRequest()->getParam('to', 0);
43
- $this->_collection = Mage::getResourceSingleton('reports/order_collection')
44
- ->prepareSummary($this->getParam('period'), $from, $to, $isFilter);
45
-
46
- if ($this->getParam('store')) {
47
- $this->_collection->addFieldToFilter('store_id', $this->getParam('store'));
48
- } else if ($this->getParam('website')){
49
- $storeIds = Mage::app()->getWebsite($this->getParam('website'))->getStoreIds();
50
- $this->_collection->addFieldToFilter('store_id', array('in' => implode(',', $storeIds)));
51
- } else if ($this->getParam('group')){
52
- $storeIds = Mage::app()->getGroup($this->getParam('group'))->getStoreIds();
53
- $this->_collection->addFieldToFilter('store_id', array('in' => implode(',', $storeIds)));
54
- } elseif (!$this->_collection->isLive()) {
55
- $this->_collection->addFieldToFilter('store_id',
56
- array('eq' => Mage::app()->getStore(Mage_Core_Model_Store::ADMIN_CODE)->getId())
57
- );
58
- }
59
-
60
- $this->_collection->load();
61
- }
62
-
63
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/Dashboard/Helper/Data.php DELETED
@@ -1,34 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * BelVG LLC.
5
- *
6
- * NOTICE OF LICENSE
7
- *
8
- * This source file is subject to the EULA
9
- * that is bundled with this package in the file LICENSE.txt.
10
- * It is also available through the world-wide-web at this URL:
11
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
12
- *
13
- /***************************************
14
- * MAGENTO EDITION USAGE NOTICE *
15
- * *************************************** */
16
- /* This package designed for Magento COMMUNITY edition
17
- * BelVG does not guarantee correct work of this extension
18
- * on any other Magento edition except Magento COMMUNITY edition.
19
- * BelVG does not provide extension support in case of
20
- * incorrect edition usage.
21
- /***************************************
22
- * DISCLAIMER *
23
- * *************************************** */
24
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
25
- * versions in the future.
26
- * ****************************************************
27
- * @category Belvg
28
- * @package Belvg_Dashboard
29
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
30
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
31
- */
32
-
33
- class Belvg_Dashboard_Helper_Data extends Mage_Core_Helper_Abstract {
34
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/Dashboard/Model/Mysql4/Order/Collection.php DELETED
@@ -1,643 +0,0 @@
1
- <?php
2
- /**
3
- * Magento
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
- *
15
- * DISCLAIMER
16
- *
17
- * Do not edit or add to this file if you wish to upgrade Magento to newer
18
- * versions in the future. If you wish to customize Magento for your
19
- * needs please refer to http://www.magentocommerce.com for more information.
20
- *
21
- * @category Mage
22
- * @package Mage_Reports
23
- * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
- */
26
-
27
-
28
- /**
29
- * Reports orders collection
30
- *
31
- * @category Mage
32
- * @package Mage_Reports
33
- * @author Magento Core Team <core@magentocommerce.com>
34
- */
35
- class Belvg_Dashboard_Model_Mysql4_Order_Collection extends Mage_Reports_Model_Mysql4_Order_Collection
36
- {
37
- protected $_isLive = false;
38
-
39
- /**
40
- * Check range for live mode
41
- *
42
- * @param $range
43
- * @return boolean
44
- */
45
- public function checkIsLive($range)
46
- {
47
- $this->_isLive = !Mage::getStoreConfig('sales/dashboard/use_aggregated_data');
48
- return $this;
49
- }
50
-
51
- /**
52
- * Retrieve is live flag for rep
53
- *
54
- * @return boolean
55
- */
56
- public function isLive()
57
- {
58
- return $this->_isLive;
59
- }
60
-
61
- /**
62
- * Prepare report summary
63
- *
64
- * @param string $range
65
- * @param mixed $customStart
66
- * @param mixed $customEnd
67
- * @param int $isFilter
68
- * @return Mage_Reports_Model_Mysql4_Order_Collection
69
- */
70
- public function prepareSummary($range, $customStart, $customEnd, $isFilter=0)
71
- {
72
- $this->checkIsLive($range);
73
- if ($this->_isLive) {
74
- $this->_prepareSummaryLive($range, $customStart, $customEnd, $isFilter);
75
- } else {
76
- $this->_prepareSummaryAggregated($range, $customStart, $customEnd, $isFilter);
77
- }
78
-
79
- return $this;
80
- }
81
-
82
- /**
83
- * Prepare report summary from live data
84
- *
85
- * @param string $range
86
- * @param mixed $customStart
87
- * @param mixed $customEnd
88
- * @param int $isFilter
89
- * @return Mage_Reports_Model_Mysql4_Order_Collection
90
- */
91
- protected function _prepareSummaryLive($range, $customStart, $customEnd, $isFilter=0)
92
- {
93
- $this->setMainTable('sales/order');
94
- if ($isFilter==0) {
95
- $this->getSelect()->columns(array(
96
- 'revenue' => 'SUM(main_table.base_grand_total*main_table.base_to_global_rate)'
97
- ));
98
- } else{
99
- $this->getSelect()->columns(array(
100
- 'revenue' => 'SUM(main_table.base_grand_total)'
101
- ));
102
- }
103
-
104
- $this->getSelect()->columns(array(
105
- 'quantity' => 'COUNT(main_table.entity_id)',
106
- 'range' => $this->_getRangeExpressionForAttribute($range, 'created_at'),
107
- ))->order('range', 'asc')
108
- ->group('range');
109
-
110
- $this->addFieldToFilter('created_at', $this->getDateRange($range, $customStart, $customEnd))
111
- ->addFieldToFilter('state', array('neq' => Mage_Sales_Model_Order::STATE_CANCELED));
112
- return $this;
113
- }
114
-
115
- /**
116
- * Prepare report summary from aggregated data
117
- *
118
- * @param string $range
119
- * @param mixed $customStart
120
- * @param mixed $customEnd
121
- * @param int $isFilter
122
- * @return Mage_Reports_Model_Mysql4_Order_Collection
123
- */
124
- protected function _prepareSummaryAggregated($range, $customStart, $customEnd)
125
- {
126
- $this->setMainTable('sales/order_aggregated_created');
127
- $this->getSelect()->columns(array(
128
- 'revenue' => 'SUM(main_table.total_revenue_amount)',
129
- 'quantity' => 'SUM(main_table.orders_count)',
130
- 'range' => $this->_getRangeExpressionForAttribute($range, 'main_table.period'),
131
- ))->order('range', 'asc')
132
- ->group('range');
133
-
134
- $this->getSelect()->where(
135
- $this->_getConditionSql('main_table.period', $this->getDateRange($range, $customStart, $customEnd))
136
- );
137
-
138
- $statuses = Mage::getSingleton('sales/config')
139
- ->getOrderStatusesForState(Mage_Sales_Model_Order::STATE_CANCELED);
140
-
141
- if (empty($statuses)) {
142
- $statuses = array(0);
143
- }
144
-
145
- $this->getSelect()->where('main_table.order_status NOT IN(?)', $statuses);
146
- return $this;
147
- }
148
-
149
- protected function _getRangeExpression($range)
150
- {
151
- // dont need of this offset bc we are format date in block
152
- //$timeZoneOffset = Mage::getModel('core/date')->getGmtOffset();
153
-
154
- switch ($range)
155
- {
156
- case '24h':
157
- $expression = 'DATE_FORMAT({{attribute}}, \'%Y-%m-%d %H:00\')';
158
-
159
- break;
160
- case '7d':
161
- case '1m':
162
- $expression = 'DATE_FORMAT({{attribute}}, \'%Y-%m-%d\')';
163
- break;
164
- case 'custom':
165
- $expression = 'DATE_FORMAT({{attribute}}, \'%Y-%m-%d\')';
166
- break;
167
- case '1y':
168
- case '2y':
169
- default:
170
- $expression = 'DATE_FORMAT({{attribute}}, \'%Y-%m\')';
171
- break;
172
- }
173
-
174
- return $expression;
175
- }
176
-
177
- /**
178
- * Retriev range exression adapteted for attribute
179
- *
180
- * @param string $range
181
- * @param unknown_type $attribute
182
- */
183
- protected function _getRangeExpressionForAttribute($range, $attribute)
184
- {
185
- $expression = $this->_getRangeExpression($range);
186
- return str_replace('{{attribute}}', $this->getConnection()->quoteIdentifier($attribute), $expression);
187
- }
188
-
189
- public function getDateRange($range, $customStart, $customEnd, $returnObjects = false)
190
- {
191
- $dateEnd = new Zend_Date(Mage::getModel('core/date')->gmtTimestamp());
192
- $dateStart = clone $dateEnd;
193
-
194
- // go to the end of a day
195
- $dateEnd->setHour(23);
196
- $dateEnd->setMinute(59);
197
- $dateEnd->setSecond(59);
198
-
199
- $dateStart->setHour(0);
200
- $dateStart->setMinute(0);
201
- $dateStart->setSecond(0);
202
-
203
- switch ($range)
204
- {
205
- case '24h':
206
- $dateEnd = new Zend_Date(Mage::getModel('core/date')->gmtTimestamp());
207
- $dateEnd->addHour(1);
208
- $dateStart = clone $dateEnd;
209
- $dateStart->subDay(1);
210
- break;
211
-
212
- case '7d':
213
- // substract 6 days we need to include
214
- // only today and not hte last one from range
215
- $dateStart->subDay(6);
216
- break;
217
-
218
- case '1m':
219
- $dateStart->setDay(Mage::getStoreConfig('reports/dashboard/mtd_start'));
220
- break;
221
-
222
- case 'custom':
223
- $dateStart = $customStart ? (new Zend_Date(strtotime($customStart))) : $dateEnd;
224
- $dateEnd = $customEnd ? (new Zend_Date(strtotime($customEnd))) : $dateEnd;
225
- break;
226
-
227
- case '1y':
228
- case '2y':
229
- $startMonthDay = explode(',', Mage::getStoreConfig('reports/dashboard/ytd_start'));
230
- $startMonth = isset($startMonthDay[0]) ? (int)$startMonthDay[0] : 1;
231
- $startDay = isset($startMonthDay[1]) ? (int)$startMonthDay[1] : 1;
232
- $dateStart->setMonth($startMonth);
233
- $dateStart->setDay($startDay);
234
- if ($range == '2y') {
235
- $dateStart->subYear(1);
236
- }
237
- break;
238
- }
239
-
240
- if ($returnObjects) {
241
- return array($dateStart, $dateEnd);
242
- } else {
243
- return array('from'=>$dateStart, 'to'=>$dateEnd, 'datetime'=>true);
244
- }
245
- }
246
-
247
- public function addItemCountExpr()
248
- {
249
- // $orderItemEntityTypeId = Mage::getResourceSingleton('sales/order_item')->getTypeId();
250
- // $this->getSelect()->join(
251
- // array('items'=>Mage::getResourceSingleton('sales/order_item')->getEntityTable()),
252
- // 'items.parent_id=e.entity_id and items.entity_type_id='.$orderItemEntityTypeId,
253
- // array('items_count'=>new Zend_Db_Expr('COUNT(items.entity_id)'))
254
- // )
255
- // ->group('e.entity_id');
256
- $this->getSelect()->columns(array('items_count'=>'total_item_count'), 'main_table');
257
- return $this;
258
- }
259
-
260
- /**
261
- * Calculate totals report
262
- *
263
- * @param int $isFilter
264
- * @return Mage_Reports_Model_Mysql4_Order_Collection
265
- */
266
- public function calculateTotals($isFilter = 0)
267
- {
268
- if ($this->isLive()) {
269
- $this->_calculateTotalsLive($isFilter);
270
- } else {
271
- $this->_calculateTotalsAggregated($isFilter);
272
- }
273
-
274
- return $this;
275
- }
276
-
277
- /**
278
- * Calculate totals live report
279
- *
280
- * @param int $isFilter
281
- * @return Mage_Reports_Model_Mysql4_Order_Collection
282
- */
283
- protected function _calculateTotalsLive($isFilter = 0)
284
- {
285
- $this->setMainTable('sales/order');
286
- $this->removeAllFieldsFromSelect();
287
-
288
- if ($isFilter == 0) {
289
- $this->getSelect()->columns(array(
290
- 'revenue' => 'SUM((main_table.base_subtotal-IFNULL(main_table.base_subtotal_refunded,0)-IFNULL(main_table.base_subtotal_canceled,0)-ABS(IFNULL(main_table.base_discount_amount,0))+IFNULL(main_table.base_discount_refunded,0))*main_table.base_to_global_rate)',
291
- 'tax' => 'SUM((main_table.base_tax_amount-IFNULL(main_table.base_tax_refunded,0)-IFNULL(main_table.base_tax_canceled,0))*main_table.base_to_global_rate)',
292
- 'shipping' => 'SUM((main_table.base_shipping_amount-IFNULL(main_table.base_shipping_refunded,0)-IFNULL(main_table.base_shipping_canceled,0))*main_table.base_to_global_rate)',
293
- ));
294
- } else {
295
- $this->getSelect()->columns(array(
296
- 'revenue' => 'SUM((main_table.base_subtotal-IFNULL(main_table.base_subtotal_refunded,0)-IFNULL(main_table.base_subtotal_canceled,0)-ABS(IFNULL(main_table.base_discount_amount,0))+IFNULL(main_table.base_discount_refunded,0)))',
297
- 'tax' => 'SUM((main_table.base_tax_amount-IFNULL(main_table.base_tax_refunded,0)-IFNULL(main_table.base_tax_canceled,0)))',
298
- 'shipping' => 'SUM((main_table.base_shipping_amount-IFNULL(main_table.base_shipping_refunded,0)-IFNULL(main_table.base_shipping_canceled,0)))',
299
- ));
300
- }
301
-
302
- $this->getSelect()->columns(array(
303
- 'quantity' => 'COUNT(main_table.entity_id)',
304
- ));
305
-
306
- $this->addFieldToFilter('state', array('neq' => Mage_Sales_Model_Order::STATE_CANCELED));
307
-
308
- return $this;
309
- }
310
-
311
- /**
312
- * Calculate totals agregated report
313
- *
314
- * @param int $isFilter
315
- * @return Mage_Reports_Model_Mysql4_Order_Collection
316
- */
317
- protected function _calculateTotalsAggregated($isFilter = 0)
318
- {
319
- $this->setMainTable('sales/order_aggregated_created');
320
- $this->removeAllFieldsFromSelect();
321
-
322
- $this->getSelect()->columns(array(
323
- 'revenue' => 'SUM(main_table.total_revenue_amount)',
324
- 'tax' => 'SUM(main_table.total_tax_amount_actual)',
325
- 'shipping' => 'SUM(main_table.total_shipping_amount_actual)',
326
- 'quantity' => 'SUM(orders_count)',
327
- ));
328
-
329
- $statuses = Mage::getSingleton('sales/config')
330
- ->getOrderStatusesForState(Mage_Sales_Model_Order::STATE_CANCELED);
331
-
332
- if (empty($statuses)) {
333
- $statuses = array(0);
334
- }
335
-
336
- $this->getSelect()->where('main_table.order_status NOT IN(?)', $statuses);
337
-
338
- return $this;
339
- }
340
-
341
- /**
342
- * Calculate lifitime sales
343
- *
344
- * @param int $isFilter
345
- * @return Mage_Reports_Model_Mysql4_Order_Collection
346
- */
347
- public function calculateSales($isFilter = 0)
348
- {
349
- $statuses = Mage::getSingleton('sales/config')
350
- ->getOrderStatusesForState(Mage_Sales_Model_Order::STATE_CANCELED);
351
-
352
- if (empty($statuses)) {
353
- $statuses = array(0);
354
- }
355
-
356
- if (Mage::getStoreConfig('sales/dashboard/use_aggregated_data')) {
357
- $this->setMainTable('sales/order_aggregated_created');
358
- $this->removeAllFieldsFromSelect();
359
-
360
- $this->getSelect()->columns(array(
361
- 'lifetime' => 'SUM(main_table.total_revenue_amount)',
362
- 'average' => "IF(SUM(main_table.orders_count) > 0, SUM(main_table.total_revenue_amount)/SUM(main_table.orders_count), 0)",
363
- 'day' => "(SELECT SUM(grand_total) FROM {$this->getMainTable()} WHERE DATE(created_at) = DATE(NOW()) AND status NOT IN ('".implode('\',\'', $statuses)."'))"
364
- ));
365
-
366
- if (!$isFilter) {
367
- $this->addFieldToFilter('store_id',
368
- array('eq' => Mage::app()->getStore(Mage_Core_Model_Store::ADMIN_CODE)->getId())
369
- );
370
- }
371
- $this->getSelect()->where('main_table.order_status NOT IN(?)', $statuses);
372
- } else {
373
- $this->setMainTable('sales/order');
374
- $this->removeAllFieldsFromSelect();
375
- $expr = 'IFNULL(main_table.base_subtotal, 0) - IFNULL(main_table.base_subtotal_refunded, 0)'
376
- . ' - IFNULL(main_table.base_subtotal_canceled, 0) - ABS(IFNULL(main_table.base_discount_amount, 0))'
377
- . ' + IFNULL(main_table.base_discount_refunded, 0)';
378
-
379
- $this->getSelect()->columns(array(
380
- 'lifetime' => "SUM({$expr})",
381
- 'average' => "AVG({$expr})",
382
- 'day' => "(SELECT SUM(grand_total) FROM {$this->getMainTable()} WHERE DATE(created_at) = DATE(NOW()) AND status NOT IN ('".implode('\',\'', $statuses)."'))"
383
- ));
384
- $this->getSelect()->where('main_table.status NOT IN(?)', $statuses)
385
- ->where('main_table.state NOT IN(?)', array(Mage_Sales_Model_Order::STATE_NEW, Mage_Sales_Model_Order::STATE_PENDING_PAYMENT));
386
- }
387
- return $this;
388
- }
389
-
390
- public function setDateRange($from, $to)
391
- {
392
- $this->_reset()
393
- ->addFieldToFilter('created_at', array('from' => $from, 'to' => $to))
394
- ->addFieldToFilter('state', array('neq' => Mage_Sales_Model_Order::STATE_CANCELED))
395
- ->getSelect()
396
- ->columns(array('orders'=>'COUNT(DISTINCT(main_table.entity_id))'))
397
- ->group('("*")');
398
-
399
- /**
400
- * getting qty count for each order
401
- */
402
-
403
- // $orderItem = Mage::getResourceSingleton('sales/order_item');
404
- // /* @var $orderItem Mage_Sales_Model_Entity_Quote */
405
- // $attr = $orderItem->getAttribute('parent_id');
406
- // /* @var $attr Mage_Eav_Model_Entity_Attribute_Abstract */
407
- // $attrId = $attr->getAttributeId();
408
- // $tableName = $attr->getBackend()->getTable();
409
- //
410
- // $this->getSelect()
411
- // ->joinLeft(array("order_items" => $tableName),
412
- // "order_items.parent_id = e.entity_id and order_items.entity_type_id=".$orderItem->getTypeId(), array());
413
- //
414
- // $attr = $orderItem->getAttribute('qty_ordered');
415
- // /* @var $attr Mage_Eav_Model_Entity_Attribute_Abstract */
416
- // $attrId = $attr->getAttributeId();
417
- // $tableName = $attr->getBackend()->getTable();
418
- // $fieldName = $attr->getBackend()->isStatic() ? 'qty_ordered' : 'value';
419
- //
420
- // $this->getSelect()
421
- // ->joinLeft(array("order_items2" => $tableName),
422
- // "order_items2.entity_id = `order_items`.entity_id and order_items2.attribute_id = {$attrId}", array())
423
- // ->columns(array("items" => "sum(order_items2.{$fieldName})"));
424
-
425
- $this->getSelect()->columns(array("items" => 'SUM(' . $this->getConnection()->quoteIdentifier('main_table.total_qty_ordered') . ')'));
426
-
427
- return $this;
428
- }
429
-
430
- /**
431
- * Set store filter collection
432
- * @param array $storeIds
433
- * @return Mage_Reports_Model_Mysql4_Order_Collection
434
- */
435
- public function setStoreIds($storeIds)
436
- {
437
- if ($storeIds) {
438
- $this->getSelect()->columns(array(
439
- 'subtotal' => 'SUM(main_table.base_subtotal)',
440
- 'tax' => 'SUM(main_table.base_tax_amount)',
441
- 'shipping' => 'SUM(main_table.base_shipping_amount)',
442
- 'discount' => 'SUM(main_table.base_discount_amount)',
443
- 'total' => 'SUM(main_table.base_grand_total)',
444
- 'invoiced' => 'SUM(main_table.base_total_paid)',
445
- 'refunded' => 'SUM(main_table.base_total_refunded)',
446
- 'profit' => 'SUM(IFNULL(main_table.base_subtotal_invoiced, 0)) + SUM(IFNULL(main_table.base_discount_refunded, 0)) - SUM(IFNULL(main_table.base_subtotal_refunded, 0)) - SUM(IFNULL(main_table.base_discount_invoiced, 0)) - SUM(IFNULL(main_table.base_total_invoiced_cost, 0))',
447
- ));
448
- } else {
449
- $this->getSelect()->columns(array(
450
- 'subtotal' => 'SUM(main_table.base_subtotal * main_table.base_to_global_rate)',
451
- 'tax' => 'SUM(main_table.base_tax_amount * main_table.base_to_global_rate)',
452
- 'shipping' => 'SUM(main_table.base_shipping_amount * main_table.base_to_global_rate)',
453
- 'discount' => 'SUM(main_table.base_discount_amount * main_table.base_to_global_rate)',
454
- 'total' => 'SUM(main_table.base_grand_total * main_table.base_to_global_rate)',
455
- 'invoiced' => 'SUM(main_table.base_total_paid * main_table.base_to_global_rate)',
456
- 'refunded' => 'SUM(main_table.base_total_refunded * main_table.base_to_global_rate)',
457
- 'profit' => 'SUM(IFNULL(main_table.base_subtotal_invoiced, 0)* main_table.base_to_global_rate) + SUM(IFNULL(main_table.base_discount_refunded, 0)* main_table.base_to_global_rate) - SUM(IFNULL(main_table.base_subtotal_refunded, 0)* main_table.base_to_global_rate) - SUM(IFNULL(main_table.base_discount_invoiced, 0)* main_table.base_to_global_rate) - SUM(IFNULL(main_table.base_total_invoiced_cost, 0)* main_table.base_to_global_rate)',
458
- ));
459
- }
460
-
461
- return $this;
462
- }
463
-
464
- /**
465
- * Add group By customer attribute
466
- *
467
- * @return Mage_Reports_Model_Mysql4_Order_Collection
468
- */
469
- public function groupByCustomer()
470
- {
471
- $this->getSelect()->group('main_table.customer_id');
472
-
473
- return $this;
474
- }
475
-
476
- /**
477
- * Join Customer Name (concat)
478
- *
479
- * @return Mage_Reports_Model_Mysql4_Order_Collection
480
- */
481
- public function joinCustomerName($alias = 'name')
482
- {
483
- $this->getSelect()->columns(array($alias => 'CONCAT(main_table.customer_firstname," ", main_table.customer_lastname)'));
484
- return $this;
485
- }
486
-
487
- /**
488
- * Add Order count field to select
489
- *
490
- * @return Mage_Reports_Model_Mysql4_Order_Collection
491
- */
492
- public function addOrdersCount()
493
- {
494
- $this->addFieldToFilter('state', array('neq' => Mage_Sales_Model_Order::STATE_CANCELED));
495
- $this->getSelect()
496
- ->columns(array("orders_count" => "COUNT(main_table.entity_id)"));
497
-
498
- return $this;
499
- }
500
-
501
- /**
502
- * Add revenue
503
- *
504
- * @param boolean $convertCurrency
505
- * @return Mage_Reports_Model_Mysql4_Order_Collection
506
- */
507
- public function addRevenueToSelect($convertCurrency = false)
508
- {
509
- if ($convertCurrency) {
510
- $this->getSelect()->columns(array(
511
- 'revenue' => '(main_table.base_grand_total * main_table.base_to_global_rate)'
512
- ));
513
- } else {
514
- $this->getSelect()->columns(array(
515
- 'revenue' => 'base_grand_total'
516
- ));
517
- }
518
-
519
- return $this;
520
- }
521
-
522
- /**
523
- * Add summary average totals
524
- *
525
- * @param int $storeId
526
- * @return Mage_Reports_Model_Mysql4_Order_Collection
527
- */
528
- public function addSumAvgTotals($storeId = 0)
529
- {
530
- /**
531
- * calculate average and total amount
532
- */
533
- $expr = ($storeId == 0)
534
- ? '(main_table.base_subtotal
535
- - IFNULL(main_table.base_subtotal_refunded, 0)
536
- - IFNULL(main_table.base_subtotal_canceled, 0)
537
- - ABS(main_table.base_discount_amount)
538
- - IFNULL(main_table.base_discount_canceled, 0)
539
- ) * main_table.base_to_global_rate'
540
- : 'main_table.base_subtotal
541
- - IFNULL(main_table.base_subtotal_canceled, 0)
542
- - IFNULL(main_table.base_subtotal_refunded, 0)
543
- - ABS(main_table.base_discount_amount)
544
- - IFNULL(main_table.base_discount_canceled, 0)';
545
-
546
- $this->getSelect()
547
- ->columns(array("orders_avg_amount" => "AVG({$expr})"))
548
- ->columns(array("orders_sum_amount" => "SUM({$expr})"));
549
-
550
- return $this;
551
- }
552
-
553
- /**
554
- * Sort order by total amount
555
- *
556
- * @param string $dir
557
- * @return Mage_Reports_Model_Mysql4_Order_Collection
558
- */
559
- public function orderByTotalAmount($dir = 'desc')
560
- {
561
- $this->getSelect()
562
- ->order("orders_sum_amount {$dir}");
563
- return $this;
564
- }
565
-
566
- public function orderByOrdersCount($dir = 'desc')
567
- {
568
- $this->getSelect()
569
- ->order("orders_count {$dir}");
570
- return $this;
571
- }
572
-
573
- public function orderByCustomerRegistration($dir = 'desc')
574
- {
575
- $this->setOrder('customer_id', $dir);
576
- return $this;
577
- }
578
-
579
- /**
580
- * Sort order by order created_at date
581
- * @param string $dir
582
- */
583
- public function orderByCreatedAt($dir = 'desc')
584
- {
585
- $this->setOrder('created_at', $dir);
586
- return $this;
587
- }
588
-
589
- public function getSelectCountSql()
590
- {
591
- $countSelect = clone $this->getSelect();
592
- $countSelect->reset(Zend_Db_Select::ORDER);
593
- $countSelect->reset(Zend_Db_Select::LIMIT_COUNT);
594
- $countSelect->reset(Zend_Db_Select::LIMIT_OFFSET);
595
- $countSelect->reset(Zend_Db_Select::COLUMNS);
596
- $countSelect->reset(Zend_Db_Select::GROUP);
597
- $countSelect->reset(Zend_Db_Select::HAVING);
598
- $countSelect->columns("count(DISTINCT main_table.entity_id)");
599
-
600
- $sql = $countSelect->__toString();
601
-
602
- return $sql;
603
- }
604
-
605
- /**
606
- * Initialize initial fields to select
607
- *
608
- * @return Mage_Reports_Model_Mysql4_Order_Collection
609
- */
610
- protected function _initInitialFieldsToSelect()
611
- {
612
- // No fields should be initialized
613
- return $this;
614
- }
615
-
616
- /**
617
- * Add period filter by created_at attribute
618
- *
619
- * @param string $period
620
- * @return Mage_Reports_Model_Mysql4_Order_Collection
621
- */
622
- public function addCreateAtPeriodFilter($period)
623
- {
624
- $_from = Mage::app()->getRequest()->getParam('from', 0);
625
- $_to = Mage::app()->getRequest()->getParam('to', 0);
626
- list($from, $to) = $this->getDateRange($period, $_from, $_to, true);
627
-
628
- $this->checkIsLive($period);
629
-
630
- if ($this->isLive()) {
631
- $fieldToFilter = 'created_at';
632
- } else {
633
- $fieldToFilter = 'period';
634
- }
635
-
636
- $this->addFieldToFilter($fieldToFilter, array(
637
- 'from' => $from->toString(Varien_Date::DATETIME_INTERNAL_FORMAT),
638
- 'to' => $to->toString(Varien_Date::DATETIME_INTERNAL_FORMAT)
639
- ));
640
-
641
- return $this;
642
- }
643
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/Dashboard/controllers/DashboardController.php DELETED
@@ -1,69 +0,0 @@
1
- <?php
2
-
3
- class Belvg_Dashboard_DashboardController extends Mage_Adminhtml_Controller_Action
4
- {
5
- public function indexAction()
6
- {
7
- $this->_title($this->__('Dashboard'));
8
-
9
- $this->loadLayout();
10
- $this->_setActiveMenu('dashboard');
11
- $this->_addBreadcrumb(Mage::helper('adminhtml')->__('Dashboard'), Mage::helper('adminhtml')->__('Dashboard'));
12
- $this->renderLayout();
13
- }
14
-
15
- public function productsViewedAction()
16
- {
17
- $this->getResponse()->setBody($this->getLayout()->createBlock('adminhtml/dashboard_tab_products_viewed')->toHtml());
18
- }
19
-
20
- public function customersNewestAction()
21
- {
22
- $this->getResponse()->setBody($this->getLayout()->createBlock('adminhtml/dashboard_tab_customers_newest')->toHtml());
23
- }
24
-
25
- public function customersMostAction()
26
- {
27
- $this->getResponse()->setBody($this->getLayout()->createBlock('adminhtml/dashboard_tab_customers_most')->toHtml());
28
- }
29
-
30
- public function ajaxBlockAction()
31
- {
32
- $output = '';
33
- $blockTab = $this->getRequest()->getParam('block');
34
- if (in_array($blockTab, array('tab_orders', 'tab_amounts', 'totals'))) {
35
- $output = $this->getLayout()->createBlock('adminhtml/dashboard_' . $blockTab)->toHtml();
36
- }
37
- $this->getResponse()->setBody($output);
38
- return;
39
- }
40
-
41
- public function tunnelAction()
42
- {
43
- $httpClient = new Varien_Http_Client();
44
- $gaData = $this->getRequest()->getParam('ga');
45
- $gaHash = $this->getRequest()->getParam('h');
46
- if ($gaData && $gaHash) {
47
- $newHash = Mage::helper('adminhtml/dashboard_data')->getChartDataHash($gaData);
48
- if ($newHash == $gaHash) {
49
- if ($params = unserialize(base64_decode(urldecode($gaData)))) {
50
- $response = $httpClient->setUri(Mage_Adminhtml_Block_Dashboard_Graph::API_URL)
51
- ->setParameterGet($params)
52
- ->setConfig(array('timeout' => 5))
53
- ->request('GET');
54
-
55
- $headers = $response->getHeaders();
56
-
57
- $this->getResponse()
58
- ->setHeader('Content-type', $headers['Content-type'])
59
- ->setBody($response->getBody());
60
- }
61
- }
62
- }
63
- }
64
-
65
- protected function _isAllowed()
66
- {
67
- return Mage::getSingleton('admin/session')->isAllowed('dashboard');
68
- }
69
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/Dashboard/etc/adminhtml.xml DELETED
@@ -1,63 +0,0 @@
1
- <?xml version="1.0"?>
2
- <!--
3
- /**
4
- * BelVG LLC.
5
- *
6
- * NOTICE OF LICENSE
7
- *
8
- * This source file is subject to the EULA
9
- * that is bundled with this package in the file LICENSE.txt.
10
- * It is also available through the world-wide-web at this URL:
11
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
12
- *
13
- /***************************************
14
- * MAGENTO EDITION USAGE NOTICE *
15
- *****************************************/
16
- /* This package designed for Magento COMMUNITY edition
17
- * BelVG does not guarantee correct work of this extension
18
- * on any other Magento edition except Magento COMMUNITY edition.
19
- * BelVG does not provide extension support in case of
20
- * incorrect edition usage.
21
- /***************************************
22
- * DISCLAIMER *
23
- *****************************************/
24
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
25
- * versions in the future.
26
- *****************************************************
27
- * @category Belvg
28
- * @package Belvg_Dashboard
29
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
30
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
31
- */
32
- -->
33
- <config>
34
- <acl>
35
- <resources>
36
- <all>
37
- <title>Allow Everything</title>
38
- </all>
39
- <admin>
40
- <children>
41
- <system>
42
- <children>
43
- <config>
44
- <children>
45
- <dashboard translate="title">
46
- <title>Advanced Dashboard</title>
47
- </dashboard>
48
- </children>
49
- </config>
50
- </children>
51
- </system>
52
- </children>
53
- </admin>
54
- </resources>
55
- </acl>
56
- <layout>
57
- <updates>
58
- <dashboard>
59
- <file>adv_dashboard.xml</file>
60
- </dashboard>
61
- </updates>
62
- </layout>
63
- </config>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/Dashboard/etc/config.xml DELETED
@@ -1,81 +0,0 @@
1
- <?xml version="1.0"?>
2
- <!--
3
- /**
4
- * BelVG LLC.
5
- *
6
- * NOTICE OF LICENSE
7
- *
8
- * This source file is subject to the EULA
9
- * that is bundled with this package in the file LICENSE.txt.
10
- * It is also available through the world-wide-web at this URL:
11
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
12
- *
13
- /***************************************
14
- * MAGENTO EDITION USAGE NOTICE *
15
- *****************************************/
16
- /* This package designed for Magento COMMUNITY edition
17
- * BelVG does not guarantee correct work of this extension
18
- * on any other Magento edition except Magento COMMUNITY edition.
19
- * BelVG does not provide extension support in case of
20
- * incorrect edition usage.
21
- /***************************************
22
- * DISCLAIMER *
23
- *****************************************/
24
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
25
- * versions in the future.
26
- *****************************************************
27
- * @category Belvg
28
- * @package Belvg_Dashboard
29
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
30
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
31
- */
32
- -->
33
- <config>
34
- <modules>
35
- <Belvg_Dashboard>
36
- <version>1.0.1</version>
37
- </Belvg_Dashboard>
38
- </modules>
39
- <global>
40
- <helpers>
41
- <dashboard>
42
- <class>Belvg_Dashboard_Helper</class>
43
- </dashboard>
44
- <adminhtml>
45
- <rewrite>
46
- <dashboard_order>Belvg_Dashboard_Helper_Dashboard_Order</dashboard_order>
47
- </rewrite>
48
- </adminhtml>
49
- </helpers>
50
- <blocks>
51
- <adminhtml>
52
- <rewrite>
53
- <dashboard>Belvg_Dashboard_Block_Adminhtml_Dashboard</dashboard>
54
- <dashboard_orders_grid>Belvg_Dashboard_Block_Adminhtml_Dashboard_Orders_Grid</dashboard_orders_grid>
55
- <dashboard_graph>Belvg_Dashboard_Block_Adminhtml_Dashboard_Graph</dashboard_graph>
56
- <dashboard_totals>Belvg_Dashboard_Block_Adminhtml_Dashboard_Totals</dashboard_totals>
57
- <dashboard_diagrams>Belvg_Dashboard_Block_Adminhtml_Dashboard_Diagrams</dashboard_diagrams>
58
- <dashboard_sales>Belvg_Dashboard_Block_Adminhtml_Dashboard_Sales</dashboard_sales>
59
- <dashboard_tab_orders>Belvg_Dashboard_Block_Adminhtml_Dashboard_Tab_Orders</dashboard_tab_orders>
60
- <dashboard_tab_amounts>Belvg_Dashboard_Block_Adminhtml_Dashboard_Tab_Amounts</dashboard_tab_amounts>
61
- </rewrite>
62
- </adminhtml>
63
- </blocks>
64
- <models>
65
- <reports_mysql4>
66
- <rewrite>
67
- <order_collection>Belvg_Dashboard_Model_Mysql4_Order_Collection</order_collection>
68
- </rewrite>
69
- </reports_mysql4>
70
- </models>
71
- </global>
72
- <default>
73
- <dashboard>
74
- <settings>
75
- <enabled>0</enabled>
76
- <orders><![CDATA[1,5,10,15,20]]></orders>
77
- </settings>
78
- </dashboard>
79
- </default>
80
- </config>
81
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/Dashboard/etc/system.xml DELETED
@@ -1,85 +0,0 @@
1
- <?xml version="1.0"?>
2
- <!--
3
- /**
4
- * BelVG LLC.
5
- *
6
- * NOTICE OF LICENSE
7
- *
8
- * This source file is subject to the EULA
9
- * that is bundled with this package in the file LICENSE.txt.
10
- * It is also available through the world-wide-web at this URL:
11
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
12
- *
13
- /***************************************
14
- * MAGENTO EDITION USAGE NOTICE *
15
- *****************************************/
16
- /* This package designed for Magento COMMUNITY edition
17
- * BelVG does not guarantee correct work of this extension
18
- * on any other Magento edition except Magento COMMUNITY edition.
19
- * BelVG does not provide extension support in case of
20
- * incorrect edition usage.
21
- /***************************************
22
- * DISCLAIMER *
23
- *****************************************/
24
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
25
- * versions in the future.
26
- *****************************************************
27
- * @category Belvg
28
- * @package Belvg_Dashboard
29
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
30
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
31
- */
32
- -->
33
- <config>
34
- <sections>
35
- <dashboard translate="label">
36
- <label>Advanced Dashboard</label>
37
- <tab>belvg</tab>
38
- <frontend_type>text</frontend_type>
39
- <sort_order>1000</sort_order>
40
- <show_in_default>1</show_in_default>
41
- <show_in_website>1</show_in_website>
42
- <show_in_store>1</show_in_store>
43
- <groups>
44
- <settings translate="label">
45
- <label>Settings</label>
46
- <frontend_type>text</frontend_type>
47
- <sort_order>100</sort_order>
48
- <show_in_default>1</show_in_default>
49
- <show_in_website>1</show_in_website>
50
- <show_in_store>1</show_in_store>
51
- <comment>
52
- <![CDATA[
53
- <div style="padding:10px;background-color:#fff;border:1px solid #ddd;margin-bottom:7px;">
54
- This module was developed by <a href="http://www.belvg.com" target="_blank">www.BelVG.com</a>.
55
- For docs & examples refer to the BelVG <a href="http://www.belvg.com" target="_blank">web site</a>.
56
- <br/>We have the largest selections of <a href="http://store.belvg.com/extensions.html" target="_blank">extensions</a> and <a href="http://store.belvg.com/themes.html" target="_blank">themes</a> on Magento.
57
- </div>
58
- ]]>
59
- </comment>
60
- <fields>
61
- <enabled translate="label comment">
62
- <label>Enabled</label>
63
- <!-- <comment><![CDATA[]]></comment> -->
64
- <frontend_type>select</frontend_type>
65
- <source_model>adminhtml/system_config_source_enabledisable</source_model>
66
- <sort_order>10</sort_order>
67
- <show_in_default>1</show_in_default>
68
- <show_in_website>1</show_in_website>
69
- <show_in_store>1</show_in_store>
70
- </enabled>
71
- <orders translate="label comment">
72
- <label>Orders on Dashboard Grid</label>
73
- <comment><![CDATA[Comma-separated.]]></comment>
74
- <frontend_type>text</frontend_type>
75
- <sort_order>11</sort_order>
76
- <show_in_default>1</show_in_default>
77
- <show_in_website>1</show_in_website>
78
- <show_in_store>1</show_in_store>
79
- </orders>
80
- </fields>
81
- </settings>
82
- </groups>
83
- </dashboard>
84
- </sections>
85
- </config>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/FacebookAll/Block/Active.php DELETED
@@ -1,85 +0,0 @@
1
- <?php
2
- /**
3
- * BelVG LLC.
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the EULA
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
11
- *
12
- /***************************************
13
- * MAGENTO EDITION USAGE NOTICE *
14
- *****************************************/
15
- /* This package designed for Magento COMMUNITY edition
16
- * BelVG does not guarantee correct work of this extension
17
- * on any other Magento edition except Magento COMMUNITY edition.
18
- * BelVG does not provide extension support in case of
19
- * incorrect edition usage.
20
- /***************************************
21
- * DISCLAIMER *
22
- *****************************************/
23
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
24
- * versions in the future.
25
- *****************************************************
26
- * @category Belvg
27
- * @package Belvg_FacebookAll
28
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
29
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
30
- */
31
-
32
- class Belvg_FacebookAll_Block_Active extends Mage_Core_Block_Template {
33
-
34
- public function getAppId()
35
- {
36
- return Mage::getStoreConfig('facebookall/settings/appid');
37
- }
38
-
39
- public function getSecretKey()
40
- {
41
- return Mage::getStoreConfig('facebookall/settings/secret');
42
- }
43
-
44
- public function isActiveLike()
45
- {
46
- return Mage::getStoreConfig('facebookall/like/enabled');
47
- }
48
-
49
- public function isFacesLikeActive()
50
- {
51
- return Mage::getStoreConfig('facebookall/like/faces')?'true':'false';
52
- }
53
-
54
- public function getLikeWidth()
55
- {
56
- return Mage::getStoreConfig('facebookall/like/width');
57
- }
58
-
59
- public function getLikeColor()
60
- {
61
- return Mage::getStoreConfig('facebookall/like/color');
62
- }
63
-
64
- public function getLikeLayout()
65
- {
66
- return Mage::getStoreConfig('facebookall/like/layout');
67
- }
68
-
69
- public function checkFbUser()
70
- {
71
- $user_id = Mage::getSingleton('customer/session')->getCustomer()->getId();
72
- $uid = 0;
73
- $db_read = Mage::getSingleton('core/resource')->getConnection('facebookall_read');
74
- $tablePrefix = (string)Mage::getConfig()->getTablePrefix();
75
- $sql = 'SELECT `fb_id`
76
- FROM `'.$tablePrefix.'belvg_facebook_customer`
77
- WHERE `customer_id` = '.$user_id.'
78
- LIMIT 1';
79
- $data = $db_read->fetchRow($sql);
80
- if (count($data)) {
81
- $uid = $data['fb_id'];
82
- }
83
- return $uid;
84
- }
85
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/FacebookAll/Block/Links.php DELETED
@@ -1,52 +0,0 @@
1
- <?php
2
- /**
3
- * BelVG LLC.
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the EULA
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
11
- *
12
- /***************************************
13
- * MAGENTO EDITION USAGE NOTICE *
14
- *****************************************/
15
- /* This package designed for Magento COMMUNITY edition
16
- * BelVG does not guarantee correct work of this extension
17
- * on any other Magento edition except Magento COMMUNITY edition.
18
- * BelVG does not provide extension support in case of
19
- * incorrect edition usage.
20
- /***************************************
21
- * DISCLAIMER *
22
- *****************************************/
23
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
24
- * versions in the future.
25
- *****************************************************
26
- * @category Belvg
27
- * @package Belvg_FacebookAll
28
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
29
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
30
- */
31
-
32
- class Belvg_FacebookAll_Block_Links extends Mage_Core_Block_Template
33
- {
34
-
35
- public function addFbLink() {
36
- if ($parentBlock = $this->getParentBlock()) {
37
- $count = $this->helper('checkout/cart')->getSummaryCount();
38
-
39
- if ($count == 1) {
40
- $text = $this->__('My Cart (%s item)', $count);
41
- } elseif ($count > 0) {
42
- $text = $this->__('My Cart (%s items)', $count);
43
- } else {
44
- $text = $this->__('My Cart');
45
- }
46
-
47
- //$parentBlock->addLink($text, 'checkout/cart', $text, true, array(), 90, null, 'class="top-link-cart"');
48
- }
49
- return $this;
50
- }
51
-
52
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/FacebookAll/Helper/Active.php DELETED
@@ -1,153 +0,0 @@
1
- <?php
2
- /**
3
- * BelVG LLC.
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the EULA
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
11
- *
12
- /***************************************
13
- * MAGENTO EDITION USAGE NOTICE *
14
- *****************************************/
15
- /* This package designed for Magento COMMUNITY edition
16
- * BelVG does not guarantee correct work of this extension
17
- * on any other Magento edition except Magento COMMUNITY edition.
18
- * BelVG does not provide extension support in case of
19
- * incorrect edition usage.
20
- /***************************************
21
- * DISCLAIMER *
22
- *****************************************/
23
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
24
- * versions in the future.
25
- *****************************************************
26
- * @category Belvg
27
- * @package Belvg_FacebookAll
28
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
29
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
30
- */
31
-
32
- class Belvg_FacebookAll_Helper_Active extends Mage_Core_Helper_Abstract
33
- {
34
- public function getAppId()
35
- {
36
- return Mage::getStoreConfig('facebookall/settings/appid');
37
- }
38
-
39
- public function getSecretKey()
40
- {
41
- return Mage::getStoreConfig('facebookall/settings/secret');
42
- }
43
-
44
- public function isActiveLike()
45
- {
46
- return Mage::getStoreConfig('facebookall/like/enabled');
47
- }
48
-
49
- public function isActiveComments()
50
- {
51
- return Mage::getStoreConfig('facebookall/comments/enabled');
52
- }
53
-
54
- public function isActiveActivity()
55
- {
56
- return Mage::getStoreConfig('facebookall/activity/enabled');
57
- }
58
-
59
- public function getActivityWidth()
60
- {
61
- return Mage::getStoreConfig('facebookall/activity/width');
62
- }
63
-
64
- public function getActivityHeight()
65
- {
66
- return Mage::getStoreConfig('facebookall/activity/height');
67
- }
68
-
69
- public function getActivityHeader()
70
- {
71
- return Mage::getStoreConfig('facebookall/activity/header')?'true':'false';
72
- }
73
-
74
- public function getActivityColor()
75
- {
76
- return Mage::getStoreConfig('facebookall/activity/color');
77
- }
78
-
79
- public function getActivityFont()
80
- {
81
- return Mage::getStoreConfig('facebookall/activity/font');
82
- }
83
-
84
- public function getActivityRecommendations()
85
- {
86
- return Mage::getStoreConfig('facebookall/activity/recommendations')?'true':'false';
87
- }
88
-
89
- public function getActivityMaxage()
90
- {
91
- return Mage::getStoreConfig('facebookall/activity/maxage');
92
- }
93
-
94
- public function isFacesLikeActive()
95
- {
96
- return Mage::getStoreConfig('facebookall/like/faces')?'true':'false';
97
- }
98
-
99
- public function getLikeWidth()
100
- {
101
- return Mage::getStoreConfig('facebookall/like/width');
102
- }
103
-
104
- public function getLikeColor()
105
- {
106
- return Mage::getStoreConfig('facebookall/like/color');
107
- }
108
-
109
- public function getLikeLayout()
110
- {
111
- return Mage::getStoreConfig('facebookall/like/layout');
112
- }
113
-
114
- public function getProducts($order)
115
- {
116
- $db_read = Mage::getSingleton('core/resource')->getConnection('facebookall_read');
117
- $tablePrefix = (string)Mage::getConfig()->getTablePrefix();
118
-
119
- $sql = 'SELECT `product_id` FROM `'.$tablePrefix.'sales_flat_order_item` as i
120
- LEFT JOIN `'.$tablePrefix.'sales_flat_order` as o ON o.`increment_id` = "'.$order.'"
121
- WHERE i.`order_id` = o.`entity_id` AND i.`parent_item_id` IS NULL';
122
- $data = $db_read->fetchAll($sql);
123
- return $data;
124
- }
125
-
126
- public function getLoginImg()
127
- {
128
- $img = Mage::getStoreConfig('facebookall/settings/imglogin');
129
- if (empty($img)) {
130
- $img = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN).
131
- 'frontend/default/default/images/belvg/fb.gif';
132
- } else {
133
- $img = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).
134
- 'facebookall/'.$img;
135
- }
136
- return $img;
137
- }
138
-
139
- public function isActiveShare()
140
- {
141
- return Mage::getStoreConfig('facebookall/share/enabled');
142
- }
143
-
144
- public function getShareColor()
145
- {
146
- return Mage::getStoreConfig('facebookall/share/color');
147
- }
148
-
149
- public function getShareFont()
150
- {
151
- return Mage::getStoreConfig('facebookall/share/font');
152
- }
153
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/FacebookAll/Helper/Data.php DELETED
@@ -1,35 +0,0 @@
1
- <?php
2
- /**
3
- * BelVG LLC.
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the EULA
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
11
- *
12
- /***************************************
13
- * MAGENTO EDITION USAGE NOTICE *
14
- *****************************************/
15
- /* This package designed for Magento COMMUNITY edition
16
- * BelVG does not guarantee correct work of this extension
17
- * on any other Magento edition except Magento COMMUNITY edition.
18
- * BelVG does not provide extension support in case of
19
- * incorrect edition usage.
20
- /***************************************
21
- * DISCLAIMER *
22
- *****************************************/
23
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
24
- * versions in the future.
25
- *****************************************************
26
- * @category Belvg
27
- * @package Belvg_FacebookAll
28
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
29
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
30
- */
31
-
32
- class Belvg_FacebookAll_Helper_Data extends Mage_Core_Helper_Abstract
33
- {
34
-
35
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/FacebookAll/Model/FacebookAll.php DELETED
@@ -1,39 +0,0 @@
1
- <?php
2
- /**
3
- * BelVG LLC.
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the EULA
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
11
- *
12
- /***************************************
13
- * MAGENTO EDITION USAGE NOTICE *
14
- *****************************************/
15
- /* This package designed for Magento COMMUNITY edition
16
- * BelVG does not guarantee correct work of this extension
17
- * on any other Magento edition except Magento COMMUNITY edition.
18
- * BelVG does not provide extension support in case of
19
- * incorrect edition usage.
20
- /***************************************
21
- * DISCLAIMER *
22
- *****************************************/
23
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
24
- * versions in the future.
25
- *****************************************************
26
- * @category Belvg
27
- * @package Belvg_FacebookAll
28
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
29
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
30
- */
31
-
32
- class Belvg_FacebookAll_Model_FacebookConnect extends Mage_Core_Model_Abstract
33
- {
34
- public function _construct()
35
- {
36
- parent::_construct();
37
- $this->_init('facebookall/facebookall');
38
- }
39
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/FacebookAll/Model/Mysql4/Setup.php DELETED
@@ -1,34 +0,0 @@
1
- <?php
2
- /**
3
- * BelVG LLC.
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the EULA
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
11
- *
12
- /***************************************
13
- * MAGENTO EDITION USAGE NOTICE *
14
- *****************************************/
15
- /* This package designed for Magento COMMUNITY edition
16
- * BelVG does not guarantee correct work of this extension
17
- * on any other Magento edition except Magento COMMUNITY edition.
18
- * BelVG does not provide extension support in case of
19
- * incorrect edition usage.
20
- /***************************************
21
- * DISCLAIMER *
22
- *****************************************/
23
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
24
- * versions in the future.
25
- *****************************************************
26
- * @category Belvg
27
- * @package Belvg_FacebookAll
28
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
29
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
30
- */
31
-
32
- class Belvg_FacebookAll_Mysql4_Setup extends Mage_Eav_Model_Entity_Setup
33
- {
34
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/FacebookAll/Model/System/Config/Source/Color.php DELETED
@@ -1,42 +0,0 @@
1
- <?php
2
- /**
3
- * BelVG LLC.
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the EULA
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
11
- *
12
- /***************************************
13
- * MAGENTO EDITION USAGE NOTICE *
14
- *****************************************/
15
- /* This package designed for Magento COMMUNITY edition
16
- * BelVG does not guarantee correct work of this extension
17
- * on any other Magento edition except Magento COMMUNITY edition.
18
- * BelVG does not provide extension support in case of
19
- * incorrect edition usage.
20
- /***************************************
21
- * DISCLAIMER *
22
- *****************************************/
23
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
24
- * versions in the future.
25
- *****************************************************
26
- * @category Belvg
27
- * @package Belvg_FacebookAll
28
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
29
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
30
- */
31
-
32
- class Belvg_FacebookAll_Model_System_Config_Source_Color
33
- {
34
- public function toOptionArray()
35
- {
36
- return array(
37
- //array('value'=>'', 'label'=>''),
38
- array('value'=>'light', 'label'=>Mage::helper('facebookall')->__('Light')),
39
- array('value'=>'dark', 'label'=>Mage::helper('facebookall')->__('Dark')),
40
- );
41
- }
42
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/FacebookAll/Model/System/Config/Source/Font.php DELETED
@@ -1,46 +0,0 @@
1
- <?php
2
- /**
3
- * BelVG LLC.
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the EULA
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
11
- *
12
- /***************************************
13
- * MAGENTO EDITION USAGE NOTICE *
14
- *****************************************/
15
- /* This package designed for Magento COMMUNITY edition
16
- * BelVG does not guarantee correct work of this extension
17
- * on any other Magento edition except Magento COMMUNITY edition.
18
- * BelVG does not provide extension support in case of
19
- * incorrect edition usage.
20
- /***************************************
21
- * DISCLAIMER *
22
- *****************************************/
23
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
24
- * versions in the future.
25
- *****************************************************
26
- * @category Belvg
27
- * @package Belvg_FacebookAll
28
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
29
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
30
- */
31
-
32
- class Belvg_FacebookAll_Model_System_Config_Source_Font
33
- {
34
- public function toOptionArray()
35
- {
36
- return array(
37
- //array('value'=>'', 'label'=>''),
38
- array('value'=>'arial', 'label'=>Mage::helper('facebookall')->__('Arial')),
39
- array('value'=>'lucida grande', 'label'=>Mage::helper('facebookall')->__('Lucida Grande')),
40
- array('value'=>'segoe ui', 'label'=>Mage::helper('facebookall')->__('Segoe Ui')),
41
- array('value'=>'tahoma', 'label'=>Mage::helper('facebookall')->__('Tahoma')),
42
- array('value'=>'trebuchet ms', 'label'=>Mage::helper('facebookall')->__('Trebuchet MS')),
43
- array('value'=>'verdana', 'label'=>Mage::helper('facebookall')->__('Verdana')),
44
- );
45
- }
46
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/FacebookAll/Model/System/Config/Source/Layout.php DELETED
@@ -1,43 +0,0 @@
1
- <?php
2
- /**
3
- * BelVG LLC.
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the EULA
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
11
- *
12
- /***************************************
13
- * MAGENTO EDITION USAGE NOTICE *
14
- *****************************************/
15
- /* This package designed for Magento COMMUNITY edition
16
- * BelVG does not guarantee correct work of this extension
17
- * on any other Magento edition except Magento COMMUNITY edition.
18
- * BelVG does not provide extension support in case of
19
- * incorrect edition usage.
20
- /***************************************
21
- * DISCLAIMER *
22
- *****************************************/
23
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
24
- * versions in the future.
25
- *****************************************************
26
- * @category Belvg
27
- * @package Belvg_FacebookConnect
28
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
29
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
30
- */
31
-
32
- class Belvg_FacebookAll_Model_System_Config_Source_Layout
33
- {
34
- public function toOptionArray()
35
- {
36
- return array(
37
- //array('value'=>'', 'label'=>''),
38
- array('value'=>'standart', 'label'=>Mage::helper('facebookall')->__('Standart')),
39
- array('value'=>'button_count', 'label'=>Mage::helper('facebookall')->__('Button Count')),
40
- array('value'=>'box_count', 'label'=>Mage::helper('facebookall')->__('Box Count')),
41
- );
42
- }
43
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/FacebookAll/controllers/CustomerController.php DELETED
@@ -1,135 +0,0 @@
1
- <?php
2
- /**
3
- * BelVG LLC.
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the EULA
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
11
- *
12
- /***************************************
13
- * MAGENTO EDITION USAGE NOTICE *
14
- *****************************************/
15
- /* This package designed for Magento COMMUNITY edition
16
- * BelVG does not guarantee correct work of this extension
17
- * on any other Magento edition except Magento COMMUNITY edition.
18
- * BelVG does not provide extension support in case of
19
- * incorrect edition usage.
20
- /***************************************
21
- * DISCLAIMER *
22
- *****************************************/
23
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
24
- * versions in the future.
25
- *****************************************************
26
- * @category Belvg
27
- * @package Belvg_FacebookAll
28
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
29
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
30
- */
31
-
32
- class Belvg_FacebookAll_CustomerController extends Mage_Core_Controller_Front_Action{
33
- public function LoginAction() {
34
-
35
- $facebook = new Facebook_Api(array(
36
- 'appId' => Mage::getStoreConfig('facebookall/settings/appid'),
37
- 'secret' => Mage::getStoreConfig('facebookall/settings/secret'),
38
- 'cookie' => true,
39
- ));
40
- $fb_session = $facebook->getSession();
41
-
42
- $me = null;
43
- // Session based API call.
44
- if ($fb_session) {
45
- try {
46
- $uid = $facebook->getUser();
47
- $me = $facebook->api('/me');
48
- } catch (Facebook_Exception $e) {
49
- error_log($e);
50
- }
51
- }
52
-
53
- if (is_array($me)) {
54
- $session = Mage::getSingleton('customer/session');
55
-
56
- $db_read = Mage::getSingleton('core/resource')->getConnection('facebookall_read');
57
- $tablePrefix = (string)Mage::getConfig()->getTablePrefix();
58
- $sql = 'SELECT `customer_id`
59
- FROM `'.$tablePrefix.'belvg_facebook_customer`
60
- WHERE `fb_id` = '.$me['id'].'
61
- LIMIT 1';
62
- $data = $db_read->fetchRow($sql);
63
-
64
- if ($data) {
65
- $session->loginById($data['customer_id']);
66
- } else {
67
- $sql = 'SELECT `entity_id`
68
- FROM `'.$tablePrefix.'customer_entity`
69
- WHERE email = "'.$me['email'].'"
70
- LIMIT 1';
71
- $r = $db_read->fetchRow($sql);
72
-
73
- if ($r) {
74
- $db_write = Mage::getSingleton('core/resource')->getConnection('facebookall_write');
75
- $sql = 'INSERT INTO `'.$tablePrefix.'belvg_facebook_customer`
76
- VALUES ('.$r['entity_id'].', '.$me['id'].')';
77
- $db_write->query($sql);
78
- $session->loginById($r['entity_id']);
79
- } else {
80
- $this->_registerCustomer($me, $session);
81
- }
82
- }
83
- $this->_loginPostRedirect($session);
84
- }
85
- }
86
-
87
- public function LogoutAction() {
88
- $session = Mage::getSingleton('customer/session');
89
- $session->logout()
90
- ->setBeforeAuthUrl(Mage::getUrl());
91
-
92
- $this->_redirect('customer/account/logoutSuccess');
93
- }
94
-
95
- private function _registerCustomer($data, &$session)
96
- {
97
- $customer = Mage::getModel('customer/customer')->setId(null);
98
- $customer->setData('firstname', $data['first_name']);
99
- $customer->setData('lastname', $data['last_name']);
100
- $customer->setData('email', $data['email']);
101
- $customer->setData('password', md5(time().$data['id'].$data['locale']));
102
- $customer->setData('is_active', 1);
103
- $customer->setData('confirmation', null);
104
- $customer->setConfirmation(null);
105
- $customer->getGroupId();
106
- $customer->save();
107
-
108
- Mage::getModel('customer/customer')->load($customer->getId())->setConfirmation(null)->save();
109
- $customer->setConfirmation(null);
110
- $session->setCustomerAsLoggedIn($customer);
111
- $customer_id = $session->getCustomerId();
112
- $db_write = Mage::getSingleton('core/resource')->getConnection('facebookall_write');
113
- $tablePrefix = (string)Mage::getConfig()->getTablePrefix();
114
- $sql = 'INSERT INTO `'.$tablePrefix.'belvg_facebook_customer`
115
- VALUES ('.$customer_id.', '.$data['id'].')';
116
- $db_write->query($sql);
117
- }
118
-
119
- private function _loginPostRedirect(&$session)
120
- {
121
-
122
- if ($referer = $this->getRequest()->getParam(Mage_Customer_Helper_Data::REFERER_QUERY_PARAM_NAME)) {
123
- $referer = Mage::helper('core')->urlDecode($referer);
124
- if ((strpos($referer, Mage::app()->getStore()->getBaseUrl()) === 0)
125
- || (strpos($referer, Mage::app()->getStore()->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK, true)) === 0)) {
126
- $session->setBeforeAuthUrl($referer);
127
- } else {
128
- $session->setBeforeAuthUrl(Mage::helper('customer')->getDashboardUrl());
129
- }
130
- } else {
131
- $session->setBeforeAuthUrl(Mage::helper('customer')->getDashboardUrl());
132
- }
133
- $this->_redirectUrl($session->getBeforeAuthUrl(true));
134
- }
135
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/FacebookAll/controllers/Wishlist/IndexController.php DELETED
@@ -1,138 +0,0 @@
1
- <?php
2
- /**
3
- * BelVG LLC.
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the EULA
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
11
- *
12
- /***************************************
13
- * MAGENTO EDITION USAGE NOTICE *
14
- *****************************************/
15
- /* This package designed for Magento COMMUNITY edition
16
- * BelVG does not guarantee correct work of this extension
17
- * on any other Magento edition except Magento COMMUNITY edition.
18
- * BelVG does not provide extension support in case of
19
- * incorrect edition usage.
20
- /***************************************
21
- * DISCLAIMER *
22
- *****************************************/
23
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
24
- * versions in the future.
25
- *****************************************************
26
- * @category Belvg
27
- * @package Belvg_FacebookAll
28
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
29
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
30
- */
31
-
32
- include_once("Mage/Wishlist/controllers/IndexController.php");
33
-
34
- class Belvg_FacebookAll_Wishlist_IndexController extends Mage_Wishlist_IndexController
35
- {
36
- /**
37
- * Adding new item
38
- */
39
-
40
- public function addAction()
41
- {
42
- $session = Mage::getSingleton('customer/session');
43
- $wishlist = $this->_getWishlist();
44
- if (!$wishlist) {
45
- $this->_redirect('*/');
46
- return;
47
- }
48
-
49
- $productId = (int) $this->getRequest()->getParam('product');
50
- if (!$productId) {
51
- $this->_redirect('*/');
52
- return;
53
- }
54
-
55
- $product = Mage::getModel('catalog/product')->load($productId);
56
- if (!$product->getId() || !$product->isVisibleInCatalog()) {
57
- $session->addError($this->__('Cannot specify product.'));
58
- $this->_redirect('*/');
59
- return;
60
- }
61
-
62
- try {
63
- $buyRequest = new Varien_Object($this->getRequest()->getParams());
64
-
65
- $result = $wishlist->addNewItem($product, $buyRequest);
66
- if (is_string($result)) {
67
- Mage::throwException($result);
68
- }
69
- $wishlist->save();
70
-
71
- Mage::dispatchEvent(
72
- 'wishlist_add_product',
73
- array(
74
- 'wishlist' => $wishlist,
75
- 'product' => $product,
76
- 'item' => $result
77
- )
78
- );
79
-
80
- $referer = $session->getBeforeWishlistUrl();
81
- if ($referer) {
82
- $session->setBeforeWishlistUrl(null);
83
- } else {
84
- $referer = $this->_getRefererUrl();
85
- }
86
-
87
- /**
88
- * Set referer to avoid referring to the compare popup window
89
- */
90
- $session->setAddActionReferer($referer);
91
-
92
- Mage::helper('wishlist')->calculate();
93
-
94
- $message = $this->__('%1$s has been added to your wishlist. Click <a href="%2$s">here</a> to continue shopping', $product->getName(), $referer);
95
- $session->addSuccess($message);
96
-
97
- /***/
98
- if (Mage::getStoreConfig('facebookall/wishlist/enabled')) {
99
- $facebook = new Facebook_Api(array(
100
- 'appId' => Mage::getStoreConfig('facebookall/settings/appid'),
101
- 'secret' => Mage::getStoreConfig('facebookall/settings/secret'),
102
- 'cookie' => true,
103
- ));
104
- $fb_session = $facebook->getSession();
105
-
106
- $me = null;
107
- if ($fb_session) {
108
- try {
109
- $uid = $facebook->getUser();
110
- $message = str_replace('{product}', $product->getName(), Mage::getStoreConfig('facebookall/wishlist/note'));
111
- $feed_data = array('message'=>$message,
112
- 'link'=>$product->getProductUrl(),
113
- 'picture'=> $product->getImageUrl(),
114
- 'name'=>$product->getName(),
115
- 'caption'=>'',
116
- 'description'=>$product->getShortDescription(),
117
- 'access_token'=>$facebook->getAccessToken);
118
-
119
- $me = $facebook->api('/me/feed/','post', $feed_data);
120
- } catch (Facebook_Exception $e) {
121
- error_log($e);
122
- }
123
- }
124
- }
125
- /****/
126
- }
127
- catch (Mage_Core_Exception $e) {
128
- $session->addError($this->__('An error occurred while adding item to wishlist: %s', $e->getMessage()));
129
- }
130
- catch (Exception $e) {
131
- mage::log($e->getMessage());
132
- $session->addError($this->__('An error occurred while adding item to wishlist.'));
133
- }
134
-
135
- $this->_redirect('*');
136
- }
137
-
138
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/FacebookAll/etc/adminhtml.xml DELETED
@@ -1,56 +0,0 @@
1
- <?xml version="1.0"?>
2
- <!--
3
- /**
4
- * BelVG LLC.
5
- *
6
- * NOTICE OF LICENSE
7
- *
8
- * This source file is subject to the EULA
9
- * that is bundled with this package in the file LICENSE.txt.
10
- * It is also available through the world-wide-web at this URL:
11
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
12
- *
13
- /***************************************
14
- * MAGENTO EDITION USAGE NOTICE *
15
- *****************************************/
16
- /* This package designed for Magento COMMUNITY edition
17
- * BelVG does not guarantee correct work of this extension
18
- * on any other Magento edition except Magento COMMUNITY edition.
19
- * BelVG does not provide extension support in case of
20
- * incorrect edition usage.
21
- /***************************************
22
- * DISCLAIMER *
23
- *****************************************/
24
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
25
- * versions in the future.
26
- *****************************************************
27
- * @category Belvg
28
- * @package Belvg_FacebookAll
29
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
30
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
31
- */
32
- -->
33
- <config>
34
- <acl>
35
- <resources>
36
- <all>
37
- <title>Allow Everything</title>
38
- </all>
39
- <admin>
40
- <children>
41
- <system>
42
- <children>
43
- <config>
44
- <children>
45
- <facebookall translate="title">
46
- <title>Facebook All in One</title>
47
- </facebookall>
48
- </children>
49
- </config>
50
- </children>
51
- </system>
52
- </children>
53
- </admin>
54
- </resources>
55
- </acl>
56
- </config>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/FacebookAll/etc/config.xml DELETED
@@ -1,146 +0,0 @@
1
- <?xml version="1.0"?>
2
- <!--
3
- /**
4
- * BelVG LLC.
5
- *
6
- * NOTICE OF LICENSE
7
- *
8
- * This source file is subject to the EULA
9
- * that is bundled with this package in the file LICENSE.txt.
10
- * It is also available through the world-wide-web at this URL:
11
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
12
- *
13
- /***************************************
14
- * MAGENTO EDITION USAGE NOTICE *
15
- *****************************************/
16
- /* This package designed for Magento COMMUNITY edition
17
- * BelVG does not guarantee correct work of this extension
18
- * on any other Magento edition except Magento COMMUNITY edition.
19
- * BelVG does not provide extension support in case of
20
- * incorrect edition usage.
21
- /***************************************
22
- * DISCLAIMER *
23
- *****************************************/
24
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
25
- * versions in the future.
26
- *****************************************************
27
- * @category Belvg
28
- * @package Belvg_FacebookAll
29
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
30
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
31
- */
32
- -->
33
- <config>
34
- <modules>
35
- <Belvg_FacebookAll>
36
- <version>1.0.1</version>
37
- </Belvg_FacebookAll>
38
- </modules>
39
- <frontend>
40
- <routers>
41
- <facebookall>
42
- <use>standard</use>
43
- <args>
44
- <module>Belvg_FacebookAll</module>
45
- <frontName>facebookall</frontName>
46
- </args>
47
- </facebookall>
48
- </routers>
49
- <layout>
50
- <updates>
51
- <facebookall>
52
- <file>FB-Twitter-Connect.xml</file>
53
- </facebookall>
54
- </updates>
55
- </layout>
56
- </frontend>
57
- <global>
58
- <models>
59
- <facebookall>
60
- <class>Belvg_FacebookAll_Model</class>
61
- <resourceModel>facebookall_mysql4</resourceModel>
62
- </facebookall>
63
- <facebookall_mysql4>
64
- <class>Belvg_FacebookAll_Model</class>
65
- <entities>
66
- <facebookall>
67
- <table>belvg_facebook_customer</table>
68
- </facebookall>
69
- </entities>
70
- </facebookall_mysql4>
71
- </models>
72
- <resources>
73
- <facebookall_setup>
74
- <setup>
75
- <module>Belvg_FacebookAll</module>
76
- </setup>
77
- <connection>
78
- <use>core_setup</use>
79
- </connection>
80
- </facebookall_setup>
81
- <facebookall_write>
82
- <connection>
83
- <use>core_write</use>
84
- </connection>
85
- </facebookall_write>
86
- <facebookall_read>
87
- <connection>
88
- <use>core_read</use>
89
- </connection>
90
- </facebookall_read>
91
- </resources>
92
- <blocks>
93
- <facebookall>
94
- <class>Belvg_FacebookAll_Block</class>
95
- </facebookall>
96
- </blocks>
97
- <helpers>
98
- <facebookall>
99
- <class>Belvg_FacebookAll_Helper</class>
100
- </facebookall>
101
- </helpers>
102
- <rewrite>
103
- <Belvg_FacebookAll_Wishlist_Index>
104
- <from><![CDATA[#^/wishlist/index/#]]>
105
- </from>
106
- <to>/facebookall/wishlist_index/</to>
107
- </Belvg_FacebookAll_Wishlist_Index>
108
- </rewrite>
109
- </global>
110
- <default>
111
- <facebookall>
112
- <like>
113
- <enabled>0</enabled>
114
- <faces>0</faces>
115
- <width>450</width>
116
- <color>light</color>
117
- <layout>standart</layout>
118
- <enabled>0</enabled>
119
- </like>
120
- <share>
121
- <enabled>0</enabled>
122
- <color>light</color>
123
- <font>arial</font>
124
- </share>
125
- <comments>
126
- <enabled>0</enabled>
127
- <color>light</color>
128
- <posts>5</posts>
129
- <width>500</width>
130
- </comments>
131
- <activity>
132
- <enabled>0</enabled>
133
- <width>200</width>
134
- <height>300</height>
135
- <header>1</header>
136
- <color>light</color>
137
- <font>arial</font>
138
- <recommendations>1</recommendations>
139
- <maxage>0</maxage>
140
- </activity>
141
- <wishlist>
142
- <note>I have added {product} to my wishlist.</note>
143
- </wishlist>
144
- </facebookall>
145
- </default>
146
- </config>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/FacebookAll/etc/system.xml DELETED
@@ -1,361 +0,0 @@
1
- <?xml version="1.0"?>
2
- <!--
3
- /**
4
- * BelVG LLC.
5
- *
6
- * NOTICE OF LICENSE
7
- *
8
- * This source file is subject to the EULA
9
- * that is bundled with this package in the file LICENSE.txt.
10
- * It is also available through the world-wide-web at this URL:
11
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
12
- *
13
- /***************************************
14
- * MAGENTO EDITION USAGE NOTICE *
15
- *****************************************/
16
- /* This package designed for Magento COMMUNITY edition
17
- * BelVG does not guarantee correct work of this extension
18
- * on any other Magento edition except Magento COMMUNITY edition.
19
- * BelVG does not provide extension support in case of
20
- * incorrect edition usage.
21
- /***************************************
22
- * DISCLAIMER *
23
- *****************************************/
24
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
25
- * versions in the future.
26
- *****************************************************
27
- * @category Belvg
28
- * @package Belvg_FacebookAll
29
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
30
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
31
- */
32
- -->
33
- <config>
34
- <sections>
35
- <facebookall translate="label">
36
- <label>Facebook All in One</label>
37
- <tab>belvg</tab>
38
- <frontend_type>text</frontend_type>
39
- <sort_order>1000</sort_order>
40
- <show_in_default>1</show_in_default>
41
- <show_in_website>1</show_in_website>
42
- <show_in_store>1</show_in_store>
43
- <groups>
44
- <settings translate="label">
45
- <label>Settings</label>
46
- <frontend_type>text</frontend_type>
47
- <sort_order>100</sort_order>
48
- <show_in_default>1</show_in_default>
49
- <show_in_website>1</show_in_website>
50
- <show_in_store>1</show_in_store>
51
- <comment>
52
- <![CDATA[
53
- <div style="padding:10px;background-color:#fff;border:1px solid #ddd;margin-bottom:7px;">
54
- This module was developed by <a href="http://www.belvg.com" target="_blank">www.BelVG.com</a>.
55
- For docs & examples refer to the BelVG <a href="http://www.belvg.com" target="_blank">web site</a>.
56
- <br/>We have the largest selections of <a href="http://store.belvg.com/extensions.html" target="_blank">extensions</a> and <a href="http://store.belvg.com/themes.html" target="_blank">themes</a> on Magento.
57
- </div>
58
- ]]>
59
- </comment>
60
- <fields>
61
- <enabled translate="label comment">
62
- <label>Enabled</label>
63
- <!-- <comment><![CDATA[]]></comment> -->
64
- <frontend_type>select</frontend_type>
65
- <source_model>adminhtml/system_config_source_enabledisable</source_model>
66
- <sort_order>10</sort_order>
67
- <show_in_default>1</show_in_default>
68
- <show_in_website>1</show_in_website>
69
- <show_in_store>1</show_in_store>
70
- </enabled>
71
- <appid translate="label comment">
72
- <label>Application Id</label>
73
- <!-- <comment><![CDATA[]]></comment> -->
74
- <frontend_type>text</frontend_type>
75
- <sort_order>11</sort_order>
76
- <show_in_default>1</show_in_default>
77
- <show_in_website>1</show_in_website>
78
- <show_in_store>1</show_in_store>
79
- </appid>
80
- <secret translate="label comment">
81
- <label>Secret Key</label>
82
- <!-- <comment><![CDATA[]]></comment> -->
83
- <frontend_type>text</frontend_type>
84
- <sort_order>12</sort_order>
85
- <show_in_default>1</show_in_default>
86
- <show_in_website>1</show_in_website>
87
- <show_in_store>1</show_in_store>
88
- </secret>
89
- <imglogin translate="label comment">
90
- <label>Login Button</label>
91
- <!-- <comment><![CDATA[]]></comment> -->
92
- <frontend_type>image</frontend_type>
93
- <backend_model>adminhtml/system_config_backend_image</backend_model>
94
- <upload_dir config="system/filesystem/media" scope_info="1">facebookall</upload_dir>
95
- <base_url type="media" scope_info="1">facebookall</base_url>
96
- <sort_order>13</sort_order>
97
- <show_in_default>1</show_in_default>
98
- <show_in_website>1</show_in_website>
99
- <show_in_store>1</show_in_store>
100
- </imglogin>
101
- </fields>
102
- </settings>
103
- <like translate="label">
104
- <label>Like Button</label>
105
- <frontend_type>text</frontend_type>
106
- <sort_order>110</sort_order>
107
- <show_in_default>1</show_in_default>
108
- <show_in_website>1</show_in_website>
109
- <show_in_store>1</show_in_store>
110
- <fields>
111
- <enabled translate="label comment">
112
- <label>Enabled</label>
113
- <!-- <comment><![CDATA[]]></comment> -->
114
- <frontend_type>select</frontend_type>
115
- <source_model>adminhtml/system_config_source_enabledisable</source_model>
116
- <sort_order>10</sort_order>
117
- <show_in_default>1</show_in_default>
118
- <show_in_website>1</show_in_website>
119
- <show_in_store>1</show_in_store>
120
- </enabled>
121
- <faces translate="label comment">
122
- <label>Show faces</label>
123
- <!-- <comment><![CDATA[]]></comment> -->
124
- <frontend_type>select</frontend_type>
125
- <source_model>adminhtml/system_config_source_enabledisable</source_model>
126
- <sort_order>11</sort_order>
127
- <show_in_default>1</show_in_default>
128
- <show_in_website>1</show_in_website>
129
- <show_in_store>1</show_in_store>
130
- </faces>
131
- <layout translate="label">
132
- <label>Layout Style</label>
133
- <frontend_type>select</frontend_type>
134
- <source_model>facebookall/system_config_source_layout</source_model>
135
- <sort_order>12</sort_order>
136
- <show_in_default>1</show_in_default>
137
- <show_in_website>1</show_in_website>
138
- <show_in_store>1</show_in_store>
139
- </layout>
140
- <color translate="label">
141
- <label>Color Scheme</label>
142
- <frontend_type>select</frontend_type>
143
- <source_model>facebookall/system_config_source_color</source_model>
144
- <sort_order>12</sort_order>
145
- <show_in_default>1</show_in_default>
146
- <show_in_website>1</show_in_website>
147
- <show_in_store>1</show_in_store>
148
- </color>
149
- <width translate="label comment">
150
- <label>Width</label>
151
- <comment>in px</comment>
152
- <frontend_type>text</frontend_type>
153
- <sort_order>13</sort_order>
154
- <show_in_default>1</show_in_default>
155
- <show_in_website>1</show_in_website>
156
- <show_in_store>1</show_in_store>
157
- </width>
158
- </fields>
159
- </like>
160
- <share translate="label">
161
- <label>Share Button</label>
162
- <frontend_type>text</frontend_type>
163
- <sort_order>120</sort_order>
164
- <show_in_default>1</show_in_default>
165
- <show_in_website>1</show_in_website>
166
- <show_in_store>1</show_in_store>
167
- <fields>
168
- <enabled translate="label comment">
169
- <label>Enabled</label>
170
- <!-- <comment><![CDATA[]]></comment> -->
171
- <frontend_type>select</frontend_type>
172
- <source_model>adminhtml/system_config_source_enabledisable</source_model>
173
- <sort_order>10</sort_order>
174
- <show_in_default>1</show_in_default>
175
- <show_in_website>1</show_in_website>
176
- <show_in_store>1</show_in_store>
177
- </enabled>
178
- <color translate="label">
179
- <label>Color Scheme</label>
180
- <frontend_type>select</frontend_type>
181
- <source_model>facebookall/system_config_source_color</source_model>
182
- <sort_order>11</sort_order>
183
- <show_in_default>1</show_in_default>
184
- <show_in_website>1</show_in_website>
185
- <show_in_store>1</show_in_store>
186
- </color>
187
- <font translate="label comment">
188
- <label>Font</label>
189
- <frontend_type>select</frontend_type>
190
- <source_model>facebookall/system_config_source_font</source_model>
191
- <sort_order>12</sort_order>
192
- <show_in_default>1</show_in_default>
193
- <show_in_website>1</show_in_website>
194
- <show_in_store>1</show_in_store>
195
- </font>
196
- </fields>
197
- </share>
198
- <comments translate="label">
199
- <label>Comments</label>
200
- <frontend_type>text</frontend_type>
201
- <sort_order>130</sort_order>
202
- <show_in_default>1</show_in_default>
203
- <show_in_website>1</show_in_website>
204
- <show_in_store>1</show_in_store>
205
- <fields>
206
- <enabled translate="label comment">
207
- <label>Enabled</label>
208
- <!-- <comment><![CDATA[]]></comment> -->
209
- <frontend_type>select</frontend_type>
210
- <source_model>adminhtml/system_config_source_enabledisable</source_model>
211
- <sort_order>10</sort_order>
212
- <show_in_default>1</show_in_default>
213
- <show_in_website>1</show_in_website>
214
- <show_in_store>1</show_in_store>
215
- </enabled>
216
- <posts translate="label">
217
- <label>Number of posts</label>
218
- <frontend_type>text</frontend_type>
219
- <sort_order>11</sort_order>
220
- <show_in_default>1</show_in_default>
221
- <show_in_website>1</show_in_website>
222
- <show_in_store>1</show_in_store>
223
- </posts>
224
- <width translate="label comment">
225
- <label>Width</label>
226
- <comment>in px</comment>
227
- <frontend_type>text</frontend_type>
228
- <sort_order>13</sort_order>
229
- <show_in_default>1</show_in_default>
230
- <show_in_website>1</show_in_website>
231
- <show_in_store>1</show_in_store>
232
- </width>
233
- <color translate="label">
234
- <label>Color Scheme</label>
235
- <frontend_type>select</frontend_type>
236
- <source_model>facebookall/system_config_source_color</source_model>
237
- <sort_order>11</sort_order>
238
- <show_in_default>1</show_in_default>
239
- <show_in_website>1</show_in_website>
240
- <show_in_store>1</show_in_store>
241
- </color>
242
- </fields>
243
- </comments>
244
- <activity translate="label">
245
- <label>Activity</label>
246
- <frontend_type>text</frontend_type>
247
- <sort_order>130</sort_order>
248
- <show_in_default>1</show_in_default>
249
- <show_in_website>1</show_in_website>
250
- <show_in_store>1</show_in_store>
251
- <fields>
252
- <enabled translate="label comment">
253
- <label>Enabled</label>
254
- <!-- <comment><![CDATA[]]></comment> -->
255
- <frontend_type>select</frontend_type>
256
- <source_model>adminhtml/system_config_source_enabledisable</source_model>
257
- <sort_order>10</sort_order>
258
- <show_in_default>1</show_in_default>
259
- <show_in_website>1</show_in_website>
260
- <show_in_store>1</show_in_store>
261
- </enabled>
262
- <width translate="label comment">
263
- <label>Width</label>
264
- <comment>in px</comment>
265
- <frontend_type>text</frontend_type>
266
- <sort_order>11</sort_order>
267
- <show_in_default>1</show_in_default>
268
- <show_in_website>1</show_in_website>
269
- <show_in_store>1</show_in_store>
270
- </width>
271
- <height translate="label comment">
272
- <label>Height</label>
273
- <comment>in px</comment>
274
- <frontend_type>text</frontend_type>
275
- <sort_order>12</sort_order>
276
- <show_in_default>1</show_in_default>
277
- <show_in_website>1</show_in_website>
278
- <show_in_store>1</show_in_store>
279
- </height>
280
- <header translate="label comment">
281
- <label>Show Header</label>
282
- <!-- <comment><![CDATA[]]></comment> -->
283
- <frontend_type>select</frontend_type>
284
- <source_model>adminhtml/system_config_source_yesno</source_model>
285
- <sort_order>13</sort_order>
286
- <show_in_default>1</show_in_default>
287
- <show_in_website>1</show_in_website>
288
- <show_in_store>1</show_in_store>
289
- </header>
290
- <color translate="label">
291
- <label>Color Scheme</label>
292
- <frontend_type>select</frontend_type>
293
- <source_model>facebookall/system_config_source_color</source_model>
294
- <sort_order>14</sort_order>
295
- <show_in_default>1</show_in_default>
296
- <show_in_website>1</show_in_website>
297
- <show_in_store>1</show_in_store>
298
- </color>
299
- <font translate="label comment">
300
- <label>Font</label>
301
- <frontend_type>select</frontend_type>
302
- <source_model>facebookall/system_config_source_font</source_model>
303
- <sort_order>15</sort_order>
304
- <show_in_default>1</show_in_default>
305
- <show_in_website>1</show_in_website>
306
- <show_in_store>1</show_in_store>
307
- </font>
308
- <recommendations translate="label comment">
309
- <label>Add recommendations</label>
310
- <!-- <comment><![CDATA[]]></comment> -->
311
- <frontend_type>select</frontend_type>
312
- <source_model>adminhtml/system_config_source_yesno</source_model>
313
- <sort_order>16</sort_order>
314
- <show_in_default>1</show_in_default>
315
- <show_in_website>1</show_in_website>
316
- <show_in_store>1</show_in_store>
317
- </recommendations>
318
- <maxage translate="label comment">
319
- <label>Max Age</label>
320
- <comment>The default is 0 (we don’t take age into account). Otherwise the valid values are 1-180, which specifies the number of days. For example, if you specify '7' the plugin will only show URLs which were created in the past week.</comment>
321
- <frontend_type>text</frontend_type>
322
- <sort_order>17</sort_order>
323
- <show_in_default>1</show_in_default>
324
- <show_in_website>1</show_in_website>
325
- <show_in_store>1</show_in_store>
326
- </maxage>
327
-
328
- </fields>
329
- </activity>
330
- <wishlist translate="label">
331
- <label>Wishlist</label>
332
- <frontend_type>text</frontend_type>
333
- <sort_order>150</sort_order>
334
- <show_in_default>1</show_in_default>
335
- <show_in_website>1</show_in_website>
336
- <show_in_store>1</show_in_store>
337
- <fields>
338
- <enabled translate="label comment">
339
- <label>Post product to user's feed</label>
340
- <!-- <comment><![CDATA[]]></comment> -->
341
- <frontend_type>select</frontend_type>
342
- <source_model>adminhtml/system_config_source_enabledisable</source_model>
343
- <sort_order>10</sort_order>
344
- <show_in_default>1</show_in_default>
345
- <show_in_website>1</show_in_website>
346
- <show_in_store>1</show_in_store>
347
- </enabled>
348
- <note translate="label comment">
349
- <label>Note</label>
350
- <frontend_type>text</frontend_type>
351
- <sort_order>13</sort_order>
352
- <show_in_default>1</show_in_default>
353
- <show_in_website>1</show_in_website>
354
- <show_in_store>1</show_in_store>
355
- </note>
356
- </fields>
357
- </wishlist>
358
- </groups>
359
- </facebookall>
360
- </sections>
361
- </config>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/FacebookAll/sql/facebookall_setup/mysql4-install-1.0.1.php DELETED
@@ -1,51 +0,0 @@
1
- <?php
2
- /**
3
- * BelVG LLC.
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the EULA
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
11
- *
12
- /***************************************
13
- * MAGENTO EDITION USAGE NOTICE *
14
- *****************************************/
15
- /* This package designed for Magento COMMUNITY edition
16
- * BelVG does not guarantee correct work of this extension
17
- * on any other Magento edition except Magento COMMUNITY edition.
18
- * BelVG does not provide extension support in case of
19
- * incorrect edition usage.
20
- /***************************************
21
- * DISCLAIMER *
22
- *****************************************/
23
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
24
- * versions in the future.
25
- *****************************************************
26
- * @category Belvg
27
- * @package Belvg_FacebookAll
28
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
29
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
30
- */
31
-
32
- $installer = $this;
33
-
34
- $installer->startSetup();
35
-
36
- $installer->run("
37
- CREATE TABLE IF NOT EXISTS {$this->getTable('belvg_facebook_customer')} (
38
- `customer_id` int(10) NOT NULL,
39
- `fb_id` bigint(20) NOT NULL,
40
- UNIQUE KEY `FB_CUSTOMER` (`customer_id`,`fb_id`)
41
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
42
-
43
- ALTER TABLE `{$this->getTable('belvg_facebook_customer')}`
44
- CHANGE `customer_id` `customer_id` INT( 10 ) UNSIGNED NOT NULL;
45
-
46
- ALTER TABLE `{$this->getTable('belvg_facebook_customer')}`
47
- ADD FOREIGN KEY ( `customer_id` ) REFERENCES `{$this->getTable('customer_entity')}` (
48
- `entity_id`
49
- ) ON DELETE CASCADE ;
50
- ");
51
- $installer->endSetup();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/FaceboookFree/etc/config.xml CHANGED
@@ -33,7 +33,7 @@
33
  <config>
34
  <modules>
35
  <Belvg_FaceboookFree>
36
- <version>1.0.2</version>
37
  </Belvg_FaceboookFree>
38
  </modules>
39
  <frontend>
33
  <config>
34
  <modules>
35
  <Belvg_FaceboookFree>
36
+ <version>1.0.1</version>
37
  </Belvg_FaceboookFree>
38
  </modules>
39
  <frontend>
app/code/community/Belvg/Fullscreenzoom/etc/adminhtml.xml DELETED
@@ -1,56 +0,0 @@
1
- <?xml version="1.0"?>
2
- <!--
3
- /**
4
- * BelVG LLC.
5
- *
6
- * NOTICE OF LICENSE
7
- *
8
- * This source file is subject to the EULA
9
- * that is bundled with this package in the file LICENSE.txt.
10
- * It is also available through the world-wide-web at this URL:
11
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
12
- *
13
- /***************************************
14
- * MAGENTO EDITION USAGE NOTICE *
15
- *****************************************/
16
- /* This package designed for Magento COMMUNITY edition
17
- * BelVG does not guarantee correct work of this extension
18
- * on any other Magento edition except Magento COMMUNITY edition.
19
- * BelVG does not provide extension support in case of
20
- * incorrect edition usage.
21
- /***************************************
22
- * DISCLAIMER *
23
- *****************************************/
24
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
25
- * versions in the future.
26
- *****************************************************
27
- * @category Belvg
28
- * @package Belvg_FullscreenZoom
29
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
30
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
31
- */
32
- -->
33
- <config>
34
- <acl>
35
- <resources>
36
- <all>
37
- <title>Allow Everything</title>
38
- </all>
39
- <admin>
40
- <children>
41
- <system>
42
- <children>
43
- <config>
44
- <children>
45
- <fullscreenzoom translate="title">
46
- <title>Fullscreen zoom</title>
47
- </fullscreenzoom>
48
- </children>
49
- </config>
50
- </children>
51
- </system>
52
- </children>
53
- </admin>
54
- </resources>
55
- </acl>
56
- </config>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/Fullscreenzoom/etc/config.xml DELETED
@@ -1,48 +0,0 @@
1
- <?xml version="1.0"?>
2
- <!--
3
- /**
4
- * BelVG LLC.
5
- *
6
- * NOTICE OF LICENSE
7
- *
8
- * This source file is subject to the EULA
9
- * that is bundled with this package in the file LICENSE.txt.
10
- * It is also available through the world-wide-web at this URL:
11
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
12
- *
13
- /***************************************
14
- * MAGENTO EDITION USAGE NOTICE *
15
- *****************************************/
16
- /* This package designed for Magento COMMUNITY edition
17
- * BelVG does not guarantee correct work of this extension
18
- * on any other Magento edition except Magento COMMUNITY edition.
19
- * BelVG does not provide extension support in case of
20
- * incorrect edition usage.
21
- /***************************************
22
- * DISCLAIMER *
23
- *****************************************/
24
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
25
- * versions in the future.
26
- *****************************************************
27
- * @category Belvg
28
- * @package Belvg_FullscreenZoom
29
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
30
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
31
- */
32
- -->
33
- <config>
34
- <modules>
35
- <Belvg_Fullscreenzoom>
36
- <version>1.0.1</version>
37
- </Belvg_Fullscreenzoom>
38
- </modules>
39
- <frontend>
40
- <layout>
41
- <updates>
42
- <fullscreenzoom>
43
- <file>fullscreenzoom.xml</file>
44
- </fullscreenzoom>
45
- </updates>
46
- </layout>
47
- </frontend>
48
- </config>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/Fullscreenzoom/etc/system.xml DELETED
@@ -1,86 +0,0 @@
1
- <?xml version="1.0"?>
2
- <!--
3
- /**
4
- * BelVG LLC.
5
- *
6
- * NOTICE OF LICENSE
7
- *
8
- * This source file is subject to the EULA
9
- * that is bundled with this package in the file LICENSE.txt.
10
- * It is also available through the world-wide-web at this URL:
11
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
12
- *
13
- /***************************************
14
- * MAGENTO EDITION USAGE NOTICE *
15
- *****************************************/
16
- /* This package designed for Magento COMMUNITY edition
17
- * BelVG does not guarantee correct work of this extension
18
- * on any other Magento edition except Magento COMMUNITY edition.
19
- * BelVG does not provide extension support in case of
20
- * incorrect edition usage.
21
- /***************************************
22
- * DISCLAIMER *
23
- *****************************************/
24
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
25
- * versions in the future.
26
- *****************************************************
27
- * @category Belvg
28
- * @package Belvg_FullscreenZoom
29
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
30
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
31
- */
32
- -->
33
- <config>
34
- <sections>
35
- <fullscreenzoom translate="label">
36
- <label>Fullscreen zoom</label>
37
- <tab>belvg</tab>
38
- <frontend_type>text</frontend_type>
39
- <sort_order>1000</sort_order>
40
- <show_in_default>1</show_in_default>
41
- <show_in_website>1</show_in_website>
42
- <show_in_store>1</show_in_store>
43
- <groups>
44
- <settings translate="label">
45
- <label>Settings</label>
46
- <frontend_type>text</frontend_type>
47
- <sort_order>100</sort_order>
48
- <show_in_default>1</show_in_default>
49
- <show_in_website>1</show_in_website>
50
- <show_in_store>1</show_in_store>
51
- <comment>
52
- <![CDATA[
53
- <div style="padding:10px;background-color:#fff;border:1px solid #ddd;margin-bottom:7px;">
54
- This module was developed by <a href="http://www.belvg.com" target="_blank">www.BelVG.com</a>.
55
- For docs & examples refer to the BelVG <a href="http://www.belvg.com" target="_blank">web site</a>.
56
- <br/>We have the largest selections of <a href="http://store.belvg.com/extensions.html" target="_blank">extensions</a> and <a href="http://store.belvg.com/themes.html" target="_blank">themes</a> on Magento.
57
- </div>
58
- ]]>
59
- </comment>
60
- <fields>
61
- <enabled translate="label comment">
62
- <label>Enabled</label>
63
- <!-- <comment><![CDATA[]]></comment> -->
64
- <frontend_type>select</frontend_type>
65
- <source_model>adminhtml/system_config_source_enabledisable</source_model>
66
- <sort_order>10</sort_order>
67
- <show_in_default>1</show_in_default>
68
- <show_in_website>1</show_in_website>
69
- <show_in_store>1</show_in_store>
70
- </enabled>
71
- <logo translate="label comment">
72
- <label>Show shop logo</label>
73
- <!-- <comment><![CDATA[]]></comment> -->
74
- <frontend_type>select</frontend_type>
75
- <source_model>adminhtml/system_config_source_yesno</source_model>
76
- <sort_order>11</sort_order>
77
- <show_in_default>1</show_in_default>
78
- <show_in_website>1</show_in_website>
79
- <show_in_store>1</show_in_store>
80
- </logo>
81
- </fields>
82
- </settings>
83
- </groups>
84
- </fullscreenzoom>
85
- </sections>
86
- </config>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/Twitter/Block/Adminhtml/Settings.php DELETED
@@ -1,71 +0,0 @@
1
- <?php
2
- /**
3
- * BelVG LLC.
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the EULA
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
11
- *
12
- /***************************************
13
- * MAGENTO EDITION USAGE NOTICE *
14
- *****************************************/
15
- /* This package designed for Magento COMMUNITY edition
16
- * BelVG does not guarantee correct work of this extension
17
- * on any other Magento edition except Magento COMMUNITY edition.
18
- * BelVG does not provide extension support in case of
19
- * incorrect edition usage.
20
- /***************************************
21
- * DISCLAIMER *
22
- *****************************************/
23
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
24
- * versions in the future.
25
- *****************************************************
26
- * @category Belvg
27
- * @package Belvg_Twitterconnect
28
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
29
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
30
- */?>
31
- <?php
32
- class Belvg_Twitter_Block_Adminhtml_Settings extends Mage_Adminhtml_Block_Widget_Form_Container
33
- {
34
- public function __construct()
35
- {
36
- parent::__construct();
37
-
38
- $this->_objectId = 'id';
39
- $this->_blockGroup = 'twitter';
40
- $this->_controller = 'adminhtml_twitter';
41
-
42
- $this->_updateButton('save', 'label', Mage::helper('twitter')->__('Save Item'));
43
- $this->_updateButton('delete', 'label', Mage::helper('twitter')->__('Delete Item'));
44
-
45
- $this->_formScripts[] = "
46
- function toggleEditor() {
47
- if (tinyMCE.getInstanceById('twitter_content') == null) {
48
- tinyMCE.execCommand('mceAddControl', false, 'twitter_content');
49
- } else {
50
- tinyMCE.execCommand('mceRemoveControl', false, 'twitter_content');
51
- }
52
- }
53
-
54
- function saveAndContinueEdit(){
55
- editForm.submit($('edit_form').action+'back/edit/');
56
- }
57
- ";
58
- }
59
-
60
- public function getHeaderText()
61
- {
62
- if( Mage::registry('twitter_data') && Mage::registry('twitter_data')->getId() ) {
63
- return Mage::helper('twitter')->__("Edit Item '%s'", $this->htmlEscape(Mage::registry('twitter_data')->getTitle()));
64
- } else {
65
- return Mage::helper('twitter')->__('Add Item');
66
- }
67
- }
68
-
69
-
70
-
71
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/Twitter/Block/Adminhtml/Settings/Tab/General.php DELETED
@@ -1,174 +0,0 @@
1
- <?php
2
- /**
3
- * BelVG LLC.
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the EULA
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
11
- *
12
- /***************************************
13
- * MAGENTO EDITION USAGE NOTICE *
14
- *****************************************/
15
- /* This package designed for Magento COMMUNITY edition
16
- * BelVG does not guarantee correct work of this extension
17
- * on any other Magento edition except Magento COMMUNITY edition.
18
- * BelVG does not provide extension support in case of
19
- * incorrect edition usage.
20
- /***************************************
21
- * DISCLAIMER *
22
- *****************************************/
23
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
24
- * versions in the future.
25
- *****************************************************
26
- * @category Belvg
27
- * @package Belvg_Twitterconnect
28
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
29
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
30
- */?>
31
- <?php
32
-
33
- class Belvg_Twitter_Block_Adminhtml_Settings_Tab_General extends Mage_Adminhtml_Block_Widget_Form
34
- {
35
- protected function _prepareForm()
36
- {
37
- $form = new Varien_Data_Form();
38
- $news_id = $this->getRequest()->getParam('id');
39
- $fieldset = $form->addFieldset('general', array('legend'=>Mage::helper('core')->__('General Settings')));
40
- $wysiwygConfig = Mage::getSingleton('cms/wysiwyg_config')->getConfig(
41
- array('tab_id' => 'page_tabs')
42
- );
43
-
44
- $fieldset->addField('user_name', 'text', array(
45
- 'label' => Mage::helper('core')->__('User Name'),
46
- 'title' => Mage::helper('core')->__('User Name'),
47
- 'name' => 'user_name',
48
- 'width' => '50px',
49
- 'required' => true,
50
- ));
51
- $fieldset->addField('title', 'text', array(
52
- 'label' => Mage::helper('core')->__('Title'),
53
- 'title' => Mage::helper('core')->__('Title'),
54
- 'name' => 'title',
55
- 'width' => '50px',
56
- 'required' => true,
57
- ));
58
- $fieldset->addField('subject', 'text', array(
59
- 'label' => Mage::helper('core')->__('Subject'),
60
- 'title' => Mage::helper('core')->__('Subject'),
61
- 'name' => 'subject',
62
- 'width' => '50px',
63
- 'required' => true,
64
- ));
65
- $fieldset->addField('width', 'text', array(
66
- 'label' => Mage::helper('core')->__('Width'),
67
- 'title' => Mage::helper('core')->__('Width'),
68
- 'name' => 'width',
69
- 'width' => '50px',
70
- 'required' => true,
71
- ));
72
- $fieldset->addField('height', 'text', array(
73
- 'label' => Mage::helper('core')->__('Height'),
74
- 'title' => Mage::helper('core')->__('Height'),
75
- 'name' => 'height',
76
- 'width' => '50px',
77
- 'required' => true,
78
- ));
79
- $fieldset->addField('shell_bg', 'text', array(
80
- 'label' => Mage::helper('core')->__('Shell Background'),
81
- 'title' => Mage::helper('core')->__('Shell Background'),
82
- 'name' => 'shell_bg',
83
- 'width' => '50px',
84
- 'required' => true,
85
- ));
86
- $fieldset->addField('shell_color', 'text', array(
87
- 'label' => Mage::helper('core')->__('Shell Color'),
88
- 'title' => Mage::helper('core')->__('Shell Color'),
89
- 'name' => 'shell_color',
90
- 'width' => '50px',
91
- 'required' => true,
92
- ));
93
- $fieldset->addField('tweets_bg', 'text', array(
94
- 'label' => Mage::helper('core')->__('Tweets Background'),
95
- 'title' => Mage::helper('core')->__('Tweets Background'),
96
- 'name' => 'tweets_bg',
97
- 'width' => '50px',
98
- 'required' => true,
99
- ));
100
- $fieldset->addField('tweets_color', 'text', array(
101
- 'label' => Mage::helper('core')->__('Tweets Color'),
102
- 'title' => Mage::helper('core')->__('Tweets Color'),
103
- 'name' => 'tweets_color',
104
- 'width' => '50px',
105
- 'required' => true,
106
- ));
107
- $fieldset->addField('tweets_link', 'text', array(
108
- 'label' => Mage::helper('core')->__('Tweets Link'),
109
- 'title' => Mage::helper('core')->__('Tweets Link'),
110
- 'name' => 'tweets_link',
111
- 'width' => '50px',
112
- 'required' => true,
113
- ));
114
-
115
- $fieldset->addField('pages', 'multiselect', array(
116
- 'name' => 'pages[]',
117
- 'label' => Mage::helper('core')->__('Pages'),
118
- 'title' => Mage::helper('core')->__('Pages'),
119
- 'required' => true,
120
- 'values' => $this->getCmsPages()
121
- ));
122
- $fieldset->addField('position', 'select', array(
123
- 'label' => Mage::helper('twitter')->__('Position'),
124
- 'name' => 'position',
125
- 'values' => array(
126
- array(
127
- 'value' => 0,
128
- 'label' => Mage::helper('twitter')->__('None'),
129
- ),
130
-
131
- array(
132
- 'value' => 1,
133
- 'label' => Mage::helper('twitter')->__('Left'),
134
- ),
135
-
136
- array(
137
- 'value' => 2,
138
- 'label' => Mage::helper('twitter')->__('Right'),
139
- ),
140
- ),
141
- ));
142
- $fieldset->addField('status', 'select', array(
143
- 'label' => Mage::helper('twitter')->__('Status'),
144
- 'name' => 'status',
145
- 'values' => array(
146
- array(
147
- 'value' => 0,
148
- 'label' => Mage::helper('twitter')->__('Enabled'),
149
- ),
150
-
151
- array(
152
- 'value' => 1,
153
- 'label' => Mage::helper('twitter')->__('Disabled'),
154
- )
155
- ),
156
- ));
157
-
158
- $formData = Mage::getModel('twitter/twitter')->getSettings();
159
- $form->addValues($formData);
160
- $form->setFieldNameSuffix('design');
161
- $this->setForm($form);
162
- }
163
-
164
- protected function getCmsPages(){
165
- $pages = array();
166
- $collection = Mage::getModel('cms/page')->getCollection();
167
- foreach ($collection as $_page){
168
- $pages[] = array('value'=>$_page->getId(),'label'=>$_page->getTitle());
169
- }
170
- $pages[] = array('value'=>'777','label'=> 'Categories');
171
- $pages[] = array('value'=>'555','label'=> 'Products');
172
- return $pages;
173
- }
174
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/Twitter/Block/Adminhtml/Settings/Tabs.php DELETED
@@ -1,54 +0,0 @@
1
- <?php
2
- /**
3
- * BelVG LLC.
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the EULA
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
11
- *
12
- /***************************************
13
- * MAGENTO EDITION USAGE NOTICE *
14
- *****************************************/
15
- /* This package designed for Magento COMMUNITY edition
16
- * BelVG does not guarantee correct work of this extension
17
- * on any other Magento edition except Magento COMMUNITY edition.
18
- * BelVG does not provide extension support in case of
19
- * incorrect edition usage.
20
- /***************************************
21
- * DISCLAIMER *
22
- *****************************************/
23
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
24
- * versions in the future.
25
- *****************************************************
26
- * @category Belvg
27
- * @package Belvg_Twitterconnect
28
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
29
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
30
- */?>
31
- <?php
32
-
33
- class Belvg_Twitter_Block_Adminhtml_Settings_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
34
- {
35
-
36
- public function __construct()
37
- {
38
- parent::__construct();
39
- $this->setId('design_tabs');
40
- $this->setDestElementId('design_edit_form');
41
- $this->setTitle(Mage::helper('core')->__('Twitter Settings'));
42
- }
43
-
44
- protected function _prepareLayout()
45
- {
46
- $this->addTab('general', array(
47
- 'label' => Mage::helper('core')->__('General'),
48
- 'content' => $this->getLayout()->createBlock('twitter/adminhtml_settings_tab_general')->toHtml(),
49
- ));
50
-
51
-
52
- return parent::_prepareLayout();
53
- }
54
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/Twitter/Block/Adminhtml/Twitter.php DELETED
@@ -1,43 +0,0 @@
1
- <?php
2
- /**
3
- * BelVG LLC.
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the EULA
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
11
- *
12
- /***************************************
13
- * MAGENTO EDITION USAGE NOTICE *
14
- *****************************************/
15
- /* This package designed for Magento COMMUNITY edition
16
- * BelVG does not guarantee correct work of this extension
17
- * on any other Magento edition except Magento COMMUNITY edition.
18
- * BelVG does not provide extension support in case of
19
- * incorrect edition usage.
20
- /***************************************
21
- * DISCLAIMER *
22
- *****************************************/
23
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
24
- * versions in the future.
25
- *****************************************************
26
- * @category Belvg
27
- * @package Belvg_Twitterconnect
28
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
29
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
30
- */?>
31
- <?php
32
- class Belvg_Twitter_Block_Adminhtml_Twitter extends Mage_Adminhtml_Block_Widget_Grid_Container
33
- {
34
- public function __construct()
35
- {
36
- $this->_controller = 'adminhtml_twitter';
37
- $this->_blockGroup = 'twitter';
38
- $this->_headerText = Mage::helper('twitter')->__('Item Manager');
39
- $this->_addButtonLabel = Mage::helper('twitter')->__('Add Item');
40
- parent::__construct();
41
- }
42
-
43
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/Twitter/Block/Adminhtml/Twitter/Edit.php DELETED
@@ -1,78 +0,0 @@
1
- <?php
2
- /**
3
- * BelVG LLC.
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the EULA
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
11
- *
12
- /***************************************
13
- * MAGENTO EDITION USAGE NOTICE *
14
- *****************************************/
15
- /* This package designed for Magento COMMUNITY edition
16
- * BelVG does not guarantee correct work of this extension
17
- * on any other Magento edition except Magento COMMUNITY edition.
18
- * BelVG does not provide extension support in case of
19
- * incorrect edition usage.
20
- /***************************************
21
- * DISCLAIMER *
22
- *****************************************/
23
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
24
- * versions in the future.
25
- *****************************************************
26
- * @category Belvg
27
- * @package Belvg_Twitterconnect
28
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
29
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
30
- */?>
31
- <?php
32
-
33
- class Belvg_Twitter_Block_Adminhtml_Twitter_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
34
- {
35
- public function __construct()
36
- {
37
- parent::__construct();
38
-
39
- $this->_objectId = 'id';
40
- $this->_blockGroup = 'twitter';
41
- $this->_controller = 'adminhtml_twitter';
42
-
43
- $this->_updateButton('save', 'label', Mage::helper('twitter')->__('Save Item'));
44
- $this->_updateButton('delete', 'label', Mage::helper('twitter')->__('Delete Item'));
45
-
46
- $this->_addButton('saveandcontinue', array(
47
- 'label' => Mage::helper('adminhtml')->__('Save And Continue Edit'),
48
- 'onclick' => 'saveAndContinueEdit()',
49
- 'class' => 'save',
50
- ), -100);
51
-
52
- $this->_formScripts[] = "
53
- function toggleEditor() {
54
- if (tinyMCE.getInstanceById('twitter_content') == null) {
55
- tinyMCE.execCommand('mceAddControl', false, 'twitter_content');
56
- } else {
57
- tinyMCE.execCommand('mceRemoveControl', false, 'twitter_content');
58
- }
59
- }
60
-
61
- function saveAndContinueEdit(){
62
- editForm.submit($('edit_form').action+'back/edit/');
63
- }
64
- ";
65
- }
66
-
67
- public function getHeaderText()
68
- {
69
- if( Mage::registry('twitter_data') && Mage::registry('twitter_data')->getId() ) {
70
- return Mage::helper('twitter')->__("Edit Item '%s'", $this->htmlEscape(Mage::registry('twitter_data')->getTitle()));
71
- } else {
72
- return Mage::helper('twitter')->__('Add Item');
73
- }
74
- }
75
- protected function _toHtml(){
76
- return Mage::app()->getLayout()->createBlock('adminhtml/store_switcher')->toHtml().parent::_toHtml();
77
- }
78
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/Twitter/Block/Adminhtml/Twitter/Edit/Form.php DELETED
@@ -1,49 +0,0 @@
1
- <?php
2
- /**
3
- * BelVG LLC.
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the EULA
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
11
- *
12
- /***************************************
13
- * MAGENTO EDITION USAGE NOTICE *
14
- *****************************************/
15
- /* This package designed for Magento COMMUNITY edition
16
- * BelVG does not guarantee correct work of this extension
17
- * on any other Magento edition except Magento COMMUNITY edition.
18
- * BelVG does not provide extension support in case of
19
- * incorrect edition usage.
20
- /***************************************
21
- * DISCLAIMER *
22
- *****************************************/
23
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
24
- * versions in the future.
25
- *****************************************************
26
- * @category Belvg
27
- * @package Belvg_Twitterconnect
28
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
29
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
30
- */?>
31
- <?php
32
-
33
- class Belvg_Twitter_Block_Adminhtml_Twitter_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
34
- {
35
- protected function _prepareForm()
36
- {
37
- $form = new Varien_Data_Form(array(
38
- 'id' => 'edit_form',
39
- 'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
40
- 'method' => 'post',
41
- 'enctype' => 'multipart/form-data'
42
- )
43
- );
44
-
45
- $form->setUseContainer(true);
46
- $this->setForm($form);
47
- return parent::_prepareForm();
48
- }
49
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/Twitter/Block/Adminhtml/Twitter/Edit/Tab/Form.php DELETED
@@ -1,167 +0,0 @@
1
- <?php
2
- /**
3
- * BelVG LLC.
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the EULA
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
11
- *
12
- /***************************************
13
- * MAGENTO EDITION USAGE NOTICE *
14
- *****************************************/
15
- /* This package designed for Magento COMMUNITY edition
16
- * BelVG does not guarantee correct work of this extension
17
- * on any other Magento edition except Magento COMMUNITY edition.
18
- * BelVG does not provide extension support in case of
19
- * incorrect edition usage.
20
- /***************************************
21
- * DISCLAIMER *
22
- *****************************************/
23
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
24
- * versions in the future.
25
- *****************************************************
26
- * @category Belvg
27
- * @package Belvg_Twitterconnect
28
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
29
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
30
- */?>
31
- <?php
32
-
33
- class Belvg_Twitter_Block_Adminhtml_Twitter_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
34
- {
35
- protected function _prepareForm()
36
- {
37
- $form = new Varien_Data_Form();
38
- $this->setForm($form);
39
- $fieldset = $form->addFieldset('twitter_form', array('legend'=>Mage::helper('twitter')->__('Item information')));
40
- $_store = 0;
41
- if ($this->getRequest()->getParam('store')) $_store = $this->getRequest()->getParam('store');
42
- $fieldset->addField('type', 'select', array(
43
- 'label' => Mage::helper('core')->__('Type'),
44
- 'title' => Mage::helper('core')->__('Type'),
45
- 'name' => 'type',
46
- 'values' => array(
47
- array(
48
- 'value' => 'faves',
49
- 'label' => Mage::helper('twitter')->__('Favorites'),
50
- ),
51
-
52
- array(
53
- 'value' => 'profile',
54
- 'label' => Mage::helper('twitter')->__('Profile'),
55
- )
56
- ),
57
- 'required' => true,
58
- ));
59
- $fieldset->addField('user_name', 'text', array(
60
- 'label' => Mage::helper('core')->__('User Name'),
61
- 'title' => Mage::helper('core')->__('User Name'),
62
- 'name' => 'user_name',
63
- 'width' => '50px',
64
- 'required' => true,
65
- ));
66
- $fieldset->addField('store', 'hidden', array(
67
- 'label' => Mage::helper('core')->__('Store'),
68
- 'title' => Mage::helper('core')->__('Store'),
69
- 'name' => 'store',
70
- 'width' => '50px',
71
- ));
72
- $fieldset->addField('title', 'text', array(
73
- 'label' => Mage::helper('core')->__('Title'),
74
- 'title' => Mage::helper('core')->__('Title'),
75
- 'name' => 'title',
76
- 'width' => '50px',
77
- 'required' => true,
78
- ));
79
- $fieldset->addField('subject', 'text', array(
80
- 'label' => Mage::helper('core')->__('Subject'),
81
- 'title' => Mage::helper('core')->__('Subject'),
82
- 'name' => 'subject',
83
- 'width' => '50px',
84
- 'required' => true,
85
- ));
86
-
87
-
88
- $fieldset->addField('pages', 'multiselect', array(
89
- 'name' => 'pages[]',
90
- 'label' => Mage::helper('core')->__('Pages'),
91
- 'title' => Mage::helper('core')->__('Pages'),
92
- 'required' => true,
93
- 'values' => $this->getCmsPages()
94
- ));
95
- $fieldset->addField('position', 'select', array(
96
- 'label' => Mage::helper('twitter')->__('Position'),
97
- 'name' => 'position',
98
- 'values' => array(
99
- array(
100
- 'value' => 0,
101
- 'label' => Mage::helper('twitter')->__('None'),
102
- ),
103
-
104
- array(
105
- 'value' => 1,
106
- 'label' => Mage::helper('twitter')->__('Left'),
107
- ),
108
-
109
- array(
110
- 'value' => 2,
111
- 'label' => Mage::helper('twitter')->__('Right'),
112
- ),
113
- array(
114
- 'value' => 3,
115
- 'label' => Mage::helper('twitter')->__('Content'),
116
- ),
117
-
118
- array(
119
- 'value' => 5,
120
- 'label' => Mage::helper('twitter')->__('Footer'),
121
- ),
122
- ),
123
- ));
124
- $fieldset->addField('status', 'select', array(
125
- 'label' => Mage::helper('twitter')->__('Status'),
126
- 'name' => 'status',
127
- 'values' => array(
128
- array(
129
- 'value' => 0,
130
- 'label' => Mage::helper('twitter')->__('Enabled'),
131
- ),
132
-
133
- array(
134
- 'value' => 1,
135
- 'label' => Mage::helper('twitter')->__('Disabled'),
136
- )
137
- ),
138
- ));
139
-
140
- $form->setFieldNameSuffix('design');
141
- if ( Mage::getSingleton('adminhtml/session')->getTwitterData() )
142
- {
143
- $_data = Mage::getSingleton('adminhtml/session')->getTwitterData();
144
- $_data['store'] = $_store;
145
- $form->setValues($_data);
146
- Mage::getSingleton('adminhtml/session')->setTwitterData(null);
147
- } elseif ( Mage::registry('twitter_data') ) {
148
- $_data = Mage::registry('twitter_data')->getData();
149
- $_data['store'] = $_store;
150
- $form->setValues($_data);
151
- }
152
- return parent::_prepareForm();
153
- }
154
-
155
- protected function getCmsPages(){
156
- $pages = array();
157
- $collection = Mage::getModel('cms/page')->getCollection();
158
- foreach ($collection as $_page){
159
- $pages[] = array('value'=>$_page->getId(),'label'=>$_page->getTitle());
160
- }
161
- $pages[] = array('value'=>'777','label'=> 'Categories');
162
- $pages[] = array('value'=>'555','label'=> 'Products');
163
- return $pages;
164
- }
165
-
166
-
167
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/Twitter/Block/Adminhtml/Twitter/Edit/Tab/Settings.php DELETED
@@ -1,196 +0,0 @@
1
- <?php
2
- /**
3
- * BelVG LLC.
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the EULA
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
11
- *
12
- /***************************************
13
- * MAGENTO EDITION USAGE NOTICE *
14
- *****************************************/
15
- /* This package designed for Magento COMMUNITY edition
16
- * BelVG does not guarantee correct work of this extension
17
- * on any other Magento edition except Magento COMMUNITY edition.
18
- * BelVG does not provide extension support in case of
19
- * incorrect edition usage.
20
- /***************************************
21
- * DISCLAIMER *
22
- *****************************************/
23
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
24
- * versions in the future.
25
- *****************************************************
26
- * @category Belvg
27
- * @package Belvg_Twitterconnect
28
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
29
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
30
- */?>
31
- <?php
32
-
33
- class Belvg_Twitter_Block_Adminhtml_Twitter_Edit_Tab_Settings extends Mage_Adminhtml_Block_Widget_Form
34
- {
35
- protected function _prepareForm()
36
- {
37
- $form = new Varien_Data_Form();
38
- $this->setForm($form);
39
- $fieldset = $form->addFieldset('twitter_form', array('legend'=>Mage::helper('twitter')->__('Item information')));
40
- $_store = 0;
41
- if ($this->getRequest()->getParam('store')) $_store = $this->getRequest()->getParam('store');
42
-
43
- $fieldset->addField('width', 'text', array(
44
- 'label' => Mage::helper('core')->__('Width'),
45
- 'title' => Mage::helper('core')->__('Width'),
46
- 'name' => 'width',
47
- 'width' => '50px',
48
- 'required' => true,
49
- ));
50
- $fieldset->addField('height', 'text', array(
51
- 'label' => Mage::helper('core')->__('Height'),
52
- 'title' => Mage::helper('core')->__('Height'),
53
- 'name' => 'height',
54
- 'width' => '50px',
55
- 'required' => true,
56
- ));
57
- $fieldset->addField('interval', 'text', array(
58
- 'label' => Mage::helper('core')->__('Interval'),
59
- 'title' => Mage::helper('core')->__('Interval'),
60
- 'name' => 'interval',
61
- 'width' => '50px',
62
- 'required' => true,
63
- ));
64
- $fieldset->addField('timestamp', 'select', array(
65
- 'label' => Mage::helper('core')->__('Show timestamp'),
66
- 'title' => Mage::helper('core')->__('Show timestamp'),
67
- 'name' => 'timestamp',
68
- 'values' => array(
69
- array(
70
- 'value' => 'true',
71
- 'label' => Mage::helper('twitter')->__('Yes'),
72
- ),
73
-
74
- array(
75
- 'value' => 'false',
76
- 'label' => Mage::helper('twitter')->__('No'),
77
- )
78
- ),
79
- 'required' => true,
80
- ));
81
- $fieldset->addField('avatars', 'select', array(
82
- 'label' => Mage::helper('core')->__('Show avatars'),
83
- 'title' => Mage::helper('core')->__('Show avatars'),
84
- 'name' => 'avatars',
85
- 'values' => array(
86
- array(
87
- 'value' => 'true',
88
- 'label' => Mage::helper('twitter')->__('Yes'),
89
- ),
90
-
91
- array(
92
- 'value' => 'false',
93
- 'label' => Mage::helper('twitter')->__('No'),
94
- )
95
- ),
96
- 'required' => true,
97
- ));
98
- $fieldset->addField('hashtags', 'select', array(
99
- 'label' => Mage::helper('core')->__('Show hashtags'),
100
- 'title' => Mage::helper('core')->__('Show hashtags'),
101
- 'name' => 'hashtags',
102
- 'values' => array(
103
- array(
104
- 'value' => 'true',
105
- 'label' => Mage::helper('twitter')->__('Yes'),
106
- ),
107
-
108
- array(
109
- 'value' => 'false',
110
- 'label' => Mage::helper('twitter')->__('No'),
111
- )
112
- ),
113
- 'required' => true,
114
- ));
115
- $fieldset->addField('scrollbar', 'select', array(
116
- 'label' => Mage::helper('core')->__('Show scrollbar'),
117
- 'title' => Mage::helper('core')->__('Show scrollbar'),
118
- 'name' => 'scrollbar',
119
- 'values' => array(
120
- array(
121
- 'value' => 'true',
122
- 'label' => Mage::helper('twitter')->__('Yes'),
123
- ),
124
-
125
- array(
126
- 'value' => 'false',
127
- 'label' => Mage::helper('twitter')->__('No'),
128
- )
129
- ),
130
- 'required' => true,
131
- ));
132
- $fieldset->addField('shell_bg', 'text', array(
133
- 'label' => Mage::helper('core')->__('Shell Background'),
134
- 'title' => Mage::helper('core')->__('Shell Background'),
135
- 'name' => 'shell_bg',
136
- 'width' => '50px',
137
- 'required' => true,
138
- ));
139
- $fieldset->addField('shell_color', 'text', array(
140
- 'label' => Mage::helper('core')->__('Shell Color'),
141
- 'title' => Mage::helper('core')->__('Shell Color'),
142
- 'name' => 'shell_color',
143
- 'width' => '50px',
144
- 'required' => true,
145
- ));
146
- $fieldset->addField('tweets_bg', 'text', array(
147
- 'label' => Mage::helper('core')->__('Tweets Background'),
148
- 'title' => Mage::helper('core')->__('Tweets Background'),
149
- 'name' => 'tweets_bg',
150
- 'width' => '50px',
151
- 'required' => true,
152
- ));
153
- $fieldset->addField('tweets_color', 'text', array(
154
- 'label' => Mage::helper('core')->__('Tweets Color'),
155
- 'title' => Mage::helper('core')->__('Tweets Color'),
156
- 'name' => 'tweets_color',
157
- 'width' => '50px',
158
- 'required' => true,
159
- ));
160
- $fieldset->addField('tweets_link', 'text', array(
161
- 'label' => Mage::helper('core')->__('Tweets Link'),
162
- 'title' => Mage::helper('core')->__('Tweets Link'),
163
- 'name' => 'tweets_link',
164
- 'width' => '50px',
165
- 'required' => true,
166
- ));
167
-
168
-
169
- $form->setFieldNameSuffix('design');
170
- if ( Mage::getSingleton('adminhtml/session')->getTwitterData() )
171
- {
172
- $_data = Mage::getSingleton('adminhtml/session')->getTwitterData();
173
- $_data['store'] = $_store;
174
- $form->setValues($_data);
175
- Mage::getSingleton('adminhtml/session')->setTwitterData(null);
176
- } elseif ( Mage::registry('twitter_data') ) {
177
- $_data = Mage::registry('twitter_data')->getData();
178
- $_data['store'] = $_store;
179
- $form->setValues($_data);
180
- }
181
- return parent::_prepareForm();
182
- }
183
-
184
- protected function getCmsPages(){
185
- $pages = array();
186
- $collection = Mage::getModel('cms/page')->getCollection();
187
- foreach ($collection as $_page){
188
- $pages[] = array('value'=>$_page->getId(),'label'=>$_page->getTitle());
189
- }
190
- $pages[] = array('value'=>'777','label'=> 'Categories');
191
- $pages[] = array('value'=>'555','label'=> 'Products');
192
- return $pages;
193
- }
194
-
195
-
196
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/Twitter/Block/Adminhtml/Twitter/Edit/Tabs.php DELETED
@@ -1,59 +0,0 @@
1
- <?php
2
- /**
3
- * BelVG LLC.
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the EULA
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
11
- *
12
- /***************************************
13
- * MAGENTO EDITION USAGE NOTICE *
14
- *****************************************/
15
- /* This package designed for Magento COMMUNITY edition
16
- * BelVG does not guarantee correct work of this extension
17
- * on any other Magento edition except Magento COMMUNITY edition.
18
- * BelVG does not provide extension support in case of
19
- * incorrect edition usage.
20
- /***************************************
21
- * DISCLAIMER *
22
- *****************************************/
23
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
24
- * versions in the future.
25
- *****************************************************
26
- * @category Belvg
27
- * @package Belvg_Twitterconnect
28
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
29
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
30
- */?>
31
- <?php
32
-
33
- class Belvg_Twitter_Block_Adminhtml_Twitter_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
34
- {
35
-
36
- public function __construct()
37
- {
38
- parent::__construct();
39
- $this->setId('twitter_tabs');
40
- $this->setDestElementId('edit_form');
41
- $this->setTitle(Mage::helper('twitter')->__('Item Information'));
42
- }
43
-
44
- protected function _beforeToHtml()
45
- {
46
- $this->addTab('form_section', array(
47
- 'label' => Mage::helper('twitter')->__('Item Information'),
48
- 'title' => Mage::helper('twitter')->__('Item Information'),
49
- 'content' => $this->getLayout()->createBlock('twitter/adminhtml_twitter_edit_tab_form')->toHtml(),
50
- ));
51
- $this->addTab('settings_section', array(
52
- 'label' => Mage::helper('twitter')->__('Item Settings'),
53
- 'title' => Mage::helper('twitter')->__('Item InforSettingsmation'),
54
- 'content' => $this->getLayout()->createBlock('twitter/adminhtml_twitter_edit_tab_settings')->toHtml(),
55
- ));
56
-
57
- return parent::_beforeToHtml();
58
- }
59
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/Twitter/Block/Adminhtml/Twitter/Grid.php DELETED
@@ -1,148 +0,0 @@
1
- <?php
2
- /**
3
- * BelVG LLC.
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the EULA
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
11
- *
12
- /***************************************
13
- * MAGENTO EDITION USAGE NOTICE *
14
- *****************************************/
15
- /* This package designed for Magento COMMUNITY edition
16
- * BelVG does not guarantee correct work of this extension
17
- * on any other Magento edition except Magento COMMUNITY edition.
18
- * BelVG does not provide extension support in case of
19
- * incorrect edition usage.
20
- /***************************************
21
- * DISCLAIMER *
22
- *****************************************/
23
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
24
- * versions in the future.
25
- *****************************************************
26
- * @category Belvg
27
- * @package Belvg_Twitterconnect
28
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
29
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
30
- */?>
31
- <?php
32
-
33
- class Belvg_Twitter_Block_Adminhtml_Twitter_Grid extends Mage_Adminhtml_Block_Widget_Grid
34
- {
35
- public function __construct()
36
- {
37
-
38
- parent::__construct();
39
- $this->setId('twitterGrid');
40
- $this->setDefaultSort('twitter_id');
41
- $this->setDefaultDir('ASC');
42
- $this->setSaveParametersInSession(true);
43
- }
44
-
45
- protected function _prepareCollection()
46
- {
47
- $collection = Mage::getModel('twitter/twitter')->getCollection();
48
- $this->setCollection($collection);
49
- return parent::_prepareCollection();
50
- }
51
-
52
- protected function _prepareColumns()
53
- {
54
- $this->addColumn('twitter_id', array(
55
- 'header' => Mage::helper('twitter')->__('ID'),
56
- 'align' =>'right',
57
- 'width' => '50px',
58
- 'index' => 'twitter_id',
59
- ));
60
-
61
- $this->addColumn('title', array(
62
- 'header' => Mage::helper('twitter')->__('Title'),
63
- 'align' =>'left',
64
- 'index' => 'title',
65
- ));
66
-
67
- /*
68
- $this->addColumn('content', array(
69
- 'header' => Mage::helper('twitter')->__('Item Content'),
70
- 'width' => '150px',
71
- 'index' => 'content',
72
- ));
73
- */
74
-
75
- $this->addColumn('status', array(
76
- 'header' => Mage::helper('twitter')->__('Status'),
77
- 'align' => 'left',
78
- 'width' => '80px',
79
- 'index' => 'status',
80
- 'type' => 'options',
81
- 'options' => array(
82
- 0 => 'Enabled',
83
- 1 => 'Disabled',
84
- ),
85
- ));
86
-
87
- $this->addColumn('action',
88
- array(
89
- 'header' => Mage::helper('twitter')->__('Action'),
90
- 'width' => '100',
91
- 'type' => 'action',
92
- 'getter' => 'getId',
93
- 'actions' => array(
94
- array(
95
- 'caption' => Mage::helper('twitter')->__('Edit'),
96
- 'url' => array('base'=> '*/*/edit/'),
97
- 'field' => 'id'
98
- )
99
- ),
100
- 'filter' => false,
101
- 'sortable' => false,
102
- 'index' => 'stores',
103
- 'is_system' => true,
104
- ));
105
-
106
- $this->addExportType('*/*/exportCsv', Mage::helper('twitter')->__('CSV'));
107
- $this->addExportType('*/*/exportXml', Mage::helper('twitter')->__('XML'));
108
-
109
- return parent::_prepareColumns();
110
- }
111
-
112
- protected function _prepareMassaction()
113
- {
114
- $this->setMassactionIdField('twitter_id');
115
- $this->getMassactionBlock()->setFormFieldName('twitter');
116
-
117
- $this->getMassactionBlock()->addItem('delete', array(
118
- 'label' => Mage::helper('twitter')->__('Delete'),
119
- 'url' => $this->getUrl('*/*/massDelete'),
120
- 'confirm' => Mage::helper('twitter')->__('Are you sure?')
121
- ));
122
-
123
- $statuses = Mage::getSingleton('twitter/status')->getOptionArray();
124
-
125
- array_unshift($statuses, array('label'=>'', 'value'=>''));
126
- $this->getMassactionBlock()->addItem('status', array(
127
- 'label'=> Mage::helper('twitter')->__('Change status'),
128
- 'url' => $this->getUrl('*/*/massStatus', array('_current'=>true)),
129
- 'additional' => array(
130
- 'visibility' => array(
131
- 'name' => 'status',
132
- 'type' => 'select',
133
- 'class' => 'required-entry',
134
- 'label' => Mage::helper('twitter')->__('Status'),
135
- 'values' => $statuses
136
- )
137
- )
138
- ));
139
- return $this;
140
- }
141
-
142
- public function getRowUrl($row)
143
- {
144
- return $this->getUrl('*/*/edit', array('id' => $row->getId()));
145
- }
146
-
147
-
148
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/Twitter/Block/Twitter.php DELETED
@@ -1,88 +0,0 @@
1
- <?php
2
- /**
3
- * BelVG LLC.
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the EULA
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
11
- *
12
- /***************************************
13
- * MAGENTO EDITION USAGE NOTICE *
14
- *****************************************/
15
- /* This package designed for Magento COMMUNITY edition
16
- * BelVG does not guarantee correct work of this extension
17
- * on any other Magento edition except Magento COMMUNITY edition.
18
- * BelVG does not provide extension support in case of
19
- * incorrect edition usage.
20
- /***************************************
21
- * DISCLAIMER *
22
- *****************************************/
23
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
24
- * versions in the future.
25
- *****************************************************
26
- * @category Belvg
27
- * @package Belvg_Twitterconnect
28
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
29
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
30
- */?>
31
- <?php
32
- class Belvg_Twitter_Block_Twitter extends Mage_Core_Block_Template
33
- {
34
- public function _prepareLayout()
35
- {
36
- return parent::_prepareLayout();
37
- }
38
-
39
- public function getTwitter()
40
- {
41
- if (!$this->hasData('twitter')) {
42
- $this->setData('twitter', Mage::registry('twitter'));
43
- }
44
- return $this->getData('twitter');
45
-
46
- }
47
-
48
- public function getSettings(){
49
- $result = array();
50
- $page_id = $this->checkType(Mage::app()->getRequest());
51
- $_data = Mage::getModel('twitter/twitter')->getSettings();
52
-
53
- foreach ($_data as $dt){
54
- if (in_array($page_id, $dt['pages']) and $this->isEnabled($dt) and $this->inStore($dt))
55
- $result[] = $dt;
56
- }
57
- return $result;
58
-
59
- }
60
- protected function checkType($request){
61
- $type = 1;
62
- if ($request->getModuleName() == 'catalog'){
63
- switch ($request->getControllerName()){
64
- case 'category': $type = 777; break;
65
- case 'product': $type = 555; break;
66
- default: break;
67
- }
68
- }elseif($request->getModuleName() == 'cms'){
69
-
70
- if ($request->getParams('page_id'))
71
- $type = $request->getParam('page_id');
72
- if ($request->getControllerName() == 'index' && $request->getActionName() == 'index')
73
- $type = 2;
74
- }
75
- return $type;
76
- }
77
- protected function isEnabled($data){
78
- if ($data['status'] == 0)
79
- return true;
80
- else
81
- return false;
82
- }
83
-
84
- protected function inStore($data){
85
- if ($data['store'] == Mage::app()->getStore()->getId() or $data['store'] == 0) return true;
86
- return false;
87
- }
88
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/Twitter/Block/Twitterbtn.php DELETED
@@ -1,61 +0,0 @@
1
- <?php
2
- /**
3
- * BelVG LLC.
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the EULA
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
11
- *
12
- /***************************************
13
- * MAGENTO EDITION USAGE NOTICE *
14
- *****************************************/
15
- /* This package designed for Magento COMMUNITY edition
16
- * BelVG does not guarantee correct work of this extension
17
- * on any other Magento edition except Magento COMMUNITY edition.
18
- * BelVG does not provide extension support in case of
19
- * incorrect edition usage.
20
- /***************************************
21
- * DISCLAIMER *
22
- *****************************************/
23
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
24
- * versions in the future.
25
- *****************************************************
26
- * @category Belvg
27
- * @package Belvg_Twitterconnect
28
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
29
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
30
- */?>
31
- <?php
32
- class Belvg_Twitter_Block_Twitterbtn extends Mage_Core_Block_Template
33
- {
34
- public function getEnabled(){
35
- if (Mage::getStoreConfig('twitter/tweetbtn/enabled') == 0)
36
- return false;
37
- return true;
38
-
39
- }
40
-
41
- public function getDataCount(){
42
- return Mage::getStoreConfig('twitter/tweetbtn/type');
43
- }
44
-
45
-
46
- public function getDataVia(){
47
- if (Mage::getStoreConfig('twitter/tweetbtn/recommend') != '')
48
- return ' data-via="'.Mage::getStoreConfig('twitter/tweetbtn/recommend').'"';
49
- return '';
50
- }
51
-
52
- public function getDataText(){
53
- if (Mage::getStoreConfig('twitter/tweetbtn/ttext') != '')
54
- return ' data-text="'.Mage::getStoreConfig('twitter/tweetbtn/ttext').'"';
55
- return '';
56
- }
57
-
58
- public function getDataLang(){
59
- return Mage::getStoreConfig('twitter/tweetbtn/lang');
60
- }
61
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/Twitter/Helper/Data.php DELETED
@@ -1,36 +0,0 @@
1
- <?php
2
- /**
3
- * BelVG LLC.
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the EULA
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
11
- *
12
- /***************************************
13
- * MAGENTO EDITION USAGE NOTICE *
14
- *****************************************/
15
- /* This package designed for Magento COMMUNITY edition
16
- * BelVG does not guarantee correct work of this extension
17
- * on any other Magento edition except Magento COMMUNITY edition.
18
- * BelVG does not provide extension support in case of
19
- * incorrect edition usage.
20
- /***************************************
21
- * DISCLAIMER *
22
- *****************************************/
23
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
24
- * versions in the future.
25
- *****************************************************
26
- * @category Belvg
27
- * @package Belvg_Twitterconnect
28
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
29
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
30
- */?>
31
- <?php
32
-
33
- class Belvg_Twitter_Helper_Data extends Mage_Core_Helper_Abstract
34
- {
35
-
36
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/Twitter/Model/Ipad.php DELETED
@@ -1,40 +0,0 @@
1
- <?php
2
- /**
3
- * BelVG LLC.
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the EULA
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
11
- *
12
- /***************************************
13
- * MAGENTO EDITION USAGE NOTICE *
14
- *****************************************/
15
- /* This package designed for Magento COMMUNITY edition
16
- * BelVG does not guarantee correct work of this extension
17
- * on any other Magento edition except Magento COMMUNITY edition.
18
- * BelVG does not provide extension support in case of
19
- * incorrect edition usage.
20
- /***************************************
21
- * DISCLAIMER *
22
- *****************************************/
23
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
24
- * versions in the future.
25
- *****************************************************
26
- * @category Belvg
27
- * @package Belvg_Twitterconnect
28
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
29
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
30
- */?>
31
- <?php
32
-
33
- class Belvg_Twitter_Model_Ipad extends Mage_Core_Model_Abstract
34
- {
35
- public function _construct()
36
- {
37
- parent::_construct();
38
- $this->_init('twitter/ipad');
39
- }
40
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/Twitter/Model/Main.php DELETED
@@ -1,99 +0,0 @@
1
- <?php
2
- /**
3
- * BelVG LLC.
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the EULA
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
11
- *
12
- /***************************************
13
- * MAGENTO EDITION USAGE NOTICE *
14
- *****************************************/
15
- /* This package designed for Magento COMMUNITY edition
16
- * BelVG does not guarantee correct work of this extension
17
- * on any other Magento edition except Magento COMMUNITY edition.
18
- * BelVG does not provide extension support in case of
19
- * incorrect edition usage.
20
- /***************************************
21
- * DISCLAIMER *
22
- *****************************************/
23
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
24
- * versions in the future.
25
- *****************************************************
26
- * @category Belvg
27
- * @package Belvg_Twitterconnect
28
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
29
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
30
- */?>
31
- <?php
32
-
33
- class Belvg_Twitter_Model_Main extends Mage_Core_Model_Abstract
34
- {
35
- protected $_table = 'belvg_twitter_settings';
36
-
37
- public function _construct()
38
- {
39
- parent::_construct();
40
- }
41
-
42
- public function getSettings(){
43
-
44
- $oDb = Mage::getSingleton('core/resource')->getConnection('core_write');
45
- $result = $oDb->query("SELECT * FROM ".$this->_table);
46
- $arr = array();
47
- while ($row = $result->fetch(PDO::FETCH_ASSOC)){
48
- $row['pages'] = explode(",",$row['pages']);
49
- $arr[] = $row;
50
- }
51
- return $arr;
52
- }
53
-
54
- public function saveSettings($aDBInfo){
55
- $aDBInfo['pages'] = implode(",",$aDBInfo['pages']);
56
- $oDb = Mage::getSingleton('core/resource')->getConnection('core_write');
57
- if (Mage::app()->getRequest()->getParam('id'))
58
- $resu = $oDb->update($this->_table,$aDBInfo,array('twitter_id = '.Mage::app()->getRequest()->getParam('id')));
59
- else $oDb->insert($this->_table,$aDBInfo);
60
- return $resu;
61
- }
62
-
63
-
64
- public function checkExist($id){
65
- $_table = 'belvg_twitter_users';
66
- $oDb = Mage::getSingleton('core/resource')->getConnection('core_write');
67
- $result = $oDb->query("SELECT * FROM ".$_table." WHERE twitter_id = ".$id);
68
- $return = false;
69
- while ($row = $result->fetch(PDO::FETCH_ASSOC)){
70
- $return = true;
71
- }
72
- return $return;
73
- }
74
-
75
- public function addTwitterAccount($uid,$tid){
76
- $_table = 'belvg_twitter_users';
77
- $oDb = Mage::getSingleton('core/resource')->getConnection('core_write');
78
- $aDBInfo = array(
79
- 'twitter_id' => $tid,
80
- 'user_id' => $uid,
81
- );
82
- $oDb->insert($_table,$aDBInfo);
83
- }
84
-
85
-
86
- public function getTwitterRel($id){
87
- $_table = 'belvg_twitter_users';
88
- $oDb = Mage::getSingleton('core/resource')->getConnection('core_write');
89
- $result = $oDb->query("SELECT * FROM ".$_table." WHERE twitter_id = ".$id);
90
- $return = array();
91
- while ($row = $result->fetch(PDO::FETCH_ASSOC)){
92
- $return = $row;
93
- }
94
- return $return;
95
- }
96
-
97
-
98
-
99
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/Twitter/Model/Mysql4/Twitter.php DELETED
@@ -1,40 +0,0 @@
1
- <?php
2
- /**
3
- * BelVG LLC.
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the EULA
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
11
- *
12
- /***************************************
13
- * MAGENTO EDITION USAGE NOTICE *
14
- *****************************************/
15
- /* This package designed for Magento COMMUNITY edition
16
- * BelVG does not guarantee correct work of this extension
17
- * on any other Magento edition except Magento COMMUNITY edition.
18
- * BelVG does not provide extension support in case of
19
- * incorrect edition usage.
20
- /***************************************
21
- * DISCLAIMER *
22
- *****************************************/
23
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
24
- * versions in the future.
25
- *****************************************************
26
- * @category Belvg
27
- * @package Belvg_Twitterconnect
28
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
29
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
30
- */?>
31
- <?php
32
-
33
- class Belvg_Twitter_Model_Mysql4_Twitter extends Mage_Core_Model_Mysql4_Abstract
34
- {
35
- public function _construct()
36
- {
37
- // Note that the twitter_id refers to the key field in your database table.
38
- $this->_init('twitter/twitter', 'twitter_id');
39
- }
40
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/Twitter/Model/Mysql4/Twitter/Collection.php DELETED
@@ -1,40 +0,0 @@
1
- <?php
2
- /**
3
- * BelVG LLC.
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the EULA
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
11
- *
12
- /***************************************
13
- * MAGENTO EDITION USAGE NOTICE *
14
- *****************************************/
15
- /* This package designed for Magento COMMUNITY edition
16
- * BelVG does not guarantee correct work of this extension
17
- * on any other Magento edition except Magento COMMUNITY edition.
18
- * BelVG does not provide extension support in case of
19
- * incorrect edition usage.
20
- /***************************************
21
- * DISCLAIMER *
22
- *****************************************/
23
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
24
- * versions in the future.
25
- *****************************************************
26
- * @category Belvg
27
- * @package Belvg_Twitterconnect
28
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
29
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
30
- */?>
31
- <?php
32
-
33
- class Belvg_Twitter_Model_Mysql4_Twitter_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
34
- {
35
- public function _construct()
36
- {
37
- parent::_construct();
38
- $this->_init('twitter/twitter');
39
- }
40
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/Twitter/Model/Source/Btntype.php DELETED
@@ -1,43 +0,0 @@
1
- <?php
2
- /**
3
- * BelVG LLC.
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the EULA
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
11
- *
12
- /***************************************
13
- * MAGENTO EDITION USAGE NOTICE *
14
- *****************************************/
15
- /* This package designed for Magento COMMUNITY edition
16
- * BelVG does not guarantee correct work of this extension
17
- * on any other Magento edition except Magento COMMUNITY edition.
18
- * BelVG does not provide extension support in case of
19
- * incorrect edition usage.
20
- /***************************************
21
- * DISCLAIMER *
22
- *****************************************/
23
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
24
- * versions in the future.
25
- *****************************************************
26
- * @category Belvg
27
- * @package Belvg_Twitterconnect
28
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
29
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
30
- */?>
31
- <?php
32
-
33
- class Belvg_Twitter_Model_Source_Btntype extends Mage_Core_Model_Abstract
34
- {
35
- public function toOptionArray()
36
- {
37
- return array(
38
- array('value'=>'vertical', 'label'=>Mage::helper('twitter')->__('Vertical count')),
39
- array('value'=>'horizontal', 'label'=>Mage::helper('twitter')->__('Horizontal count')),
40
- array('value'=>'none', 'label'=>Mage::helper('twitter')->__('No count'))
41
- );
42
- }
43
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/Twitter/Model/Source/Langtype.php DELETED
@@ -1,47 +0,0 @@
1
- <?php
2
- /**
3
- * BelVG LLC.
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the EULA
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
11
- *
12
- /***************************************
13
- * MAGENTO EDITION USAGE NOTICE *
14
- *****************************************/
15
- /* This package designed for Magento COMMUNITY edition
16
- * BelVG does not guarantee correct work of this extension
17
- * on any other Magento edition except Magento COMMUNITY edition.
18
- * BelVG does not provide extension support in case of
19
- * incorrect edition usage.
20
- /***************************************
21
- * DISCLAIMER *
22
- *****************************************/
23
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
24
- * versions in the future.
25
- *****************************************************
26
- * @category Belvg
27
- * @package Belvg_Twitterconnect
28
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
29
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
30
- */?>
31
- <?php
32
-
33
- class Belvg_Twitter_Model_Source_Langtype extends Mage_Core_Model_Abstract
34
- {
35
- public function toOptionArray()
36
- {
37
- return array(
38
- array('value'=>'en', 'label'=>Mage::helper('twitter')->__('English')),
39
- array('value'=>'fr', 'label'=>Mage::helper('twitter')->__('French')),
40
- array('value'=>'de', 'label'=>Mage::helper('twitter')->__('German')),
41
- array('value'=>'it', 'label'=>Mage::helper('twitter')->__('Italian')),
42
- array('value'=>'es', 'label'=>Mage::helper('twitter')->__('Spanish')),
43
- array('value'=>'ko', 'label'=>Mage::helper('twitter')->__('Korean')),
44
- array('value'=>'ja', 'label'=>Mage::helper('twitter')->__('Japanese'))
45
- );
46
- }
47
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/Twitter/Model/Status.php DELETED
@@ -1,45 +0,0 @@
1
- <?php
2
- /**
3
- * BelVG LLC.
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the EULA
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
11
- *
12
- /***************************************
13
- * MAGENTO EDITION USAGE NOTICE *
14
- *****************************************/
15
- /* This package designed for Magento COMMUNITY edition
16
- * BelVG does not guarantee correct work of this extension
17
- * on any other Magento edition except Magento COMMUNITY edition.
18
- * BelVG does not provide extension support in case of
19
- * incorrect edition usage.
20
- /***************************************
21
- * DISCLAIMER *
22
- *****************************************/
23
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
24
- * versions in the future.
25
- *****************************************************
26
- * @category Belvg
27
- * @package Belvg_Twitterconnect
28
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
29
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
30
- */?>
31
- <?php
32
-
33
- class Belvg_Twitter_Model_Status extends Varien_Object
34
- {
35
- const STATUS_ENABLED = 1;
36
- const STATUS_DISABLED = 2;
37
-
38
- static public function getOptionArray()
39
- {
40
- return array(
41
- self::STATUS_ENABLED => Mage::helper('twitter')->__('Enabled'),
42
- self::STATUS_DISABLED => Mage::helper('twitter')->__('Disabled')
43
- );
44
- }
45
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/Twitter/Model/Twitter.php DELETED
@@ -1,100 +0,0 @@
1
- <?php
2
- /**
3
- * BelVG LLC.
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the EULA
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
11
- *
12
- /***************************************
13
- * MAGENTO EDITION USAGE NOTICE *
14
- *****************************************/
15
- /* This package designed for Magento COMMUNITY edition
16
- * BelVG does not guarantee correct work of this extension
17
- * on any other Magento edition except Magento COMMUNITY edition.
18
- * BelVG does not provide extension support in case of
19
- * incorrect edition usage.
20
- /***************************************
21
- * DISCLAIMER *
22
- *****************************************/
23
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
24
- * versions in the future.
25
- *****************************************************
26
- * @category Belvg
27
- * @package Belvg_Twitterconnect
28
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
29
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
30
- */?>
31
- <?php
32
-
33
- class Belvg_Twitter_Model_Twitter extends Mage_Core_Model_Abstract
34
- {
35
- protected $_table = 'belvg_twitter_settings';
36
-
37
- public function _construct()
38
- {
39
- parent::_construct();
40
- $this->_init('twitter/twitter');
41
- }
42
-
43
- public function getSettings(){
44
-
45
- $oDb = Mage::getSingleton('core/resource')->getConnection('core_write');
46
- $result = $oDb->query("SELECT * FROM ".$this->_table);
47
- $arr = array();
48
- while ($row = $result->fetch(PDO::FETCH_ASSOC)){
49
- $row['pages'] = explode(",",$row['pages']);
50
- $arr[] = $row;
51
- }
52
- return $arr;
53
- }
54
-
55
- public function saveSettings($aDBInfo){
56
- $aDBInfo['pages'] = implode(",",$aDBInfo['pages']);
57
- $oDb = Mage::getSingleton('core/resource')->getConnection('core_write');
58
- if (Mage::app()->getRequest()->getParam('id'))
59
- $resu = $oDb->update($this->_table,$aDBInfo,array('twitter_id = '.Mage::app()->getRequest()->getParam('id')));
60
- else $oDb->insert($this->_table,$aDBInfo);
61
- return $resu;
62
- }
63
-
64
-
65
- public function checkExist($id){
66
- $_table = 'belvg_twitter_users';
67
- $oDb = Mage::getSingleton('core/resource')->getConnection('core_write');
68
- $result = $oDb->query("SELECT * FROM ".$_table." WHERE twitter_id = ".$id);
69
- $return = false;
70
- while ($row = $result->fetch(PDO::FETCH_ASSOC)){
71
- $return = true;
72
- }
73
- return $return;
74
- }
75
-
76
- public function addTwitterAccount($uid,$tid){
77
- $_table = 'belvg_twitter_users';
78
- $oDb = Mage::getSingleton('core/resource')->getConnection('core_write');
79
- $aDBInfo = array(
80
- 'twitter_id' => $tid,
81
- 'user_id' => $uid,
82
- );
83
- $oDb->insert($_table,$aDBInfo);
84
- }
85
-
86
-
87
- public function getTwitterRel($id){
88
- $_table = 'belvg_twitter_users';
89
- $oDb = Mage::getSingleton('core/resource')->getConnection('core_write');
90
- $result = $oDb->query("SELECT * FROM ".$_table." WHERE twitter_id = ".$id);
91
- $return = array();
92
- while ($row = $result->fetch(PDO::FETCH_ASSOC)){
93
- $return = $row;
94
- }
95
- return $return;
96
- }
97
-
98
-
99
-
100
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/Twitter/controllers/AdminController.php DELETED
@@ -1,218 +0,0 @@
1
- <?php
2
- /**
3
- * BelVG LLC.
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the EULA
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
11
- *
12
- /***************************************
13
- * MAGENTO EDITION USAGE NOTICE *
14
- *****************************************/
15
- /* This package designed for Magento COMMUNITY edition
16
- * BelVG does not guarantee correct work of this extension
17
- * on any other Magento edition except Magento COMMUNITY edition.
18
- * BelVG does not provide extension support in case of
19
- * incorrect edition usage.
20
- /***************************************
21
- * DISCLAIMER *
22
- *****************************************/
23
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
24
- * versions in the future.
25
- *****************************************************
26
- * @category Belvg
27
- * @package Belvg_Twitterconnect
28
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
29
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
30
- */?>
31
- <?php
32
-
33
- class Belvg_Twitter_AdminController extends Mage_Adminhtml_Controller_action
34
- {
35
-
36
- protected function _initAction() {
37
- $this->loadLayout()
38
- ->_setActiveMenu('twitter/items')
39
- ->_addBreadcrumb(Mage::helper('adminhtml')->__('Items Manager'), Mage::helper('adminhtml')->__('Item Manager'));
40
-
41
- return $this;
42
- }
43
-
44
- public function indexAction() {
45
- $this->_initAction()
46
- ->renderLayout();
47
- }
48
-
49
- public function settingsAction() {
50
- $this->loadLayout();
51
- $this->_setActiveMenu('twitter/items');
52
-
53
- $this->_addBreadcrumb(Mage::helper('adminhtml')->__('Item Manager'), Mage::helper('adminhtml')->__('Item Manager'));
54
- $this->_addBreadcrumb(Mage::helper('adminhtml')->__('Item News'), Mage::helper('adminhtml')->__('Item News'));
55
-
56
- $this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
57
-
58
- $this->_addContent($this->getLayout()->createBlock('twitter/adminhtml_twitter_edit'))
59
- ->_addLeft($this->getLayout()->createBlock('twitter/adminhtml_twitter_edit_tabs'));
60
-
61
- $this->renderLayout();
62
- }
63
-
64
- public function settings_saveAction() {
65
- $data = $this->getRequest()->getParam('design');
66
- try {
67
- $result = Mage::getModel('twitter/twitter')->saveSettings($data);
68
- if ($result) Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('twitter')->__('Settings successfully saved'));
69
- }catch(Exception $e){
70
- Mage::getSingleton('adminhtml/session')->addError(Mage::helper('twitter')->__('Item does not exist'));
71
- }
72
- $this->_redirect('*/admin/settings/');
73
- }
74
-
75
- public function editAction() {
76
- $id = $this->getRequest()->getParam('id');
77
- $model = Mage::getModel('twitter/twitter')->load($id);
78
-
79
- if ($model->getId() || $id == 0) {
80
- $data = Mage::getSingleton('adminhtml/session')->getFormData(true);
81
- if (!empty($data)) {
82
- $model->setData($data);
83
- }
84
-
85
- Mage::register('twitter_data', $model);
86
-
87
- $this->loadLayout();
88
- $this->_setActiveMenu('twitter/items');
89
-
90
- $this->_addBreadcrumb(Mage::helper('adminhtml')->__('Item Manager'), Mage::helper('adminhtml')->__('Item Manager'));
91
- $this->_addBreadcrumb(Mage::helper('adminhtml')->__('Item News'), Mage::helper('adminhtml')->__('Item News'));
92
-
93
- $this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
94
-
95
- $this->_addContent($this->getLayout()->createBlock('twitter/adminhtml_twitter_edit'))
96
- ->_addLeft($this->getLayout()->createBlock('twitter/adminhtml_twitter_edit_tabs'));
97
-
98
- $this->renderLayout();
99
- } else {
100
- Mage::getSingleton('adminhtml/session')->addError(Mage::helper('twitter')->__('Item does not exist'));
101
- $this->_redirect('*/*/');
102
- }
103
- }
104
-
105
- public function newAction() {
106
- $this->_forward('edit');
107
- }
108
-
109
- public function saveAction() {
110
- $data = $this->getRequest()->getParam('design');
111
- try {
112
- $result = Mage::getModel('twitter/twitter')->saveSettings($data);
113
- if ($result) Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('twitter')->__('Settings successfully saved'));
114
- }catch(Exception $e){
115
- Mage::getSingleton('adminhtml/session')->addError(Mage::helper('twitter')->__('Item does not exist'));
116
- }
117
- $this->_redirect('*/*/');
118
- }
119
-
120
-
121
- public function deleteAction() {
122
- if( $this->getRequest()->getParam('id') > 0 ) {
123
- try {
124
- $model = Mage::getModel('twitter/twitter');
125
-
126
- $model->setId($this->getRequest()->getParam('id'))
127
- ->delete();
128
-
129
- Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Item was successfully deleted'));
130
- $this->_redirect('*/*/');
131
- } catch (Exception $e) {
132
- Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
133
- $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
134
- }
135
- }
136
- $this->_redirect('*/*/');
137
- }
138
-
139
- public function massDeleteAction() {
140
- $twitterIds = $this->getRequest()->getParam('twitter');
141
- if(!is_array($twitterIds)) {
142
- Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Please select item(s)'));
143
- } else {
144
- try {
145
- foreach ($twitterIds as $twitterId) {
146
- $twitter = Mage::getModel('twitter/twitter')->load($twitterId);
147
- $twitter->delete();
148
- }
149
- Mage::getSingleton('adminhtml/session')->addSuccess(
150
- Mage::helper('adminhtml')->__(
151
- 'Total of %d record(s) were successfully deleted', count($twitterIds)
152
- )
153
- );
154
- } catch (Exception $e) {
155
- Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
156
- }
157
- }
158
- $this->_redirect('*/*/index');
159
- }
160
-
161
- public function massStatusAction()
162
- {
163
- $twitterIds = $this->getRequest()->getParam('twitter');
164
- if(!is_array($twitterIds)) {
165
- Mage::getSingleton('adminhtml/session')->addError($this->__('Please select item(s)'));
166
- } else {
167
- try {
168
- foreach ($twitterIds as $twitterId) {
169
- $twitter = Mage::getSingleton('twitter/twitter')
170
- ->load($twitterId)
171
- ->setStatus($this->getRequest()->getParam('status'))
172
- ->setIsMassupdate(true)
173
- ->save();
174
- }
175
- $this->_getSession()->addSuccess(
176
- $this->__('Total of %d record(s) were successfully updated', count($twitterIds))
177
- );
178
- } catch (Exception $e) {
179
- $this->_getSession()->addError($e->getMessage());
180
- }
181
- }
182
- $this->_redirect('*/*/index');
183
- }
184
-
185
- public function exportCsvAction()
186
- {
187
- $fileName = 'twitter.csv';
188
- $content = $this->getLayout()->createBlock('twitter/adminhtml_twitter_grid')
189
- ->getCsv();
190
-
191
- $this->_sendUploadResponse($fileName, $content);
192
- }
193
-
194
- public function exportXmlAction()
195
- {
196
- $fileName = 'twitter.xml';
197
- $content = $this->getLayout()->createBlock('twitter/adminhtml_twitter_grid')
198
- ->getXml();
199
-
200
- $this->_sendUploadResponse($fileName, $content);
201
- }
202
-
203
- protected function _sendUploadResponse($fileName, $content, $contentType='application/octet-stream')
204
- {
205
- $response = $this->getResponse();
206
- $response->setHeader('HTTP/1.1 200 OK','');
207
- $response->setHeader('Pragma', 'public', true);
208
- $response->setHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0', true);
209
- $response->setHeader('Content-Disposition', 'attachment; filename='.$fileName);
210
- $response->setHeader('Last-Modified', date('r'));
211
- $response->setHeader('Accept-Ranges', 'bytes');
212
- $response->setHeader('Content-Length', strlen($content));
213
- $response->setHeader('Content-type', $contentType);
214
- $response->setBody($content);
215
- $response->sendResponse();
216
- die;
217
- }
218
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/Twitter/controllers/IndexController.php DELETED
@@ -1,45 +0,0 @@
1
- <?php
2
- /**
3
- * BelVG LLC.
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the EULA
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
11
- *
12
- /***************************************
13
- * MAGENTO EDITION USAGE NOTICE *
14
- *****************************************/
15
- /* This package designed for Magento COMMUNITY edition
16
- * BelVG does not guarantee correct work of this extension
17
- * on any other Magento edition except Magento COMMUNITY edition.
18
- * BelVG does not provide extension support in case of
19
- * incorrect edition usage.
20
- /***************************************
21
- * DISCLAIMER *
22
- *****************************************/
23
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
24
- * versions in the future.
25
- *****************************************************
26
- * @category Belvg
27
- * @package Belvg_Twitterconnect
28
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
29
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
30
- */?>
31
- <?php
32
- class Belvg_Twitter_IndexController extends Mage_Core_Controller_Front_Action
33
- {
34
- public function indexAction(){
35
- $this->loadLayout();
36
- $this->renderLayout();
37
- }
38
- public function ipadAction(){
39
- $this->loadLayout();
40
- $this->getLayout()->getBlock('root')->setTemplate('page/ipad.phtml');
41
- $ipadBlock = $this->getLayout()->createBlock('twitter/ipad')->setTemplate('twitter/ipad.phtml');
42
- $this->getLayout()->getBlock('content')->append($ipadBlock);
43
- $this->renderLayout();
44
- }
45
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/Twitter/controllers/UserController.php DELETED
@@ -1,181 +0,0 @@
1
- <?php
2
- /**
3
- * BelVG LLC.
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the EULA
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
11
- *
12
- /***************************************
13
- * MAGENTO EDITION USAGE NOTICE *
14
- *****************************************/
15
- /* This package designed for Magento COMMUNITY edition
16
- * BelVG does not guarantee correct work of this extension
17
- * on any other Magento edition except Magento COMMUNITY edition.
18
- * BelVG does not provide extension support in case of
19
- * incorrect edition usage.
20
- /***************************************
21
- * DISCLAIMER *
22
- *****************************************/
23
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
24
- * versions in the future.
25
- *****************************************************
26
- * @category Belvg
27
- * @package Belvg_Twitterconnect
28
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
29
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
30
- */?>
31
- <?php
32
-
33
-
34
-
35
-
36
- class Belvg_Twitter_UserController extends Mage_Core_Controller_Front_Action
37
- {
38
-
39
- private $consumer_key;
40
- private $consumer_secret;
41
- private $oauth_callback;
42
-
43
- public function _init(){
44
- $this->consumer_secret = Mage::getStoreConfig('twitter/userauth/conssecret');
45
- $this->consumer_key = Mage::getStoreConfig('twitter/userauth/conskey');
46
- $this->oauth_callback = Mage::getStoreConfig('twitter/userauth/oauthcallback');
47
- require_once(getcwd().'/lib/twitteroauth/twitteroauth.php');
48
- }
49
-
50
- public function indexAction(){
51
- $this->loadLayout();
52
- $this->renderLayout();
53
- }
54
-
55
- public function loginAction(){
56
- $this->_init();
57
- if (empty($_SESSION['access_token']) || empty($_SESSION['access_token']['oauth_token']) || empty($_SESSION['access_token']['oauth_token_secret'])) {
58
- $this->_redirect('*/*/clearsession/');
59
- }
60
- /* Get user access tokens out of the session. */
61
- $access_token = $_SESSION['access_token'];
62
-
63
- /* Create a TwitterOauth object with consumer/user tokens. */
64
- $connection = new TwitterOAuth($this->consumer_key, $this->consumer_secret, $access_token['oauth_token'], $access_token['oauth_token_secret']);
65
-
66
- /* If method is set change API call made. Test is called by default. */
67
- $content = $connection->get('account/verify_credentials');
68
- if ($content->id){
69
- $this->userLog($content);
70
- echo '<script>window.opener.location.href=window.opener.location .href;
71
- window.opener.focus();
72
- window.close();</script>';
73
- }
74
-
75
- }
76
-
77
- public function clearsessionAction(){
78
- //unset($_SESSION['access_token']);
79
- $this->_redirect('*/*/connect/');
80
- }
81
-
82
- public function connectAction(){
83
- $this->_init();
84
- if ($this->consumer_key === '' || $this->consumer_secret === '') {
85
- echo 'You need a consumer key and secret to test the sample code. Get one from <a href="https://twitter.com/apps">https://twitter.com/apps</a>';
86
- exit;
87
- }
88
-
89
- $connection = new TwitterOAuth($this->consumer_key, $this->consumer_secret);
90
-
91
- /* Get temporary credentials. */
92
- $request_token = $connection->getRequestToken();
93
- /* Save temporary credentials to session. */
94
- $_SESSION['oauth_token'] = $token = $request_token['oauth_token'];
95
- $_SESSION['oauth_token_secret'] = $request_token['oauth_token_secret'];
96
-
97
- /* If last connection failed don't display authorization link. */
98
- switch ($connection->http_code) {
99
- case 200:
100
- /* Build authorize URL and redirect user to Twitter. */
101
- $url = $connection->getAuthorizeURL($token);
102
- $this->_redirectUrl($url);
103
- break;
104
- default:
105
- /* Show notification if something went wrong. */
106
- echo 'Could not connect to Twitter. Refresh the page or try again later.';
107
- }
108
- }
109
-
110
- public function callbackAction(){
111
- $this->_init();
112
- /* If the oauth_token is old redirect to the connect page. */
113
- if (isset($_REQUEST['oauth_token']) && $_SESSION['oauth_token'] !== $_REQUEST['oauth_token']) {
114
- $_SESSION['oauth_status'] = 'oldtoken';
115
- $this->_redirect('*/*/clearsession/');
116
- }
117
-
118
- /* Create TwitteroAuth object with app key/secret and token key/secret from default phase */
119
- $connection = new TwitterOAuth($this->consumer_key, $this->consumer_secret, $_SESSION['oauth_token'], $_SESSION['oauth_token_secret']);
120
-
121
- /* Request access tokens from twitter */
122
- $access_token = $connection->getAccessToken($_REQUEST['oauth_verifier']);
123
-
124
- /* Save the access tokens. Normally these would be saved in a database for future use. */
125
- $_SESSION['access_token'] = $access_token;
126
-
127
- /* Remove no longer needed request tokens */
128
- unset($_SESSION['oauth_token']);
129
- unset($_SESSION['oauth_token_secret']);
130
-
131
- /* If HTTP response is 200 continue otherwise send to connect page to retry */
132
- if (200 == $connection->http_code) {
133
- /* The user has been verified and the access tokens can be saved for future use */
134
- $_SESSION['status'] = 'verified';
135
- $this->_redirect('*/*/login/');
136
- } else {
137
- /* Save HTTP status for error dialog on connnect page.*/
138
- $this->_redirect('*/*/clearsession/');
139
- }
140
- }
141
-
142
- private function userLog($_data){
143
- $result = Mage::getModel('twitter/main')->checkExist($_data->id);
144
- if (!$result)
145
- $this->createTwitterUser($_data);
146
- else
147
- $this->loginTwitterUser($_data);
148
-
149
- }
150
-
151
- private function createTwitterUser($_data){
152
- $customer = Mage::getModel('customer/customer');
153
- $password = '';
154
- $email = $_data->screen_name;
155
-
156
- $customer->setWebsiteId(Mage::app()->getWebsite()->getId());
157
- $customer->setEmail($email);
158
- $customer->setFirstname($_data->name);
159
- $customer->setLastname('');
160
- $customer->setPassword($password);
161
- try {
162
- $customer->save();
163
- $customer->setConfirmation(null);
164
- $customer->save();
165
- Mage::getModel('twitter/main')->addTwitterAccount($customer->getId(),$_data->id);
166
- Mage::getSingleton('customer/session')->loginById($customer->getId());
167
- }
168
- catch (Exception $ex) {
169
- echo $ex->getMessage();die;
170
- }
171
- }
172
-
173
- private function loginTwitterUser($_data){
174
- $rel = Mage::getModel('twitter/main')->getTwitterRel($_data->id);
175
- if ($rel['user_id'])
176
- Mage::getSingleton('customer/session')->loginById($rel['user_id']);
177
- else
178
- $this->createTwitterUser ($_data);
179
- }
180
-
181
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/Twitter/etc/adminhtml.xml DELETED
@@ -1,57 +0,0 @@
1
- <?xml version="1.0"?>
2
- <!--
3
- /**
4
- * BelVG LLC.
5
- *
6
- * NOTICE OF LICENSE
7
- *
8
- * This source file is subject to the EULA
9
- * that is bundled with this package in the file LICENSE.txt.
10
- * It is also available through the world-wide-web at this URL:
11
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
12
- *
13
- /***************************************
14
- * MAGENTO EDITION USAGE NOTICE *
15
- *****************************************/
16
- /* This package designed for Magento COMMUNITY edition
17
- * BelVG does not guarantee correct work of this extension
18
- * on any other Magento edition except Magento COMMUNITY edition.
19
- * BelVG does not provide extension support in case of
20
- * incorrect edition usage.
21
- /***************************************
22
- * DISCLAIMER *
23
- *****************************************/
24
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
25
- * versions in the future.
26
- *****************************************************
27
- * @category Belvg
28
- * @package Belvg_Twitterconnect
29
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
30
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
31
- */
32
- -->
33
-
34
- <config>
35
- <acl>
36
- <resources>
37
- <all>
38
- <title>Allow Everything</title>
39
- </all>
40
- <admin>
41
- <children>
42
- <system>
43
- <children>
44
- <config>
45
- <children>
46
- <twitter translate="title">
47
- <title>Twitter</title>
48
- </twitter>
49
- </children>
50
- </config>
51
- </children>
52
- </system>
53
- </children>
54
- </admin>
55
- </resources>
56
- </acl>
57
- </config>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/Twitter/etc/config.xml DELETED
@@ -1,169 +0,0 @@
1
- <?xml version="1.0"?>
2
- <!--
3
- /**
4
- * BelVG LLC.
5
- *
6
- * NOTICE OF LICENSE
7
- *
8
- * This source file is subject to the EULA
9
- * that is bundled with this package in the file LICENSE.txt.
10
- * It is also available through the world-wide-web at this URL:
11
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
12
- *
13
- /***************************************
14
- * MAGENTO EDITION USAGE NOTICE *
15
- *****************************************/
16
- /* This package designed for Magento COMMUNITY edition
17
- * BelVG does not guarantee correct work of this extension
18
- * on any other Magento edition except Magento COMMUNITY edition.
19
- * BelVG does not provide extension support in case of
20
- * incorrect edition usage.
21
- /***************************************
22
- * DISCLAIMER *
23
- *****************************************/
24
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
25
- * versions in the future.
26
- *****************************************************
27
- * @category Belvg
28
- * @package Belvg_Twitterconnect
29
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
30
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
31
- */-->
32
- <config>
33
- <modules>
34
- <Belvg_Twitter>
35
- <version>1.1.7</version>
36
- </Belvg_Twitter>
37
- </modules>
38
- <frontend>
39
- <routers>
40
- <twitter>
41
- <use>standard</use>
42
- <args>
43
- <module>Belvg_Twitter</module>
44
- <frontName>twitter</frontName>
45
- </args>
46
- </twitter>
47
- </routers>
48
- <layout>
49
- <updates>
50
- <twitter>
51
- <file>FB-Twitter-Connect.xml</file>
52
- </twitter>
53
- </updates>
54
- </layout>
55
- </frontend>
56
- <admin>
57
- <routers>
58
- <twitter>
59
- <use>admin</use>
60
- <args>
61
- <module>Belvg_Twitter</module>
62
- <frontName>twitter</frontName>
63
- </args>
64
- </twitter>
65
- </routers>
66
- </admin>
67
- <adminhtml>
68
- <layout>
69
- <updates>
70
- <twitter>
71
- <file>twitter.xml</file>
72
- </twitter>
73
- </updates>
74
- </layout>
75
- <menu>
76
- <cms translate="title" module="cms">
77
- <children>
78
- <twitter translate="title">
79
- <title>Twitter</title>
80
- <children>
81
- <twitter_tweets translate="title">
82
- <title>Accounts</title>
83
- <action>twitter/admin/index</action>
84
- <sort_order>100</sort_order>
85
- </twitter_tweets>
86
- </children>
87
-
88
- </twitter>
89
- </children>
90
- </cms>
91
-
92
- </menu>
93
- <acl>
94
- <resources>
95
- <all>
96
- <title>Allow Everything</title>
97
- </all>
98
- <admin>
99
- <children>
100
- <twitter>
101
- <title>Twitter Module</title>
102
- <sort_order>200</sort_order>
103
- </twitter>
104
- </children>
105
- </admin>
106
- </resources>
107
- </acl>
108
- </adminhtml>
109
- <global>
110
- <rewrite>
111
- <twitter_index_ipad>
112
- <from><![CDATA[#^/ipad/#]]></from>
113
- <to>/twitter/index/ipad/</to>
114
- </twitter_index_ipad>
115
- <twitter_admin>
116
- <from><![CDATA[#^/twitter_admin/#]]></from>
117
- <to>/twitter/admin/</to>
118
- </twitter_admin>
119
- <twitter_index_ipad>
120
- <from><![CDATA[#^/ipad#]]></from>
121
- <to>/twitter/index/ipad/</to>
122
- </twitter_index_ipad>
123
- </rewrite>
124
- <models>
125
- <twitter>
126
- <class>Belvg_Twitter_Model</class>
127
- <resourceModel>twitter_mysql4</resourceModel>
128
- </twitter>
129
- <twitter_mysql4>
130
- <class>Belvg_Twitter_Model_Mysql4</class>
131
- <entities>
132
- <twitter>
133
- <table>belvg_twitter_settings</table>
134
- </twitter>
135
- </entities>
136
- </twitter_mysql4>
137
- </models>
138
- <resources>
139
- <twitter_setup>
140
- <setup>
141
- <module>Belvg_Twitter</module>
142
- </setup>
143
- <connection>
144
- <use>core_setup</use>
145
- </connection>
146
- </twitter_setup>
147
- <twitter_write>
148
- <connection>
149
- <use>core_write</use>
150
- </connection>
151
- </twitter_write>
152
- <twitter_read>
153
- <connection>
154
- <use>core_read</use>
155
- </connection>
156
- </twitter_read>
157
- </resources>
158
- <blocks>
159
- <twitter>
160
- <class>Belvg_Twitter_Block</class>
161
- </twitter>
162
- </blocks>
163
- <helpers>
164
- <twitter>
165
- <class>Belvg_Twitter_Helper</class>
166
- </twitter>
167
- </helpers>
168
- </global>
169
- </config>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/Twitter/etc/system.xml DELETED
@@ -1,200 +0,0 @@
1
- <?xml version="1.0"?>
2
- <!--
3
- /**
4
- * BelVG LLC.
5
- *
6
- * NOTICE OF LICENSE
7
- *
8
- * This source file is subject to the EULA
9
- * that is bundled with this package in the file LICENSE.txt.
10
- * It is also available through the world-wide-web at this URL:
11
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
12
- *
13
- /***************************************
14
- * MAGENTO EDITION USAGE NOTICE *
15
- *****************************************/
16
- /* This package designed for Magento COMMUNITY edition
17
- * BelVG does not guarantee correct work of this extension
18
- * on any other Magento edition except Magento COMMUNITY edition.
19
- * BelVG does not provide extension support in case of
20
- * incorrect edition usage.
21
- /***************************************
22
- * DISCLAIMER *
23
- *****************************************/
24
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
25
- * versions in the future.
26
- *****************************************************
27
- * @category Belvg
28
- * @package Belvg_Twitterconnect
29
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
30
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
31
- */-->
32
-
33
- <config>
34
- <sections>
35
- <twitter translate="label">
36
- <label>Twitter</label>
37
- <tab>belvg</tab>
38
- <frontend_type>text</frontend_type>
39
- <sort_order>1000</sort_order>
40
- <show_in_default>1</show_in_default>
41
- <show_in_website>1</show_in_website>
42
- <show_in_store>1</show_in_store>
43
- <groups>
44
- <settings translate="label">
45
- <label>Settings</label>
46
- <frontend_type>text</frontend_type>
47
- <sort_order>100</sort_order>
48
- <show_in_default>1</show_in_default>
49
- <show_in_website>1</show_in_website>
50
- <show_in_store>1</show_in_store>
51
- <comment>
52
- <![CDATA[
53
- <div style="padding:10px;background-color:#fff;border:1px solid #ddd;margin-bottom:7px;">
54
- This module was developed by <a href="http://www.belvg.com" target="_blank">www.BelVG.com</a>.
55
- For docs & examples refer to the BelVG <a href="http://www.belvg.com" target="_blank">web site</a>.
56
- <br/>We have the largest selections of <a href="http://store.belvg.com/extensions.html" target="_blank">extensions</a> and <a href="http://store.belvg.com/themes.html" target="_blank">themes</a> on Magento.
57
- </div>
58
- ]]>
59
- </comment>
60
- <fields>
61
- <enabled translate="label comment">
62
- <label>Enabled</label>
63
- <!-- <comment><![CDATA[]]></comment> -->
64
- <frontend_type>select</frontend_type>
65
- <source_model>adminhtml/system_config_source_enabledisable</source_model>
66
- <sort_order>10</sort_order>
67
- <show_in_default>1</show_in_default>
68
- <show_in_website>1</show_in_website>
69
- <show_in_store>1</show_in_store>
70
- </enabled>
71
- </fields>
72
- </settings>
73
- <tweetbtn translate="label">
74
- <label>Tweet Button Settings</label>
75
- <frontend_type>text</frontend_type>
76
- <sort_order>110</sort_order>
77
- <show_in_default>1</show_in_default>
78
- <show_in_website>1</show_in_website>
79
- <show_in_store>1</show_in_store>
80
- <comment>
81
- <![CDATA[
82
- ]]>
83
- </comment>
84
- <fields>
85
- <enabled translate="label comment">
86
- <label>Enabled</label>
87
- <!-- <comment><![CDATA[]]></comment> -->
88
- <frontend_type>select</frontend_type>
89
- <source_model>adminhtml/system_config_source_enabledisable</source_model>
90
- <sort_order>9</sort_order>
91
- <show_in_default>1</show_in_default>
92
- <show_in_website>1</show_in_website>
93
- <show_in_store>1</show_in_store>
94
- </enabled>
95
- <type translate="label comment">
96
- <label>Button type</label>
97
- <!-- <comment><![CDATA[]]></comment> -->
98
- <frontend_type>select</frontend_type>
99
- <source_model>twitter/source_btntype</source_model>
100
- <sort_order>10</sort_order>
101
- <show_in_default>1</show_in_default>
102
- <show_in_website>1</show_in_website>
103
- <show_in_store>1</show_in_store>
104
- </type>
105
- <recommend translate="label comment">
106
- <label>Recommend people to follow</label>
107
- <comment><![CDATA[
108
- Recommend Twitter account for user to follow after they share content from your website.
109
- ]]>
110
- </comment>
111
- <frontend_type>text</frontend_type>
112
- <!-- <source_model>twitter/source_btntype</source_model>-->
113
- <sort_order>11</sort_order>
114
- <show_in_default>1</show_in_default>
115
- <show_in_website>1</show_in_website>
116
- <show_in_store>1</show_in_store>
117
- </recommend>
118
- <ttext translate="label comment">
119
- <label>Tweet text</label>
120
- <comment><![CDATA[
121
- This is the text that people will include in their Tweet when they share from your website.If you want to use the title of the page the button is on ,leave this field empty.
122
- ]]>
123
- </comment>
124
- <frontend_type>text</frontend_type>
125
- <!-- <source_model>twitter/source_btntype</source_model>-->
126
- <sort_order>12</sort_order>
127
- <show_in_default>1</show_in_default>
128
- <show_in_website>1</show_in_website>
129
- <show_in_store>1</show_in_store>
130
- </ttext>
131
- <lang translate="label comment">
132
- <label>Language</label>
133
- <comment><![CDATA[
134
- ]]>
135
- </comment>
136
- <frontend_type>select</frontend_type>
137
- <source_model>twitter/source_langtype</source_model>
138
- <sort_order>13</sort_order>
139
- <show_in_default>1</show_in_default>
140
- <show_in_website>1</show_in_website>
141
- <show_in_store>1</show_in_store>
142
- </lang>
143
-
144
- </fields>
145
- </tweetbtn>
146
- <userauth translate="label">
147
- <label>User Login Settings</label>
148
- <frontend_type>text</frontend_type>
149
- <sort_order>120</sort_order>
150
- <show_in_default>1</show_in_default>
151
- <show_in_website>1</show_in_website>
152
- <show_in_store>1</show_in_store>
153
- <comment>
154
- <![CDATA[
155
- ]]>
156
- </comment>
157
- <fields>
158
- <enabled translate="label comment">
159
- <label>Enabled</label>
160
- <!-- <comment><![CDATA[]]></comment> -->
161
- <frontend_type>select</frontend_type>
162
- <source_model>adminhtml/system_config_source_enabledisable</source_model>
163
- <sort_order>9</sort_order>
164
- <show_in_default>1</show_in_default>
165
- <show_in_website>1</show_in_website>
166
- <show_in_store>1</show_in_store>
167
- </enabled>
168
- <conskey translate="label comment">
169
- <label>Consumer key</label>
170
- <!-- <comment><![CDATA[]]></comment> -->
171
- <frontend_type>text</frontend_type>
172
- <sort_order>10</sort_order>
173
- <show_in_default>1</show_in_default>
174
- <show_in_website>1</show_in_website>
175
- <show_in_store>1</show_in_store>
176
- </conskey>
177
- <conssecret translate="label comment">
178
- <label>Consumer secret</label>
179
- <!-- <comment><![CDATA[]]></comment> -->
180
- <frontend_type>text</frontend_type>
181
- <sort_order>11</sort_order>
182
- <show_in_default>1</show_in_default>
183
- <show_in_website>1</show_in_website>
184
- <show_in_store>1</show_in_store>
185
- </conssecret>
186
- <oauthcallback translate="label comment">
187
- <label>oAuth callback</label>
188
- <!-- <comment><![CDATA[]]></comment> -->
189
- <frontend_type>text</frontend_type>
190
- <sort_order>12</sort_order>
191
- <show_in_default>1</show_in_default>
192
- <show_in_website>1</show_in_website>
193
- <show_in_store>1</show_in_store>
194
- </oauthcallback>
195
- </fields>
196
- </userauth>
197
- </groups>
198
- </twitter>
199
- </sections>
200
- </config>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Belvg/Twitter/sql/twitter_setup/mysql4-install-1.1.7.php DELETED
@@ -1,77 +0,0 @@
1
- <?php
2
- /**
3
- * BelVG LLC.
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the EULA
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
11
- *
12
- /***************************************
13
- * MAGENTO EDITION USAGE NOTICE *
14
- *****************************************/
15
- /* This package designed for Magento COMMUNITY edition
16
- * BelVG does not guarantee correct work of this extension
17
- * on any other Magento edition except Magento COMMUNITY edition.
18
- * BelVG does not provide extension support in case of
19
- * incorrect edition usage.
20
- /***************************************
21
- * DISCLAIMER *
22
- *****************************************/
23
- /* Do not edit or add to this file if you wish to upgrade Magento to newer
24
- * versions in the future.
25
- *****************************************************
26
- * @category Belvg
27
- * @package Belvg_Twitterconnect
28
- * @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
29
- * @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
30
- */?>
31
- <?php
32
-
33
- $installer = $this;
34
-
35
- $installer->startSetup();
36
-
37
- $installer->run("
38
- CREATE TABLE IF NOT EXISTS {$this->getTable('belvg_twitter_settings')} (
39
- `user_name` varchar(111) character set utf8 NOT NULL,
40
- `title` varchar(111) character set utf8 NOT NULL,
41
- `subject` varchar(111) character set utf8 NOT NULL,
42
- `width` int(11) NOT NULL,
43
- `height` int(11) NOT NULL,
44
- `shell_bg` varchar(111) character set utf8 NOT NULL,
45
- `shell_color` varchar(111) character set utf8 NOT NULL,
46
- `tweets_bg` varchar(111) character set utf8 NOT NULL,
47
- `tweets_color` varchar(111) character set utf8 NOT NULL,
48
- `tweets_link` varchar(111) character set utf8 NOT NULL,
49
- `position` int(11) NOT NULL,
50
- `pages` varchar(1111) character set utf8 NOT NULL,
51
- `status` int(11) NOT NULL,
52
- `store` int(11) NOT NULL,
53
- `twitter_id` int(11) NOT NULL auto_increment,
54
- `type` varchar(111) character set utf8 NOT NULL,
55
- `interval` int(11) NOT NULL,
56
- `timestamp` varchar(111) NOT NULL,
57
- `avatars` varchar(111) NOT NULL,
58
- `hashtags` varchar(111) NOT NULL,
59
- `scrollbar` varchar(111) NOT NULL,
60
- PRIMARY KEY (`twitter_id`)
61
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
62
-
63
-
64
- CREATE TABLE IF NOT EXISTS `{$this->getTable('belvg_twitter_users')}` (
65
- `id` int(11) NOT NULL AUTO_INCREMENT,
66
- `twitter_id` int(11) NOT NULL,
67
- `user_id` int(11) unsigned NOT NULL,
68
- PRIMARY KEY (`id`),
69
- UNIQUE KEY `user_id` (`user_id`)
70
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
71
-
72
-
73
- ALTER TABLE `{$this->getTable('belvg_twitter_users')}`
74
- ADD CONSTRAINT `belvg_twitter_users_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `{$this->getTable('customer_entity')}` (`entity_id`) ON DELETE CASCADE;
75
- ");
76
-
77
- $installer->endSetup();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/etc/modules/Belvg_FacebookFree.xml CHANGED
@@ -35,7 +35,7 @@
35
  <Belvg_FaceboookFree>
36
  <active>true</active>
37
  <codePool>community</codePool>
38
- <version>1.0.2</version>
39
  </Belvg_FaceboookFree>
40
  </modules>
41
  </config>
35
  <Belvg_FaceboookFree>
36
  <active>true</active>
37
  <codePool>community</codePool>
38
+ <version>1.0.1</version>
39
  </Belvg_FaceboookFree>
40
  </modules>
41
  </config>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>facebookfreebelvg</name>
4
- <version>1.0.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt">BelVG EULA</license>
7
  <channel>community</channel>
@@ -11,8 +11,8 @@
11
  <notes>Please, feel free to contact us at store@belvg.com</notes>
12
  <authors><author><name>Belvg</name><user>auto-converted</user><email>store@belvg.com</email></author></authors>
13
  <date>2011-10-28</date>
14
- <time>16:30:09</time>
15
- <contents><target name="magecommunity"><dir name="Belvg"><dir name="All"><dir name="Helper"><file name="Data.php" hash="c508c83bfba72a300592b1b373f41758"/></dir><dir name="etc"><file name="config.xml" hash="8353012d959534a6afd3d75bfc5d9b83"/><file name="system.xml" hash="20d31eefd3bc699d1db1f78cd2b8f4d2"/></dir></dir><dir name="Dashboard"><dir name="Block"><dir name="Adminhtml"><dir name="Dashboard"><dir name="Orders"><file name="Grid.php" hash="39fef1b298c868d2015e3fe886845339"/></dir><dir name="Tab"><file name="Amounts.php" hash="51c67e16a8993765778a904ea6f2e47e"/><file name="Orders.php" hash="b8a6ce28fea099f87eb60f264e090888"/></dir><file name="Diagrams.php" hash="d4e737ea10ab61556bc5c95bbca66eb3"/><file name="Graph.php" hash="77fd945f17f7247d3f2c3f0dcf8d09af"/><file name="Sales.php" hash="0338e229d1c0cd63f70e7ad18849d46d"/><file name="Totals.php" hash="4bf0be09fea916096f6e11aabbb8cf69"/></dir><file name="Dashboard.php" hash="faf358055a11cac4c508c34fcf73d55c"/></dir></dir><dir name="Helper"><dir name="Dashboard"><file name="Order.php" hash="17fcbeb9ca2bee6e19c75d6bdccd8a86"/></dir><file name="Data.php" hash="b35151f456b11a7bc32c9499459eb157"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Order"><file name="Collection.php" hash="4b34a230b0957a0eb2d92a2cd0c4ce64"/></dir></dir></dir><dir name="controllers"><file name="DashboardController.php" hash="624ee618718148c844bf43a145a9819f"/></dir><dir name="etc"><file name="adminhtml.xml" hash="8ebd1eec317615d547fb9dac39d4dfcb"/><file name="config.xml" hash="d5c451ea1363f3bad4db15612500892d"/><file name="system.xml" hash="2cf952ba99cfe126350471b0b2bc0215"/></dir></dir><dir name="FacebookAll"><dir name="Block"><file name="Active.php" hash="a1f22f64b65e5fea4bcb325be8796b98"/><file name="Links.php" hash="be308e916b8b45ef551bef7fc0c2cb35"/></dir><dir name="Helper"><file name="Active.php" hash="a48718b45133391f6faad11f59d0e3d7"/><file name="Data.php" hash="ea3228d2855d530bfd25f694239e7d6b"/></dir><dir name="Model"><dir name="Mysql4"><file name="Setup.php" hash="a099e45d0d6ef1eb7a635bb28ee526e1"/></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Color.php" hash="2542dbcebe51ea510bff0ab800a9f286"/><file name="Font.php" hash="cc55fbb2a26b63a3b356efa3bd923da7"/><file name="Layout.php" hash="c0be1fcb79c13453e525a8b8eeb7a851"/></dir></dir></dir><file name="FacebookAll.php" hash="9b441ca4e3fb548500de0942f4244ce8"/></dir><dir name="controllers"><dir name="Wishlist"><file name="IndexController.php" hash="dcd436076724c77f306a762893f8dd22"/></dir><file name="CustomerController.php" hash="6508688bf3de62d43aa5b41dd5e74583"/></dir><dir name="etc"><file name="adminhtml.xml" hash="4abb5f481b36ecac7d937f405e09c085"/><file name="config.xml" hash="7de291f9a47767a6b54bcb80953b3ad0"/><file name="system.xml" hash="981f9b8fb4c131ffb8e49d6717fd102f"/></dir><dir name="sql"><dir name="facebookall_setup"><file name="mysql4-install-1.0.1.php" hash="6441b95ea239971b38e2aa8b2e1c499f"/></dir></dir></dir><dir name="FaceboookFree"><dir name="Block"><file name="Active.php" hash="813d46911f6500338c30fa5c179e12d3"/><file name="Links.php" hash="a850aed6d41f7e377b1603b5791805e7"/></dir><dir name="Helper"><file name="Active.php" hash="c973b678b89d21748fed2f880e36cf55"/><file name="Data.php" hash="1825805274bce0784ec27ce9bcd1f525"/></dir><dir name="Model"><dir name="Mysql4"><file name="Setup.php" hash="5d7ef9e98a18c04c0d8d1457c96492aa"/></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Color.php" hash="bd27002596a4bc6018a52618a60b4fcc"/><file name="Layout.php" hash="d8b4cd4c2bb3ae2d40b0a43e84b2812f"/></dir></dir></dir><file name="FaceboookFree.php" hash="6ae1b5b8f461794a42960af5694a0540"/></dir><dir name="controllers"><file name="CustomerController.php" hash="39bbf23fec2e96d3c8d86f4074cd3e5e"/></dir><dir name="etc"><file name="adminhtml.xml" hash="918c2b409a939f35b4e28ce8d1a8d2e9"/><file name="config.xml" hash="c4da62015dc38f2ef44cef3456fdacac"/><file name="system.xml" hash="c493ed694d2f9b87f5ecbf5bfcbc628f"/></dir><dir name="sql"><dir name="facebookfree_setup"><file name="mysql4-install-1.0.1.php" hash="4fb61d52de12359987c0f4975093d4b2"/></dir></dir></dir><dir name="Fullscreenzoom"><dir name="etc"><file name="adminhtml.xml" hash="fbd81897cfd14e089ec000a2f6312eef"/><file name="config.xml" hash="223c7d1c711e12842ffce5757bd5aeaf"/><file name="system.xml" hash="6f7a0d109abde1d2198f6d5e3b8b4566"/></dir></dir><dir name="Twitter"><dir name="Block"><dir name="Adminhtml"><dir name="Settings"><dir name="Tab"><file name="General.php" hash="b87601834cb0b47af54fca61df4b96ca"/></dir><file name="Tabs.php" hash="04d75a30dccc9ea40d7ad2eccb78823f"/></dir><dir name="Twitter"><dir name="Edit"><dir name="Tab"><file name="Form.php" hash="87db2f0e0677a98e19e779aa3ca60627"/><file name="Settings.php" hash="79ccd7dfd7dc5193376f5a8cbbe4ff14"/></dir><file name="Form.php" hash="7ea4bddeb76058dfe41941777c6b0c72"/><file name="Tabs.php" hash="6401460f177c5adcc33eba5fb3e9dfc8"/></dir><file name="Edit.php" hash="2facc2aad001cb1ae1ea0b69c23ef0eb"/><file name="Grid.php" hash="6c6a20156e297258e4c5033d76e46c19"/></dir><file name="Settings.php" hash="c38e98ffef0f404fbdbffa8796d27996"/><file name="Twitter.php" hash="1eee9774ee5046893c7509aec474feaf"/></dir><file name="Twitter.php" hash="0824438e589cbd7a2904f4db827b9318"/><file name="Twitterbtn.php" hash="82169219bd2711e33eccadc75fc24abd"/></dir><dir name="Helper"><file name="Data.php" hash="95f53518a585f73d1dc0d9b03c0452e3"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Twitter"><file name="Collection.php" hash="8c27bc29744b82e024be880c3489bf51"/></dir><file name="Twitter.php" hash="2c4206f7e33212508371005f93320f79"/></dir><dir name="Source"><file name="Btntype.php" hash="abf577d82fedce841872fb4bc1e74072"/><file name="Langtype.php" hash="c97ef7816e605878179aa0da43780840"/></dir><file name="Ipad.php" hash="7a5a7a8caf124ab49f258230f97e0919"/><file name="Main.php" hash="85a8f20b9a74c90d9fa60a3dc25baac9"/><file name="Status.php" hash="38e4aefa92ef766ac7095e115b76ed48"/><file name="Twitter.php" hash="9791f5edbf008c3fdb26aa46ea9b5cf2"/></dir><dir name="controllers"><file name="AdminController.php" hash="3a29ddc53b0730f41af2094d255b5039"/><file name="IndexController.php" hash="f607fc80137d391bb2c997b882723fad"/><file name="UserController.php" hash="fbf874afb7873f6a8782d78dda13721a"/></dir><dir name="etc"><file name="adminhtml.xml" hash="b3c433a8388a051579fee280ece528ee"/><file name="config.xml" hash="68f2f2f842c8c6ace25e6b3613b8f45e"/><file name="system.xml" hash="5b83b943241c000089f18515c85c5118"/></dir><dir name="sql"><dir name="twitter_setup"><file name="mysql4-install-1.1.7.php" hash="2137fdf5e3f0db46d410c273bd3d767d"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="facebookfree.xml" hash="a4f91867847b391dd2c833907863b0bb"/></dir><dir name="template"><dir name="facebookfree"><dir name="like"><dir name="product"><dir name="view"><file name="addto.phtml" hash="2587002138a3be0944e98079309e8524"/></dir></dir><file name="head.phtml" hash="b618691ffc33a0e71ecf82c8137829e4"/></dir><file name="block.phtml" hash="b0758bf0166b421dfa2bf667cbe44263"/><file name="checkoutlogin.phtml" hash="3f2fbfe2b973338bd595b1664f67d0b4"/><file name="login.phtml" hash="d229b7c2f3e704e1b51616f235024d0c"/><file name="top.links.phtml" hash="4b2e33ac3ab51f53c0616c09da1150ee"/></dir></dir></dir></dir></dir></target><target name="magelib"><dir name="Facebook"><file name="Api.php" hash="daf56a2b2c80b069f92ce7e4bee1782f"/><file name="Exception.php" hash="6992e5cc68e456c0841a002cbd92a12b"/><file name="fb_ca_chain_bundle.crt" hash="c3055d03e94bbee13c7c6cc3a76083d9"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="css"><dir name="belvg"><file name="facebookfree.css" hash="c211abe25deeef7c6c31059efa58d701"/></dir></dir><dir name="images"><dir name="belvg"><file name="fb.gif" hash="865312ef4436675a9c79bacb7c97407f"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Belvg_All.xml" hash="d322d1671821c290a5fa099381431b2d"/><file name="Belvg_FacebookFree.xml" hash="7417b00b0dd8cd38d0fbba18b891370c"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>facebookfreebelvg</name>
4
+ <version>1.0.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt">BelVG EULA</license>
7
  <channel>community</channel>
11
  <notes>Please, feel free to contact us at store@belvg.com</notes>
12
  <authors><author><name>Belvg</name><user>auto-converted</user><email>store@belvg.com</email></author></authors>
13
  <date>2011-10-28</date>
14
+ <time>16:54:56</time>
15
+ <contents><target name="magecommunity"><dir name="Belvg"><dir name="All"><dir name="Helper"><file name="Data.php" hash="c508c83bfba72a300592b1b373f41758"/></dir><dir name="etc"><file name="config.xml" hash="8353012d959534a6afd3d75bfc5d9b83"/><file name="system.xml" hash="20d31eefd3bc699d1db1f78cd2b8f4d2"/></dir></dir><dir name="FaceboookFree"><dir name="Block"><file name="Active.php" hash="813d46911f6500338c30fa5c179e12d3"/><file name="Links.php" hash="a850aed6d41f7e377b1603b5791805e7"/></dir><dir name="Helper"><file name="Active.php" hash="c973b678b89d21748fed2f880e36cf55"/><file name="Data.php" hash="1825805274bce0784ec27ce9bcd1f525"/></dir><dir name="Model"><dir name="Mysql4"><file name="Setup.php" hash="5d7ef9e98a18c04c0d8d1457c96492aa"/></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Color.php" hash="bd27002596a4bc6018a52618a60b4fcc"/><file name="Layout.php" hash="d8b4cd4c2bb3ae2d40b0a43e84b2812f"/></dir></dir></dir><file name="FaceboookFree.php" hash="6ae1b5b8f461794a42960af5694a0540"/></dir><dir name="controllers"><file name="CustomerController.php" hash="39bbf23fec2e96d3c8d86f4074cd3e5e"/></dir><dir name="etc"><file name="adminhtml.xml" hash="918c2b409a939f35b4e28ce8d1a8d2e9"/><file name="config.xml" hash="ab0d294913486602d365aa4ef264ac0a"/><file name="system.xml" hash="c493ed694d2f9b87f5ecbf5bfcbc628f"/></dir><dir name="sql"><dir name="facebookfree_setup"><file name="mysql4-install-1.0.1.php" hash="4fb61d52de12359987c0f4975093d4b2"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="facebookfree.xml" hash="a4f91867847b391dd2c833907863b0bb"/></dir><dir name="template"><dir name="facebookfree"><dir name="like"><dir name="product"><dir name="view"><file name="addto.phtml" hash="2587002138a3be0944e98079309e8524"/></dir></dir><file name="head.phtml" hash="b618691ffc33a0e71ecf82c8137829e4"/></dir><file name="block.phtml" hash="b0758bf0166b421dfa2bf667cbe44263"/><file name="checkoutlogin.phtml" hash="3f2fbfe2b973338bd595b1664f67d0b4"/><file name="login.phtml" hash="d229b7c2f3e704e1b51616f235024d0c"/><file name="top.links.phtml" hash="4b2e33ac3ab51f53c0616c09da1150ee"/></dir></dir></dir></dir></dir></target><target name="magelib"><dir name="Facebook"><file name="Api.php" hash="daf56a2b2c80b069f92ce7e4bee1782f"/><file name="Exception.php" hash="6992e5cc68e456c0841a002cbd92a12b"/><file name="fb_ca_chain_bundle.crt" hash="c3055d03e94bbee13c7c6cc3a76083d9"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="css"><dir name="belvg"><file name="facebookfree.css" hash="c211abe25deeef7c6c31059efa58d701"/></dir></dir><dir name="images"><dir name="belvg"><file name="fb.gif" hash="865312ef4436675a9c79bacb7c97407f"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Belvg_All.xml" hash="d322d1671821c290a5fa099381431b2d"/><file name="Belvg_FacebookFree.xml" hash="a92659040561ff28748a59f1e26b3db2"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>