SpadarLogin - Version 1.0.0

Version Notes

* New branding (Widgento instead of Spadar)
* Packaged uninstaller (extension can be easily removed from the magento installation)
* Added English and German button translation files
* Fixed an issue with multiple login sessions

Download this release

Release Info

Developer Yury Ksenevich
Extension SpadarLogin
Version 1.0.0
Comparing to
See all releases


Code changes from version 0.1.2 to 1.0.0

Files changed (27) hide show
  1. app/code/community/Spadar/Login/Helper/Data.php +0 -21
  2. app/code/community/Widgento/Core/Helper/Data.php +32 -0
  3. app/code/community/Widgento/Core/Model/Feed.php +70 -0
  4. app/code/community/Widgento/Core/Model/Uninstall/Abstract.php +92 -0
  5. app/code/community/Widgento/Core/controllers/Adminhtml/RewriteController.php +30 -0
  6. app/code/community/Widgento/Core/etc/config.xml +107 -0
  7. app/code/community/Widgento/Core/etc/manifest.xml +31 -0
  8. app/code/community/{Spadar → Widgento}/Login/Helper/Button.php +11 -7
  9. app/code/community/Widgento/Login/Helper/Data.php +25 -0
  10. app/code/community/{Spadar → Widgento}/Login/Model/Login.php +11 -7
  11. app/code/community/{Spadar → Widgento}/Login/Model/Mysql4/Login.php +13 -11
  12. app/code/community/Widgento/Login/Model/Uninstall.php +28 -0
  13. app/code/community/{Spadar → Widgento}/Login/controllers/Adminhtml/IndexController.php +12 -8
  14. app/code/community/{Spadar → Widgento}/Login/controllers/IndexController.php +14 -8
  15. app/code/community/{Spadar → Widgento}/Login/etc/config.xml +50 -43
  16. app/code/community/Widgento/Login/etc/manifest.xml +34 -0
  17. app/code/community/{Spadar → Widgento}/Login/etc/system.xml +10 -6
  18. app/code/community/{Spadar → Widgento}/Login/sql/spadarlogin_setup/mysql4-install-0.1.0.php +20 -7
  19. app/design/adminhtml/default/default/layout/spadarlogin.xml +0 -14
  20. app/design/adminhtml/default/default/layout/widgentologin.xml +35 -0
  21. app/etc/modules/Spadar_Login.xml +24 -5
  22. app/etc/modules/Widgento_Core.xml +35 -0
  23. app/etc/modules/Widgento_Login.xml +37 -0
  24. app/locale/de_DE/Widgento_Login.csv +1 -0
  25. app/locale/en_US/Widgento_Login.csv +1 -0
  26. package.xml +10 -11
  27. shell/widgento_uninstall.php +69 -0
app/code/community/Spadar/Login/Helper/Data.php DELETED
@@ -1,21 +0,0 @@
1
- <?php
2
- /**
3
- * Spadar_Login
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0), a
8
- * copy of which is available through the world-wide-web at this URL:
9
- * http://opensource.org/licenses/osl-3.0.php
10
- *
11
- * @category Spadar
12
- * @package Spadar_Login
13
- * @author Yury Ksenevich <sales@spadar.com>
14
- * @copyright Copyright (c) 2012 Yury Ksenevich s.p.
15
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
- */
17
-
18
- class Spadar_Login_Helper_Data extends Mage_Core_Helper_Abstract
19
- {
20
-
21
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Widgento/Core/Helper/Data.php ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Widgento_Core
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0), a
9
+ * copy of which is available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category Widgento
13
+ * @package Widgento_Core
14
+ * @author Yury Ksenevich <info@widgento.com>
15
+ * @copyright Copyright (c) 2012-2013 Yury Ksenevich p.e.
16
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
17
+ */
18
+
19
+
20
+ ?><?php
21
+
22
+ class Widgento_Core_Helper_Data extends Mage_Core_Helper_Abstract
23
+ {
24
+ const XML_FEED_URL_PATH = 'widgentocore/newsletter/feed_url';
25
+
26
+ public function getFeedUrl()
27
+ {
28
+ $url = Mage::getStoreConfig(self::XML_FEED_URL_PATH);
29
+
30
+ return $url.'?s='.urlencode(Mage::getStoreConfig('web/unsecure/base_url'));
31
+ }
32
+ }
app/code/community/Widgento/Core/Model/Feed.php ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Widgento_Core
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0), a
9
+ * copy of which is available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category Widgento
13
+ * @package Widgento_Core
14
+ * @author Yury Ksenevich <info@widgento.com>
15
+ * @copyright Copyright (c) 2012-2013 Yury Ksenevich p.e.
16
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
17
+ */
18
+
19
+
20
+ ?><?php
21
+
22
+ class Widgento_Core_Model_Feed extends Mage_AdminNotification_Model_Feed
23
+ {
24
+ /**
25
+ * @var Widgento_Core_Helper_Data
26
+ */
27
+ private $_helper;
28
+
29
+ public function _construct()
30
+ {
31
+ $this->_helper = Mage::helper('widgentocore');
32
+ }
33
+
34
+ /**
35
+ * Retrieve feed url
36
+ *
37
+ * @return string
38
+ */
39
+ public function getFeedUrl()
40
+ {
41
+ if (is_null($this->_feedUrl))
42
+ {
43
+ $this->_feedUrl = $this->_helper->getFeedUrl();
44
+ }
45
+
46
+ return $this->_feedUrl;
47
+ }
48
+
49
+ /**
50
+ * Retrieve Last update time
51
+ *
52
+ * @return int
53
+ */
54
+ public function getLastUpdate()
55
+ {
56
+ return Mage::app()->loadCache('widgentocore_newsletter_lastcheck');
57
+ }
58
+
59
+ /**
60
+ * Set last update time (now)
61
+ *
62
+ * @return Mage_AdminNotification_Model_Feed
63
+ */
64
+ public function setLastUpdate()
65
+ {
66
+ Mage::app()->saveCache(time(), 'widgentocore_newsletter_lastcheck');
67
+
68
+ return $this;
69
+ }
70
+ }
app/code/community/Widgento/Core/Model/Uninstall/Abstract.php ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Widgento_Core
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0), a
9
+ * copy of which is available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category Widgento
13
+ * @package Widgento_Core
14
+ * @author Yury Ksenevich <info@widgento.com>
15
+ * @copyright Copyright (c) 2012-2013 Yury Ksenevich p.e.
16
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
17
+ */
18
+
19
+
20
+ ?><?php
21
+
22
+ abstract class Widgento_Core_Model_Uninstall_Abstract
23
+ {
24
+ /**
25
+ * @var Mage_Eav_Model_Entity_Setup
26
+ */
27
+ protected $_setup;
28
+
29
+ public function __construct()
30
+ {
31
+ $this->_setup = new Mage_Eav_Model_Entity_Setup('core_setup');
32
+ }
33
+
34
+ abstract function run();
35
+
36
+ final function uninstall(Varien_Event_Observer $observer)
37
+ {
38
+ $module = $observer->getEvent()->getModule();
39
+
40
+ if (0 !== strpos(get_class($this), $module))
41
+ {
42
+ return false;
43
+ }
44
+
45
+ $this->run();
46
+
47
+ $manifestPath = str_replace('_', '/', $module).'/etc/manifest.xml';
48
+
49
+ foreach (explode(PS, get_include_path()) as $includePath)
50
+ {
51
+ if (file_exists($includePath.DS.$manifestPath))
52
+ {
53
+ $manifestPath = $includePath.DS.$manifestPath;
54
+ break;
55
+ }
56
+ }
57
+
58
+ if (!file_exists($manifestPath))
59
+ {
60
+ throw new Exception('Manifest path "'.$manifestPath.'" does not exist');
61
+ }
62
+
63
+ $manifestXml = new SimpleXMLElement($manifestPath, null, true);
64
+ $paths = $manifestXml->xpath('/manifest/'.$module.'/paths/path');
65
+ $file = new Varien_Io_File();
66
+
67
+ foreach ($paths as $path)
68
+ {
69
+ $path = BP.DS.$path;
70
+ if (file_exists($path))
71
+ {
72
+ if (is_dir($path))
73
+ {
74
+ $file->rmdir($path, true);
75
+ }
76
+ else
77
+ {
78
+ $file->rm($path);
79
+ }
80
+ }
81
+ }
82
+
83
+ $this->_removeResources($module);
84
+ }
85
+
86
+ protected function _removeResources($module)
87
+ {
88
+ $modulePreffix = preg_replace('|[^a-z]|', '', strtolower($module));
89
+
90
+ $this->_setup->getConnection()->delete($this->_setup->getTable('core/resource'), 'code LIKE "'.$modulePreffix.'%"');
91
+ }
92
+ }
app/code/community/Widgento/Core/controllers/Adminhtml/RewriteController.php ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Widgento_Core
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0), a
9
+ * copy of which is available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category Widgento
13
+ * @package Widgento_Core
14
+ * @author Yury Ksenevich <info@widgento.com>
15
+ * @copyright Copyright (c) 2012-2013 Yury Ksenevich p.e.
16
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
17
+ */
18
+
19
+
20
+ ?><?php
21
+
22
+ class Widgento_Core_Adminhtml_RewriteController extends Mage_Adminhtml_Controller_Action
23
+ {
24
+ public function indexAction()
25
+ {
26
+ $this
27
+ ->loadLayout()
28
+ ->renderLayout();
29
+ }
30
+ }
app/code/community/Widgento/Core/etc/config.xml ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+
4
+ /**
5
+ * Widgento_Core
6
+ *
7
+ * NOTICE OF LICENSE
8
+ *
9
+ * This source file is subject to the Open Software License (OSL 3.0), a
10
+ * copy of which is available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ *
13
+ * @category Widgento
14
+ * @package Widgento_Core
15
+ * @author Yury Ksenevich <info@widgento.com>
16
+ * @copyright Copyright (c) 2012-2013 Yury Ksenevich p.e.
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
+ */
19
+
20
+
21
+ -->
22
+
23
+ <config>
24
+ <modules>
25
+ <Widgento_Core>
26
+ <version>0.1.0</version>
27
+ </Widgento_Core>
28
+ </modules>
29
+
30
+ <global>
31
+ <models>
32
+ <widgentocore>
33
+ <class>Widgento_Core_Model</class>
34
+ <resourceModel>widgentocore_mysql4</resourceModel>
35
+ </widgentocore>
36
+
37
+ <widgentocore_mysql4>
38
+ <class>Widgento_Core_Model_Mysql4</class>
39
+ <entities>
40
+
41
+ </entities>
42
+ </widgentocore_mysql4>
43
+ </models>
44
+ <blocks>
45
+ <widgentocore>
46
+ <class>Widgento_Core_Block</class>
47
+ </widgentocore>
48
+ </blocks>
49
+
50
+ <helpers>
51
+ <widgentocore><class>Widgento_Core_Helper</class></widgentocore>
52
+ </helpers>
53
+
54
+ <resources>
55
+ <widgentocore_setup>
56
+ <setup>
57
+ <module>Widgento_Core</module>
58
+ </setup>
59
+ <connection>
60
+ <use>core_setup</use>
61
+ </connection>
62
+ </widgentocore_setup>
63
+ <widgentocore_write>
64
+ <connection>
65
+ <use>core_write</use>
66
+ </connection>
67
+ </widgentocore_write>
68
+ <widgentocore_read>
69
+ <connection>
70
+ <use>core_read</use>
71
+ </connection>
72
+ </widgentocore_read>
73
+ </resources>
74
+ </global>
75
+
76
+ <admin>
77
+ </admin>
78
+
79
+ <adminhtml>
80
+ <menu>
81
+
82
+ </menu>
83
+ <events>
84
+ <controller_action_predispatch>
85
+ <observers>
86
+ <widgentocore>
87
+ <type>singleton</type>
88
+ <class>widgentocore/feed</class>
89
+ <method>checkUpdate</method>
90
+ </widgentocore>
91
+ </observers>
92
+ </controller_action_predispatch>
93
+ </events>
94
+
95
+ </adminhtml>
96
+
97
+ <frontend>
98
+ </frontend>
99
+
100
+ <default>
101
+ <widgentocore>
102
+ <newsletter>
103
+ <feed_url>http://news.widgento.com/feed.xml</feed_url>
104
+ </newsletter>
105
+ </widgentocore>
106
+ </default>
107
+ </config>
app/code/community/Widgento/Core/etc/manifest.xml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+
4
+ /**
5
+ * Widgento_Core
6
+ *
7
+ * NOTICE OF LICENSE
8
+ *
9
+ * This source file is subject to the Open Software License (OSL 3.0), a
10
+ * copy of which is available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ *
13
+ * @category Widgento
14
+ * @package Widgento_Core
15
+ * @author Yury Ksenevich <info@widgento.com>
16
+ * @copyright Copyright (c) 2012-2013 Yury Ksenevich p.e.
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
+ */
19
+
20
+
21
+ -->
22
+
23
+ <manifest>
24
+ <Widgento_Core>
25
+ <paths>
26
+ <path>app/code/community/Widgento/Core/</path>
27
+ <path>app/etc/modules/Widgento_Core.xml</path>
28
+ <path>shell/widgento_uninstall.php</path>
29
+ </paths>
30
+ </Widgento_Core>
31
+ </manifest>
app/code/community/{Spadar → Widgento}/Login/Helper/Button.php RENAMED
@@ -1,6 +1,7 @@
1
  <?php
 
2
  /**
3
- * Spadar_Login
4
  *
5
  * NOTICE OF LICENSE
6
  *
@@ -8,20 +9,23 @@
8
  * copy of which is available through the world-wide-web at this URL:
9
  * http://opensource.org/licenses/osl-3.0.php
10
  *
11
- * @category Spadar
12
- * @package Spadar_Login
13
- * @author Yury Ksenevich <sales@spadar.com>
14
- * @copyright Copyright (c) 2012 Yury Ksenevich s.p.
15
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
  */
17
 
18
- class Spadar_Login_Helper_Button extends Mage_Core_Helper_Abstract
 
 
 
19
  {
20
  public function getButtonData()
21
  {
22
  return array(
23
  'label' => $this->__('Log in customer'),
24
- 'onclick' => 'window.open(\''.Mage::getModel('adminhtml/url')->getUrl('spadarloginadmin/', array('id' => $this->getCustomerId())).'\', \'customer\');',
25
  );
26
  }
27
 
1
  <?php
2
+
3
  /**
4
+ * Widgento_Login
5
  *
6
  * NOTICE OF LICENSE
7
  *
9
  * copy of which is available through the world-wide-web at this URL:
10
  * http://opensource.org/licenses/osl-3.0.php
11
  *
12
+ * @category Widgento
13
+ * @package Widgento_Login
14
+ * @author Yury Ksenevich <info@widgento.com>
15
+ * @copyright Copyright (c) 2012-2013 Yury Ksenevich p.e.
16
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
17
  */
18
 
19
+
20
+ ?><?php
21
+
22
+ class Widgento_Login_Helper_Button extends Mage_Core_Helper_Abstract
23
  {
24
  public function getButtonData()
25
  {
26
  return array(
27
  'label' => $this->__('Log in customer'),
28
+ 'onclick' => 'window.open(\''.Mage::getModel('adminhtml/url')->getUrl('widgentologinadmin/', array('id' => $this->getCustomerId())).'\', \'customer\');',
29
  );
30
  }
31
 
app/code/community/Widgento/Login/Helper/Data.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Widgento_Login
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0), a
9
+ * copy of which is available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category Widgento
13
+ * @package Widgento_Login
14
+ * @author Yury Ksenevich <info@widgento.com>
15
+ * @copyright Copyright (c) 2012-2013 Yury Ksenevich p.e.
16
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
17
+ */
18
+
19
+
20
+ ?><?php
21
+
22
+ class Widgento_Login_Helper_Data extends Mage_Core_Helper_Abstract
23
+ {
24
+
25
+ }
app/code/community/{Spadar → Widgento}/Login/Model/Login.php RENAMED
@@ -1,6 +1,7 @@
1
  <?php
 
2
  /**
3
- * Spadar_Login
4
  *
5
  * NOTICE OF LICENSE
6
  *
@@ -8,18 +9,21 @@
8
  * copy of which is available through the world-wide-web at this URL:
9
  * http://opensource.org/licenses/osl-3.0.php
10
  *
11
- * @category Spadar
12
- * @package Spadar_Login
13
- * @author Yury Ksenevich <sales@spadar.com>
14
- * @copyright Copyright (c) 2012 Yury Ksenevich s.p.
15
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
  */
17
 
18
- class Spadar_Login_Model_Login extends Mage_Catalog_Model_Abstract
 
 
 
19
  {
20
  protected function _construct()
21
  {
22
- $this->_init('spadarlogin/login');
23
  }
24
 
25
  public function truncate()
1
  <?php
2
+
3
  /**
4
+ * Widgento_Login
5
  *
6
  * NOTICE OF LICENSE
7
  *
9
  * copy of which is available through the world-wide-web at this URL:
10
  * http://opensource.org/licenses/osl-3.0.php
11
  *
12
+ * @category Widgento
13
+ * @package Widgento_Login
14
+ * @author Yury Ksenevich <info@widgento.com>
15
+ * @copyright Copyright (c) 2012-2013 Yury Ksenevich p.e.
16
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
17
  */
18
 
19
+
20
+ ?><?php
21
+
22
+ class Widgento_Login_Model_Login extends Mage_Catalog_Model_Abstract
23
  {
24
  protected function _construct()
25
  {
26
+ $this->_init('widgentologin/login');
27
  }
28
 
29
  public function truncate()
app/code/community/{Spadar → Widgento}/Login/Model/Mysql4/Login.php RENAMED
@@ -1,6 +1,7 @@
1
  <?php
 
2
  /**
3
- * Spadar_Login
4
  *
5
  * NOTICE OF LICENSE
6
  *
@@ -8,27 +9,28 @@
8
  * copy of which is available through the world-wide-web at this URL:
9
  * http://opensource.org/licenses/osl-3.0.php
10
  *
11
- * @category Spadar
12
- * @package Spadar_Login
13
- * @author Yury Ksenevich <sales@spadar.com>
14
- * @copyright Copyright (c) 2012 Yury Ksenevich s.p.
15
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
  */
17
 
18
- class Spadar_Login_Model_Mysql4_Login extends Mage_Core_Model_Mysql4_Abstract
 
 
 
19
  {
20
  /**
21
  * Initialize resource
22
  */
23
  protected function _construct()
24
  {
25
- $this->_init('spadarlogin/login', 'login_id');
26
  }
27
 
28
  public function truncate()
29
  {
30
- $this->_getWriteAdapter()->truncate($this->getMainTable());
31
-
32
- return $this;
33
  }
34
- }
1
  <?php
2
+
3
  /**
4
+ * Widgento_Login
5
  *
6
  * NOTICE OF LICENSE
7
  *
9
  * copy of which is available through the world-wide-web at this URL:
10
  * http://opensource.org/licenses/osl-3.0.php
11
  *
12
+ * @category Widgento
13
+ * @package Widgento_Login
14
+ * @author Yury Ksenevich <info@widgento.com>
15
+ * @copyright Copyright (c) 2012-2013 Yury Ksenevich p.e.
16
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
17
  */
18
 
19
+
20
+ ?><?php
21
+
22
+ class Widgento_Login_Model_Mysql4_Login extends Mage_Core_Model_Mysql4_Abstract
23
  {
24
  /**
25
  * Initialize resource
26
  */
27
  protected function _construct()
28
  {
29
+ $this->_init('widgentologin/login', 'login_id');
30
  }
31
 
32
  public function truncate()
33
  {
34
+ $this->_getWriteAdapter()->truncateTable($this->getMainTable());
 
 
35
  }
36
+ }
app/code/community/Widgento/Login/Model/Uninstall.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Widgento_Login
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0), a
9
+ * copy of which is available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category Widgento
13
+ * @package Widgento_Login
14
+ * @author Yury Ksenevich <info@widgento.com>
15
+ * @copyright Copyright (c) 2012-2013 Yury Ksenevich p.e.
16
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
17
+ */
18
+
19
+
20
+ ?><?php
21
+
22
+ class Widgento_Login_Model_Uninstall extends Widgento_Core_Model_Uninstall_Abstract
23
+ {
24
+ public function run()
25
+ {
26
+ $this->_setup->run('DROP TABLE IF EXISTS `'.$this->_setup->getTable('widgentologin/login').';');
27
+ }
28
+ }
app/code/community/{Spadar → Widgento}/Login/controllers/Adminhtml/IndexController.php RENAMED
@@ -1,6 +1,7 @@
1
  <?php
 
2
  /**
3
- * Spadar_Login
4
  *
5
  * NOTICE OF LICENSE
6
  *
@@ -8,14 +9,17 @@
8
  * copy of which is available through the world-wide-web at this URL:
9
  * http://opensource.org/licenses/osl-3.0.php
10
  *
11
- * @category Spadar
12
- * @package Spadar_Login
13
- * @author Yury Ksenevich <sales@spadar.com>
14
- * @copyright Copyright (c) 2012 Yury Ksenevich s.p.
15
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
  */
17
 
18
- class Spadar_Login_Adminhtml_IndexController extends Mage_Adminhtml_Controller_Action
 
 
 
19
  {
20
  public function indexAction()
21
  {
@@ -30,12 +34,12 @@ class Spadar_Login_Adminhtml_IndexController extends Mage_Adminhtml_Controller_A
30
  }
31
 
32
  $hash = md5(uniqid(mt_rand(), true));
33
- $login = Mage::getModel('spadarlogin/login')
34
  ->setLoginHash($hash)
35
  ->setCustomerId($customerId)
36
  ->save();
37
 
38
- return $this->_redirect('spadarlogin/', array(
39
  'id' => $hash,
40
  '_store' => $customer->getStoreId(),
41
  ));
1
  <?php
2
+
3
  /**
4
+ * Widgento_Login
5
  *
6
  * NOTICE OF LICENSE
7
  *
9
  * copy of which is available through the world-wide-web at this URL:
10
  * http://opensource.org/licenses/osl-3.0.php
11
  *
12
+ * @category Widgento
13
+ * @package Widgento_Login
14
+ * @author Yury Ksenevich <info@widgento.com>
15
+ * @copyright Copyright (c) 2012-2013 Yury Ksenevich p.e.
16
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
17
  */
18
 
19
+
20
+ ?><?php
21
+
22
+ class Widgento_Login_Adminhtml_IndexController extends Mage_Adminhtml_Controller_Action
23
  {
24
  public function indexAction()
25
  {
34
  }
35
 
36
  $hash = md5(uniqid(mt_rand(), true));
37
+ $login = Mage::getModel('widgentologin/login')
38
  ->setLoginHash($hash)
39
  ->setCustomerId($customerId)
40
  ->save();
41
 
42
+ return $this->_redirect('widgentologin/', array(
43
  'id' => $hash,
44
  '_store' => $customer->getStoreId(),
45
  ));
app/code/community/{Spadar → Widgento}/Login/controllers/IndexController.php RENAMED
@@ -1,6 +1,7 @@
1
  <?php
 
2
  /**
3
- * Spadar_Login
4
  *
5
  * NOTICE OF LICENSE
6
  *
@@ -8,19 +9,22 @@
8
  * copy of which is available through the world-wide-web at this URL:
9
  * http://opensource.org/licenses/osl-3.0.php
10
  *
11
- * @category Spadar
12
- * @package Spadar_Login
13
- * @author Yury Ksenevich <sales@spadar.com>
14
- * @copyright Copyright (c) 2012 Yury Ksenevich s.p.
15
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
  */
 
 
 
17
 
18
- class Spadar_Login_IndexController extends Mage_Core_Controller_Front_Action
19
  {
20
  public function indexAction()
21
  {
22
  $hash = $this->getRequest()->getParam('id');
23
- $login = Mage::getModel('spadarlogin/login')->load($hash, 'login_hash');
24
 
25
  $login->truncate();
26
 
@@ -28,7 +32,9 @@ class Spadar_Login_IndexController extends Mage_Core_Controller_Front_Action
28
  {
29
  /* @var $customerSession Mage_Customer_Model_Session */
30
  $customerSession = Mage::getSingleton('customer/session');
31
- $customerSession->loginById($login->getCustomerId());
 
 
32
 
33
  return $this->_redirect('customer/account/');
34
  }
1
  <?php
2
+
3
  /**
4
+ * Widgento_Login
5
  *
6
  * NOTICE OF LICENSE
7
  *
9
  * copy of which is available through the world-wide-web at this URL:
10
  * http://opensource.org/licenses/osl-3.0.php
11
  *
12
+ * @category Widgento
13
+ * @package Widgento_Login
14
+ * @author Yury Ksenevich <info@widgento.com>
15
+ * @copyright Copyright (c) 2012-2013 Yury Ksenevich p.e.
16
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
17
  */
18
+
19
+
20
+ ?><?php
21
 
22
+ class Widgento_Login_IndexController extends Mage_Core_Controller_Front_Action
23
  {
24
  public function indexAction()
25
  {
26
  $hash = $this->getRequest()->getParam('id');
27
+ $login = Mage::getModel('widgentologin/login')->load($hash, 'login_hash');
28
 
29
  $login->truncate();
30
 
32
  {
33
  /* @var $customerSession Mage_Customer_Model_Session */
34
  $customerSession = Mage::getSingleton('customer/session');
35
+ $customerSession
36
+ ->renewSession()
37
+ ->loginById($login->getCustomerId());
38
 
39
  return $this->_redirect('customer/account/');
40
  }
app/code/community/{Spadar → Widgento}/Login/etc/config.xml RENAMED
@@ -1,7 +1,8 @@
1
  <?xml version="1.0" encoding="UTF-8"?>
2
  <!--
 
3
  /**
4
- * Spadar_Login
5
  *
6
  * NOTICE OF LICENSE
7
  *
@@ -9,95 +10,101 @@
9
  * copy of which is available through the world-wide-web at this URL:
10
  * http://opensource.org/licenses/osl-3.0.php
11
  *
12
- * @category Spadar
13
- * @package Spadar_Login
14
- * @author Yury Ksenevich <sales@spadar.com>
15
- * @copyright Copyright (c) 2012 Yury Ksenevich s.p.
16
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
17
  */
 
 
18
  -->
 
19
  <config>
20
  <modules>
21
- <Spadar_Login>
22
- <version>0.1.2</version>
23
- </Spadar_Login>
24
  </modules>
25
 
26
  <global>
27
  <models>
28
- <spadarlogin>
29
- <class>Spadar_Login_Model</class>
30
- <resourceModel>spadarlogin_mysql4</resourceModel>
31
- </spadarlogin>
32
- <spadarlogin_mysql4>
33
- <class>Spadar_Login_Model_Mysql4</class>
34
  <entities>
35
  <login>
36
- <table>spadar_login</table>
37
  </login>
 
 
 
38
  </entities>
39
- </spadarlogin_mysql4>
40
  </models>
41
  <blocks>
42
- <spadarlogin>
43
- <class>Spadar_Login_Block</class>
44
- </spadarlogin>
45
  </blocks>
46
 
47
  <helpers>
48
- <spadarlogin><class>Spadar_Login_Helper</class></spadarlogin>
49
  </helpers>
50
 
51
  <resources>
52
- <spadarlogin_setup>
53
  <setup>
54
- <module>Spadar_Login</module>
55
  </setup>
56
  <connection>
57
  <use>core_setup</use>
58
  </connection>
59
- </spadarlogin_setup>
60
- <spadarlogin_write>
61
  <connection>
62
  <use>core_write</use>
63
  </connection>
64
- </spadarlogin_write>
65
- <spadarlogin_read>
66
  <connection>
67
  <use>core_read</use>
68
  </connection>
69
- </spadarlogin_read>
70
  </resources>
71
  </global>
72
 
73
  <admin>
74
  <routers>
75
- <spadarloginadmin>
76
  <use>admin</use>
77
  <args>
78
- <module>Spadar_Login_Adminhtml</module>
79
- <frontName>spadarloginadmin</frontName>
80
  </args>
81
- </spadarloginadmin>
82
  </routers>
83
  </admin>
84
 
85
  <adminhtml>
86
  <layout>
87
  <updates>
88
- <spadarlogin>
89
- <file>spadarlogin.xml</file>
90
- </spadarlogin>
91
  </updates>
92
  </layout>
93
 
94
  <translate>
95
  <modules>
96
- <Spadar_Login>
97
  <files>
98
- <default>Spadar_Login.csv</default>
99
  </files>
100
- </Spadar_Login>
101
  </modules>
102
  </translate>
103
 
@@ -120,21 +127,21 @@
120
 
121
  <frontend>
122
  <routers>
123
- <spadarlogin>
124
  <use>standard</use>
125
  <args>
126
- <module>Spadar_Login</module>
127
- <frontName>spadarlogin</frontName>
128
  </args>
129
- </spadarlogin>
130
  </routers>
131
  </frontend>
132
 
133
  <default>
134
  <customer>
135
  <login>
136
- <order_view_display>1</order_view_display>
137
  </login>
138
  </customer>
139
  </default>
140
- </config>
1
  <?xml version="1.0" encoding="UTF-8"?>
2
  <!--
3
+
4
  /**
5
+ * Widgento_Login
6
  *
7
  * NOTICE OF LICENSE
8
  *
10
  * copy of which is available through the world-wide-web at this URL:
11
  * http://opensource.org/licenses/osl-3.0.php
12
  *
13
+ * @category Widgento
14
+ * @package Widgento_Login
15
+ * @author Yury Ksenevich <info@widgento.com>
16
+ * @copyright Copyright (c) 2012-2013 Yury Ksenevich p.e.
17
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
  */
19
+
20
+
21
  -->
22
+
23
  <config>
24
  <modules>
25
+ <Widgento_Login>
26
+ <version>1.0.0</version>
27
+ </Widgento_Login>
28
  </modules>
29
 
30
  <global>
31
  <models>
32
+ <widgentologin>
33
+ <class>Widgento_Login_Model</class>
34
+ <resourceModel>widgentologin_mysql4</resourceModel>
35
+ </widgentologin>
36
+ <widgentologin_mysql4>
37
+ <class>Widgento_Login_Model_Mysql4</class>
38
  <entities>
39
  <login>
40
+ <table>widgento_login</table>
41
  </login>
42
+ <login_deprecated>
43
+ <table>spadar_login</table>
44
+ </login_deprecated>
45
  </entities>
46
+ </widgentologin_mysql4>
47
  </models>
48
  <blocks>
49
+ <widgentologin>
50
+ <class>Widgento_Login_Block</class>
51
+ </widgentologin>
52
  </blocks>
53
 
54
  <helpers>
55
+ <widgentologin><class>Widgento_Login_Helper</class></widgentologin>
56
  </helpers>
57
 
58
  <resources>
59
+ <widgentologin_setup>
60
  <setup>
61
+ <module>Widgento_Login</module>
62
  </setup>
63
  <connection>
64
  <use>core_setup</use>
65
  </connection>
66
+ </widgentologin_setup>
67
+ <widgentologin_write>
68
  <connection>
69
  <use>core_write</use>
70
  </connection>
71
+ </widgentologin_write>
72
+ <widgentologin_read>
73
  <connection>
74
  <use>core_read</use>
75
  </connection>
76
+ </widgentologin_read>
77
  </resources>
78
  </global>
79
 
80
  <admin>
81
  <routers>
82
+ <widgentologinadmin>
83
  <use>admin</use>
84
  <args>
85
+ <module>Widgento_Login_Adminhtml</module>
86
+ <frontName>widgentologinadmin</frontName>
87
  </args>
88
+ </widgentologinadmin>
89
  </routers>
90
  </admin>
91
 
92
  <adminhtml>
93
  <layout>
94
  <updates>
95
+ <widgentologin>
96
+ <file>widgentologin.xml</file>
97
+ </widgentologin>
98
  </updates>
99
  </layout>
100
 
101
  <translate>
102
  <modules>
103
+ <Widgento_Login>
104
  <files>
105
+ <default>Widgento_Login.csv</default>
106
  </files>
107
+ </Widgento_Login>
108
  </modules>
109
  </translate>
110
 
127
 
128
  <frontend>
129
  <routers>
130
+ <widgentologin>
131
  <use>standard</use>
132
  <args>
133
+ <module>Widgento_Login</module>
134
+ <frontName>widgentologin</frontName>
135
  </args>
136
+ </widgentologin>
137
  </routers>
138
  </frontend>
139
 
140
  <default>
141
  <customer>
142
  <login>
143
+ <order_view_display>0</order_view_display>
144
  </login>
145
  </customer>
146
  </default>
147
+ </config>
app/code/community/Widgento/Login/etc/manifest.xml ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+
4
+ /**
5
+ * Widgento_Login
6
+ *
7
+ * NOTICE OF LICENSE
8
+ *
9
+ * This source file is subject to the Open Software License (OSL 3.0), a
10
+ * copy of which is available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ *
13
+ * @category Widgento
14
+ * @package Widgento_Login
15
+ * @author Yury Ksenevich <info@widgento.com>
16
+ * @copyright Copyright (c) 2012-2013 Yury Ksenevich p.e.
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
+ */
19
+
20
+
21
+ -->
22
+
23
+ <manifest>
24
+ <Widgento_Login>
25
+ <paths>
26
+ <path>app/code/community/Widgento/Login/</path>
27
+ <path>app/etc/modules/Widgento_Login.xml</path>
28
+ <path>app/etc/modules/Spadar_Login.xml</path>
29
+ <path>app/locale/en_US/Widgento_Login.csv</path>
30
+ <path>app/locale/de_DE/Widgento_Login.csv</path>
31
+ <path>app/design/adminhtml/default/default/layout/widgentologin.xml</path>
32
+ </paths>
33
+ </Widgento_Login>
34
+ </manifest>
app/code/community/{Spadar → Widgento}/Login/etc/system.xml RENAMED
@@ -1,7 +1,8 @@
1
  <?xml version="1.0" encoding="UTF-8"?>
2
  <!--
 
3
  /**
4
- * Spadar_Login
5
  *
6
  * NOTICE OF LICENSE
7
  *
@@ -9,19 +10,22 @@
9
  * copy of which is available through the world-wide-web at this URL:
10
  * http://opensource.org/licenses/osl-3.0.php
11
  *
12
- * @category Spadar
13
- * @package Spadar_Login
14
- * @author Yury Ksenevich <sales@spadar.com>
15
- * @copyright Copyright (c) 2012 Yury Ksenevich s.p.
16
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
17
  */
 
 
18
  -->
 
19
  <config>
20
  <sections>
21
  <customer translate="label comment" module="module">
22
  <tab>customer</tab>
23
  <groups>
24
- <login translate="label comment" module="spadarlogin">
25
  <label>Log in as customer</label>
26
  <frontend_type>text</frontend_type>
27
  <sort_order>200</sort_order>
1
  <?xml version="1.0" encoding="UTF-8"?>
2
  <!--
3
+
4
  /**
5
+ * Widgento_Login
6
  *
7
  * NOTICE OF LICENSE
8
  *
10
  * copy of which is available through the world-wide-web at this URL:
11
  * http://opensource.org/licenses/osl-3.0.php
12
  *
13
+ * @category Widgento
14
+ * @package Widgento_Login
15
+ * @author Yury Ksenevich <info@widgento.com>
16
+ * @copyright Copyright (c) 2012-2013 Yury Ksenevich p.e.
17
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
  */
19
+
20
+
21
  -->
22
+
23
  <config>
24
  <sections>
25
  <customer translate="label comment" module="module">
26
  <tab>customer</tab>
27
  <groups>
28
+ <login translate="label comment" module="widgentologin">
29
  <label>Log in as customer</label>
30
  <frontend_type>text</frontend_type>
31
  <sort_order>200</sort_order>
app/code/community/{Spadar → Widgento}/Login/sql/spadarlogin_setup/mysql4-install-0.1.0.php RENAMED
@@ -1,6 +1,7 @@
1
  <?php
 
2
  /**
3
- * Spadar_Login
4
  *
5
  * NOTICE OF LICENSE
6
  *
@@ -8,13 +9,16 @@
8
  * copy of which is available through the world-wide-web at this URL:
9
  * http://opensource.org/licenses/osl-3.0.php
10
  *
11
- * @category Spadar
12
- * @package Spadar_Login
13
- * @author Yury Ksenevich <sales@spadar.com>
14
- * @copyright Copyright (c) 2012 Yury Ksenevich s.p.
15
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
  */
17
 
 
 
 
18
  /* @var $installer Mage_Catalog_Model_Resource_Setup */
19
  $installer = $this;
20
 
@@ -22,9 +26,18 @@ $installer->startSetup();
22
 
23
  $installer->run('
24
 
25
- DROP TABLE IF EXISTS `'.$installer->getTable('spadarlogin/login').';
 
 
 
 
 
 
 
 
 
26
 
27
- CREATE TABLE `'.$installer->getTable('spadarlogin/login').'` (
28
  `login_id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
29
  `login_hash` CHAR(32) NOT NULL,
30
  `customer_id` INT UNSIGNED NOT NULL DEFAULT 0,
1
  <?php
2
+
3
  /**
4
+ * Widgento_Login
5
  *
6
  * NOTICE OF LICENSE
7
  *
9
  * copy of which is available through the world-wide-web at this URL:
10
  * http://opensource.org/licenses/osl-3.0.php
11
  *
12
+ * @category Widgento
13
+ * @package Widgento_Login
14
+ * @author Yury Ksenevich <info@widgento.com>
15
+ * @copyright Copyright (c) 2012-2013 Yury Ksenevich p.e.
16
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
17
  */
18
 
19
+
20
+ ?><?php
21
+
22
  /* @var $installer Mage_Catalog_Model_Resource_Setup */
23
  $installer = $this;
24
 
26
 
27
  $installer->run('
28
 
29
+ DROP TABLE IF EXISTS `'.$installer->getTable('widgentologin/login_deprecated').';
30
+
31
+ DELETE FROM `'.$installer->getTable('core/resource').'
32
+ WHERE code LIKE "spadar%";
33
+
34
+ ');
35
+
36
+ $installer->run('
37
+
38
+ DROP TABLE IF EXISTS `'.$installer->getTable('widgentologin/login').';
39
 
40
+ CREATE TABLE `'.$installer->getTable('widgentologin/login').'` (
41
  `login_id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
42
  `login_hash` CHAR(32) NOT NULL,
43
  `customer_id` INT UNSIGNED NOT NULL DEFAULT 0,
app/design/adminhtml/default/default/layout/spadarlogin.xml DELETED
@@ -1,14 +0,0 @@
1
- <?xml version="1.0"?>
2
- <layout>
3
- <adminhtml_customer_edit>
4
- <reference name="customer_edit">
5
- <action method="addButton"><id>login</id><data helper="spadarlogin/button/getButtonData" /><level>-1</level><sort>0</sort><area helper="spadarlogin/button/getButtonArea" /></action>
6
- </reference>
7
- </adminhtml_customer_edit>
8
-
9
- <adminhtml_sales_order_view>
10
- <reference name="sales_order_edit">
11
- <action method="addButton" ifconfig="customer/login/order_view_display"><id>login</id><data helper="spadarlogin/button/getButtonData" /><level>-1</level><sort>0</sort><area helper="spadarlogin/button/getButtonArea" /></action>
12
- </reference>
13
- </adminhtml_sales_order_view>
14
- </layout>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/adminhtml/default/default/layout/widgentologin.xml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+
4
+ /**
5
+ * Widgento_Login
6
+ *
7
+ * NOTICE OF LICENSE
8
+ *
9
+ * This source file is subject to the Open Software License (OSL 3.0), a
10
+ * copy of which is available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ *
13
+ * @category Widgento
14
+ * @package Widgento_Login
15
+ * @author Yury Ksenevich <info@widgento.com>
16
+ * @copyright Copyright (c) 2012-2013 Yury Ksenevich p.e.
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
+ */
19
+
20
+
21
+ -->
22
+
23
+ <layout>
24
+ <adminhtml_customer_edit>
25
+ <reference name="customer_edit">
26
+ <action method="addButton"><id>login</id><data helper="widgentologin/button/getButtonData" /><level>-1</level><sort>0</sort><area helper="widgentologin/button/getButtonArea" /></action>
27
+ </reference>
28
+ </adminhtml_customer_edit>
29
+
30
+ <adminhtml_sales_order_view>
31
+ <reference name="sales_order_edit">
32
+ <action method="addButton"><id>login</id><data helper="widgentologin/button/getButtonData" /><level>-1</level><sort>0</sort><area helper="widgentologin/button/getButtonArea" /></action>
33
+ </reference>
34
+ </adminhtml_sales_order_view>
35
+ </layout>
app/etc/modules/Spadar_Login.xml CHANGED
@@ -1,15 +1,34 @@
1
- <?xml version="1.0"?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  <config>
3
  <modules>
4
  <Spadar_Login>
5
- <active>true</active>
6
  <codePool>community</codePool>
7
  <self_name></self_name>
8
  <priority>1001</priority>
9
  <depends>
10
- <Mage_Customer />
11
- <Mage_Adminhtml />
12
  </depends>
13
  </Spadar_Login>
14
  </modules>
15
- </config>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+
4
+ /**
5
+ * Widgento_Login
6
+ *
7
+ * NOTICE OF LICENSE
8
+ *
9
+ * This source file is subject to the Open Software License (OSL 3.0), a
10
+ * copy of which is available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ *
13
+ * @category Widgento
14
+ * @package Widgento_Login
15
+ * @author Yury Ksenevich <info@widgento.com>
16
+ * @copyright Copyright (c) 2012-2013 Yury Ksenevich p.e.
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
+ */
19
+
20
+
21
+ -->
22
+
23
  <config>
24
  <modules>
25
  <Spadar_Login>
26
+ <active>false</active>
27
  <codePool>community</codePool>
28
  <self_name></self_name>
29
  <priority>1001</priority>
30
  <depends>
 
 
31
  </depends>
32
  </Spadar_Login>
33
  </modules>
34
+ </config>
app/etc/modules/Widgento_Core.xml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+
4
+ /**
5
+ * Widgento_Core
6
+ *
7
+ * NOTICE OF LICENSE
8
+ *
9
+ * This source file is subject to the Open Software License (OSL 3.0), a
10
+ * copy of which is available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ *
13
+ * @category Widgento
14
+ * @package Widgento_Core
15
+ * @author Yury Ksenevich <info@widgento.com>
16
+ * @copyright Copyright (c) 2012-2013 Yury Ksenevich p.e.
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
+ */
19
+
20
+
21
+ -->
22
+
23
+ <config>
24
+ <modules>
25
+ <Widgento_Core>
26
+ <active>true</active>
27
+ <codePool>community</codePool>
28
+ <self_name>Widgento Core</self_name>
29
+ <priority>1001</priority>
30
+ <depends>
31
+
32
+ </depends>
33
+ </Widgento_Core>
34
+ </modules>
35
+ </config>
app/etc/modules/Widgento_Login.xml ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+
4
+ /**
5
+ * Widgento_Login
6
+ *
7
+ * NOTICE OF LICENSE
8
+ *
9
+ * This source file is subject to the Open Software License (OSL 3.0), a
10
+ * copy of which is available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ *
13
+ * @category Widgento
14
+ * @package Widgento_Login
15
+ * @author Yury Ksenevich <info@widgento.com>
16
+ * @copyright Copyright (c) 2012-2013 Yury Ksenevich p.e.
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
+ */
19
+
20
+
21
+ -->
22
+
23
+ <config>
24
+ <modules>
25
+ <Widgento_Login>
26
+ <active>true</active>
27
+ <codePool>community</codePool>
28
+ <self_name></self_name>
29
+ <priority>1001</priority>
30
+ <depends>
31
+ <Widgento_Core />
32
+ <Mage_Customer />
33
+ <Mage_Adminhtml />
34
+ </depends>
35
+ </Widgento_Login>
36
+ </modules>
37
+ </config>
app/locale/de_DE/Widgento_Login.csv ADDED
@@ -0,0 +1 @@
 
1
+ "Log in customer","Kundelogin"
app/locale/en_US/Widgento_Login.csv ADDED
@@ -0,0 +1 @@
 
1
+ "Log in customer","Log in customer"
package.xml CHANGED
@@ -1,22 +1,21 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>SpadarLogin</name>
4
- <version>0.1.2</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Login as Customer</summary>
10
  <description>Allows admin users login as customers from admin</description>
11
- <notes>* Login on the "order view" pages is allowed by default, but can be turned off in configs
12
-
13
- * Customer view window is changed
14
-
15
- !!! 1.4.x branch compatibility fix</notes>
16
- <authors><author><name>Yury Ksenevich</name><user>auto-converted</user><email>yury@spadar.com</email></author></authors>
17
- <date>2012-06-14</date>
18
- <time>20:51:12</time>
19
- <contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="spadarlogin.xml" hash="f470c1380305439bf686d7059aab80fa"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Spadar_Login.xml" hash="f785705a056d3d219ca3b8d0def2236a"/></dir></target><target name="magecommunity"><dir name="Spadar"><dir name="Login"><dir name="controllers"><dir name="Adminhtml"><file name="IndexController.php" hash="c92575e25cf74732e384c9c6bc32d3c0"/></dir><file name="IndexController.php" hash="b07532165c256e0c7ac7098ba04651dd"/></dir><dir name="etc"><file name="config.xml" hash="108622d6fa79f87557de79ff1f72c6d7"/><file name="system.xml" hash="2885913865982dbee80712c4584c3562"/></dir><dir name="Helper"><file name="Button.php" hash="01ea50e464d5fe588e947d65e663b542"/><file name="Data.php" hash="fe708d7516fddc793b2451446b9d3c61"/></dir><dir name="Model"><dir name="Mysql4"><file name="Login.php" hash="9d5d6edb171a4110faa474e238f6f7cc"/></dir><file name="Login.php" hash="f5023f50d57c0eb6c6b88f380752b14d"/></dir><dir name="sql"><dir name="spadarlogin_setup"><file name="mysql4-install-0.1.0.php" hash="25af0280aa8fc427d93a352aad6f4315"/></dir></dir></dir></dir></target></contents>
20
  <compatible/>
21
- <dependencies/>
22
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>SpadarLogin</name>
4
+ <version>1.0.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Login as Customer</summary>
10
  <description>Allows admin users login as customers from admin</description>
11
+ <notes> * New branding (Widgento instead of Spadar)&#xD;
12
+ * Packaged uninstaller (extension can be easily removed from the magento installation)&#xD;
13
+ * Added English and German button translation files&#xD;
14
+ * Fixed an issue with multiple login sessions</notes>
15
+ <authors><author><name>Yury Ksenevich</name><user>widgento</user><email>info@widgento.com</email></author><author><name>Yury Ksenevich</name><user>spadar</user><email>yury@spadar.com</email></author></authors>
16
+ <date>2013-03-16</date>
17
+ <time>15:09:23</time>
18
+ <contents><target name="magecommunity"><dir name="Widgento"><dir name="Core"><dir name="Helper"><file name="Data.php" hash="a673690cb6fde3ca3e25d7b83afba4cd"/></dir><dir name="Model"><file name="Feed.php" hash="91781b3c405ce3900bdf3f64795f3309"/><dir name="Uninstall"><file name="Abstract.php" hash="c069c7e45b5de8b65a58d370d4e56de5"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="RewriteController.php" hash="0e05cd7a8f0d40ab027245efc63981fb"/></dir></dir><dir name="etc"><file name="config.xml" hash="37d79fc4c59ede48d9a2caa524004500"/><file name="manifest.xml" hash="eda1735b3b36cd7b6ed3684b07977dcc"/></dir></dir><dir name="Login"><dir name="Helper"><file name="Button.php" hash="f3756ce56dc28eea983fefc1a6e0d0e0"/><file name="Data.php" hash="8461aed15af139ada4c642176f4ff334"/></dir><dir name="Model"><file name="Login.php" hash="31e985418c1c873832602d10cc04f60d"/><dir name="Mysql4"><file name="Login.php" hash="2fb95870ec9c5a39e8a189f9c68c73c9"/></dir><file name="Uninstall.php" hash="2434a51afa2a2ea347787d4fa1851270"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="IndexController.php" hash="dbe5649f46d090c984f402bb2f1c4d73"/></dir><file name="IndexController.php" hash="fbb750cd6a1b4711d25b9b06a531a03f"/></dir><dir name="etc"><file name="config.xml" hash="4fbaa90b94f72f9c7730340f9aa56f1a"/><file name="manifest.xml" hash="4b90d9b13f74af0fc9a6fb18d62834b4"/><file name="system.xml" hash="ae3eeeadd9e69fd4183734e64d8b5704"/></dir><dir name="sql"><dir name="spadarlogin_setup"><file name="mysql4-install-0.1.0.php" hash="b6a1f14309120188482a98bc8b9752a4"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Widgento_Core.xml" hash="bbbe85f43685ff715e596022e8f3b85c"/><file name="Widgento_Login.xml" hash="8a6d46626452447c230b316a3f6e5408"/><file name="Spadar_Login.xml" hash="2f268af3c708a77c5386f394c665b2f1"/></dir></target><target name="mage"><dir name="shell"><file name="widgento_uninstall.php" hash="39ce6580a0e517991a171d4e36a3f1bf"/></dir></target><target name="magelocale"><dir><dir name="de_DE"><file name="Widgento_Login.csv" hash="0b9020a898e0ae4c95b3a61a8a193156"/></dir><dir name="en_US"><file name="Widgento_Login.csv" hash="68458781e96bf72778efce90103748e9"/></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="widgentologin.xml" hash="3cf262f067940c92cfa7fce0adf63012"/></dir></dir></dir></dir></target></contents>
 
19
  <compatible/>
20
+ <dependencies><required><php><min>5.1.0</min><max>7.0.0</max></php><package><name>Mage_Core_Modules</name><channel>community</channel><min>1.4</min><max>1.7.0.2</max></package></required></dependencies>
21
  </package>
shell/widgento_uninstall.php ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Widgento_Core
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0), a
9
+ * copy of which is available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category Widgento
13
+ * @package Widgento_Core
14
+ * @author Yury Ksenevich <info@widgento.com>
15
+ * @copyright Copyright (c) 2012-2013 Yury Ksenevich p.e.
16
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
17
+ */
18
+
19
+
20
+ ?><?php
21
+
22
+ require_once 'abstract.php';
23
+
24
+ class Widgento_Shell_Uninstall extends Mage_Shell_Abstract
25
+ {
26
+ /**
27
+ * Run script
28
+ *
29
+ */
30
+ public function run()
31
+ {
32
+ if (!$this->_args)
33
+ {
34
+ echo $this->usageHelp();
35
+ return false;
36
+ }
37
+
38
+ foreach ($this->_args as $module => $key)
39
+ {
40
+ try
41
+ {
42
+ Mage::dispatchEvent('widgento_core_uninstall', array('module' => $module));
43
+ echo 'Module "'.$module.'" successfully uninstalled.'."\n";
44
+ }
45
+ catch (Exception $e)
46
+ {
47
+ echo $e->getMessage()."\n";
48
+ echo $e->getTraceAsString()."\n";
49
+ }
50
+ }
51
+ }
52
+
53
+ /**
54
+ * Retrieve Usage Help Message
55
+ *
56
+ */
57
+ public function usageHelp()
58
+ {
59
+ return <<<USAGE
60
+ Usage: php -f widgento_uninstall.php -- Widgento_Module
61
+
62
+ Widgento_Module Module name you are going to uninstall
63
+
64
+ USAGE;
65
+ }
66
+ }
67
+
68
+ $shell = new Widgento_Shell_Uninstall();
69
+ $shell->run();