Custom_Login_Redirect - Version 1.1.1

Version Notes

- Fixed the minor issue related to not logged in customer
- Removed the annoying intro page

Download this release

Release Info

Developer Magento Core Team
Extension Custom_Login_Redirect
Version 1.1.1
Comparing to
See all releases


Code changes from version 1.1.0 to 1.1.1

app/code/local/MagentoPycho/All/Block/System/Config/Info.php DELETED
@@ -1,32 +0,0 @@
1
- <?php
2
- /**
3
- * @company GuruWebSoft-Guru In Web Solutions <www.guruwebsoft.com>
4
- * @author Rajendra K Bhatta <rajen_k_bhtt@hotmail.com>
5
- *
6
- * @category MagentoPycho
7
- * @package MagentoPycho_All
8
- */
9
- class MagentoPycho_All_Block_System_Config_Info
10
- extends Mage_Adminhtml_Block_Abstract
11
- implements Varien_Data_Form_Element_Renderer_Interface
12
- {
13
-
14
- /**
15
- * Render fieldset html
16
- *
17
- * @param Varien_Data_Form_Element_Abstract $element
18
- * @return string
19
- */
20
- public function render(Varien_Data_Form_Element_Abstract $element)
21
- {
22
- $html = '<div style="background:url(\'http://www.guruwebsoft.com/magentopycho-logo.jpg\') no-repeat scroll 15px center #EAF0EE;border:1px solid #CCCCCC;margin-bottom:10px;padding:10px 5px 5px 90px;">
23
- <h4>About MagentoPycho</h4>
24
- <p>Professional Web Developer / Freelancer with specialization in CMS + E-Commerce Solutions.<br />
25
- View more extensions @ <a href="http://www.magentocommerce.com/magento-connect/developer/MagentoPycho" target="_blank">MagentoConnect</a><br />
26
- <a href="http://www.magentocommerce.com/boards/member/messages/pm/163318/" target="_blank">Request a Quote / Hire Me</a><br />
27
- skype me @ magentopycho</p>
28
- </div>';
29
-
30
- return $html;
31
- }
32
- }
app/code/local/MagentoPycho/All/Helper/Data.php DELETED
@@ -1,11 +0,0 @@
1
- <?php
2
- /**
3
- * @company GuruWebSoft-Guru In Web Solutions <www.guruwebsoft.com>
4
- * @author Rajendra K Bhatta <rajen_k_bhtt@hotmail.com>
5
- *
6
- * @category MagentoPycho
7
- * @package MagentoPycho_All
8
- */
9
- class MagentoPycho_All_Helper_Data extends Mage_Core_Helper_Abstract{
10
-
11
- }
app/code/local/MagentoPycho/All/etc/config.xml DELETED
@@ -1,55 +0,0 @@
1
- <?xml version="1.0"?>
2
- <!--
3
- /**
4
- * @company GuruWebSoft-Guru In Web Solutions <www.guruwebsoft.com>
5
- * @author Rajendra K Bhatta <rajen_k_bhtt@hotmail.com>
6
- *
7
- * @category MagentoPycho
8
- * @package MagentoPycho_All
9
- */
10
- -->
11
- <config>
12
- <modules>
13
- <MagentoPycho_All>
14
- <version>0.1.0</version>
15
- </MagentoPycho_All>
16
- </modules>
17
-
18
- <global>
19
- <helpers>
20
- <magepychoall>
21
- <class>MagentoPycho_All_Helper</class>
22
- </magepychoall>
23
- </helpers>
24
- <blocks>
25
- <magepychoall>
26
- <class>MagentoPycho_All_Block</class>
27
- </magepychoall>
28
- </blocks>
29
- </global>
30
-
31
- <adminhtml>
32
- <acl>
33
- <resources>
34
- <all>
35
- <title>Allow Everything</title>
36
- </all>
37
- <admin>
38
- <children>
39
- <system>
40
- <children>
41
- <config>
42
- <children>
43
- <magepychoall>
44
- <title>MagentoPycho - All</title>
45
- </magepychoall>
46
- </children>
47
- </config>
48
- </children>
49
- </system>
50
- </children>
51
- </admin>
52
- </resources>
53
- </acl>
54
- </adminhtml>
55
- </config>
app/code/local/MagentoPycho/All/etc/system.xml DELETED
@@ -1,38 +0,0 @@
1
- <?xml version="1.0"?>
2
- <!--
3
- /**
4
- * @company GuruWebSoft-Guru In Web Solutions <www.guruwebsoft.com>
5
- * @author Rajendra K Bhatta <rajen_k_bhtt@hotmail.com>
6
- *
7
- * @category MagentoPycho
8
- * @package MagentoPycho_All
9
- */
10
- -->
11
- <config>
12
- <tabs>
13
- <magepychoall translate="label" module="magepychoall">
14
- <label>MagentoPycho Extensions</label>
15
- <sort_order>400</sort_order>
16
- </magepychoall>
17
- </tabs>
18
- <sections>
19
- <magepychoall translate="label" module="magepychoall">
20
- <label>Info</label>
21
- <tab>magepychoall</tab>
22
- <frontend_type>text</frontend_type>
23
- <sort_order>0</sort_order>
24
- <show_in_default>1</show_in_default>
25
- <show_in_website>1</show_in_website>
26
- <show_in_store>1</show_in_store>
27
- <groups>
28
- <info>
29
- <frontend_model>magepychoall/system_config_info</frontend_model>
30
- <sort_order>0</sort_order>
31
- <show_in_default>1</show_in_default>
32
- <show_in_website>1</show_in_website>
33
- <show_in_store>1</show_in_store>
34
- </info>
35
- </groups>
36
- </magepychoall>
37
- </sections>
38
- </config>
app/code/local/MagentoPycho/Customer/Block/System/Config/Extension.php ADDED
@@ -0,0 +1,33 @@
1
+ <?php
2
+ /**
3
+ * @category MagentoPycho
4
+ * @package MagentoPycho_Customer
5
+ * @author developer@magepsycho.com
6
+ * @website http://www.magepsycho.com
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ */
9
+ class MagentoPycho_Customer_Block_System_Config_Extension
10
+ extends Mage_Adminhtml_Block_Abstract
11
+ implements Varien_Data_Form_Element_Renderer_Interface
12
+ {
13
+
14
+ /**
15
+ * Render fieldset html
16
+ *
17
+ * @param Varien_Data_Form_Element_Abstract $element
18
+ * @return string
19
+ */
20
+ public function render(Varien_Data_Form_Element_Abstract $element)
21
+ {
22
+ $html = '<div style="background:#EAF0EE;border:1px solid #CCCCCC;margin-bottom:10px;padding:10px 5px 5px 10px;">
23
+ <h4>About Custom Login Redirect</h4>
24
+ <p><a href="http://www.magentocommerce.com/magento-connect/MagePsycho/extension/3763/custom_login_redirect" target="_blank">Custom Login Redirect</a> allows customer to redirect to custom page after login.
25
+ </p>
26
+ <br />
27
+ <h4>Configuration</h4>
28
+ <p>Go to: System >> Configuration >> Customers >> Custom Login Redirect >> Configure your settings here.</p>
29
+ </div>';
30
+
31
+ return $html;
32
+ }
33
+ }
app/code/local/MagentoPycho/Customer/Block/System/Config/Info.php CHANGED
@@ -1,10 +1,10 @@
1
<?php
2
/**
3
- * @company GuruWebSoft-Guru In Web Solutions <www.guruwebsoft.com>
4
- * @author Rajendra K Bhatta <rajen_k_bhtt@hotmail.com>
5
- *
6
* @category MagentoPycho
7
- * @package MagentoPycho_Payway
8
*/
9
class MagentoPycho_Customer_Block_System_Config_Info
10
extends Mage_Adminhtml_Block_Abstract
@@ -19,14 +19,14 @@ class MagentoPycho_Customer_Block_System_Config_Info
19
*/
20
public function render(Varien_Data_Form_Element_Abstract $element)
21
{
22
- $html = '<div style="background:#EAF0EE;border:1px solid #CCCCCC;margin-bottom:10px;padding:10px 5px 5px 10px;">
23
- <h4>About Custom Login Redirect</h4>
24
- <p><a href="http://www.magentocommerce.com/magento-connect/MagentoPycho/extension/3763/custom_login_redirect" target="_blank">Custom Login Redirect</a> allows customer to redirect to custom page after login.
25
- </p>
26
- <br />
27
- <h4>Configuration</h4>
28
- <p>Go to: System >> Configuration >> Customers >> Custom Login Redirect >> Configure your settings here.</p>
29
- </div>';
30
31
return $html;
32
}
1
<?php
2
/**
3
* @category MagentoPycho
4
+ * @package MagentoPycho_Customer
5
+ * @author developer@magepsycho.com
6
+ * @website http://www.magepsycho.com
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
*/
9
class MagentoPycho_Customer_Block_System_Config_Info
10
extends Mage_Adminhtml_Block_Abstract
19
*/
20
public function render(Varien_Data_Form_Element_Abstract $element)
21
{
22
+ $html = '<div style="background:url(\'http://www.magepsycho.com/_logo.png\') no-repeat scroll 15px center #EAF0EE;border:1px solid #CCCCCC;margin-bottom:10px;padding:10px 5px 5px 200px;">
23
+ <h4>About MagePsycho</h4>
24
+ <p>A Professional Zend PHP5 Certified Developer / Freelancer with specialization in CMS + E-Commerce Solutions.<br />
25
+ View more extensions @ <a href="http://www.magentocommerce.com/magento-connect/developer/MagePsycho" target="_blank">MagentoConnect</a><br />
26
+ <a href="http://www.magepsycho.com/contacts" target="_blank">Request a Quote / Contact Us</a><br />
27
+ Skype me @ magentopycho<br />
28
+ Visit my website: <a href="http://www.magepsycho.com" target="_blank">www.magespycho.com</a></p>
29
+ </div>';
30
31
return $html;
32
}
app/code/local/MagentoPycho/Customer/Helper/Data.php CHANGED
@@ -1,6 +1,26 @@
1
<?php
2
-
3
class MagentoPycho_Customer_Helper_Data extends Mage_Core_Helper_Abstract
4
{
5
6
}
1
<?php
2
+ /**
3
+ * @category MagentoPycho
4
+ * @package MagentoPycho_Customer
5
+ * @author developer@magepsycho.com
6
+ * @website http://www.magepsycho.com
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ */
9
class MagentoPycho_Customer_Helper_Data extends Mage_Core_Helper_Abstract
10
{
11
+ public function getConfig($field, $default = null){
12
+ $value = Mage::getStoreConfig('localeselector/option/'.$field);
13
+ if(!isset($value) or trim($value) == ''){
14
+ return $default;
15
+ }else{
16
+ return $value;
17
+ }
18
+ }
19
20
+ public function log($data){
21
+ if(is_array($data) || is_object($data)){
22
+ $data = print_r($data, true);
23
+ }
24
+ Mage::log($data, null, 'custom-login-redirect.log');
25
+ }
26
}
app/code/local/MagentoPycho/Customer/controllers/AccountController.php CHANGED
@@ -1,12 +1,11 @@
1
<?php
2
/**
3
* This class overrides the _loginPostRedirect method of default AccountController so as to tweak the redirection URL.
4
- *
5
- * GuruWebSoft (www.guruwebsoft.com)
6
- *
7
- * @author MagentoPycho <rajen_k_bhtt@hotmail.com>
8
* @category MagentoPycho
9
* @package MagentoPycho_Customer
10
*/
11
require_once 'Mage/Customer/controllers/AccountController.php';
12
class MagentoPycho_Customer_AccountController extends Mage_Customer_AccountController
@@ -23,8 +22,12 @@ class MagentoPycho_Customer_AccountController extends Mage_Customer_AccountContr
23
$custom_login_redirect_url = trim(Mage::getStoreConfig('mpcustomer/customloginredirect/url'));
24
25
if(1 == $custom_login_redirect_flag){
26
- $filtered_url = Mage::getUrl( ltrim( str_replace(Mage::getBaseUrl(), '', $custom_login_redirect_url), '/') );
27
- $session->setBeforeAuthUrl($filtered_url);
28
}else{
29
if (!$session->getBeforeAuthUrl() || $session->getBeforeAuthUrl() == Mage::getBaseUrl() ) {
30
1
<?php
2
/**
3
* This class overrides the _loginPostRedirect method of default AccountController so as to tweak the redirection URL.
4
* @category MagentoPycho
5
* @package MagentoPycho_Customer
6
+ * @author developer@magepsycho.com
7
+ * @website http://www.magepsycho.com
8
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
9
*/
10
require_once 'Mage/Customer/controllers/AccountController.php';
11
class MagentoPycho_Customer_AccountController extends Mage_Customer_AccountController
22
$custom_login_redirect_url = trim(Mage::getStoreConfig('mpcustomer/customloginredirect/url'));
23
24
if(1 == $custom_login_redirect_flag){
25
+ if($session->isLoggedIn()){
26
+ $filtered_url = Mage::getUrl( ltrim( str_replace(Mage::getBaseUrl(), '', $custom_login_redirect_url), '/') );
27
+ $session->setBeforeAuthUrl($filtered_url);
28
+ }else{
29
+ $session->setBeforeAuthUrl(Mage::helper('customer')->getLoginUrl());
30
+ }
31
}else{
32
if (!$session->getBeforeAuthUrl() || $session->getBeforeAuthUrl() == Mage::getBaseUrl() ) {
33
app/code/local/MagentoPycho/Customer/etc/config.xml CHANGED
@@ -1,12 +1,11 @@
1
<?xml version="1.0"?>
2
<!--
3
/**
4
- *
5
- * GuruWebSoft (www.guruwebsoft.com)
6
- *
7
- * @author MagentoPycho <rajen_k_bhtt@hotmail.com>
8
- * @category Customer
9
* @package MagentoPycho_Customer
10
*/
11
-->
12
<config>
@@ -64,7 +63,7 @@
64
</global>
65
66
<adminhtml>
67
- <acl>
68
<resources>
69
<admin>
70
<children>
@@ -85,6 +84,39 @@
85
</children>
86
</admin>
87
</resources>
88
</acl>
89
</adminhtml>
90
1
<?xml version="1.0"?>
2
<!--
3
/**
4
+ * @category MagentoPycho
5
* @package MagentoPycho_Customer
6
+ * @author developer@magepsycho.com
7
+ * @website http://www.magepsycho.com
8
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
9
*/
10
-->
11
<config>
63
</global>
64
65
<adminhtml>
66
+ <!--<acl>
67
<resources>
68
<admin>
69
<children>
84
</children>
85
</admin>
86
</resources>
87
+ </acl>-->
88
+ <acl>
89
+ <resources>
90
+ <all>
91
+ <title>Allow Everything</title>
92
+ </all>
93
+ <admin>
94
+ <children>
95
+ <mpcustomer module="mpcustomer">
96
+ <title>Custom Login Redirect Module</title>
97
+ <sort_order>10</sort_order>
98
+ </mpcustomer>
99
+
100
+ <system>
101
+ <children>
102
+ <config>
103
+ <children>
104
+ <magepychoinfo>
105
+ <title>MagePsycho - All</title>
106
+ </magepychoinfo>
107
+ <mpcustomer>
108
+ <title>MagePsycho Area</title>
109
+ </mpcustomer>
110
+ <mpcustomer2>
111
+ <title>MagePsycho Area</title>
112
+ </mpcustomer2>
113
+ </children>
114
+ </config>
115
+ </children>
116
+ </system>
117
+ </children>
118
+ </admin>
119
+ </resources>
120
</acl>
121
</adminhtml>
122
app/code/local/MagentoPycho/Customer/etc/system.xml CHANGED
@@ -1,16 +1,39 @@
1
<?xml version="1.0"?>
2
<!--
3
/**
4
- *
5
- * GuruWebSoft (www.guruwebsoft.com)
6
- *
7
- * @author MagentoPycho <rajen_k_bhtt@hotmail.com>
8
- * @category Customer
9
* @package MagentoPycho_Customer
10
*/
11
-->
12
<config>
13
<sections>
14
<mpcustomer2 module="mpcustomer">
15
<label>Custom Login Redirect</label>
16
<tab>magepychoall</tab>
@@ -21,7 +44,7 @@
21
<show_in_store>1</show_in_store>
22
<groups>
23
<info>
24
- <frontend_model>mpcustomer/system_config_info</frontend_model>
25
<sort_order>0</sort_order>
26
<show_in_default>1</show_in_default>
27
<show_in_website>1</show_in_website>
1
<?xml version="1.0"?>
2
<!--
3
/**
4
+ * @category MagentoPycho
5
* @package MagentoPycho_Customer
6
+ * @author developer@magepsycho.com
7
+ * @website http://www.magepsycho.com
8
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
9
*/
10
-->
11
<config>
12
+ <tabs>
13
+ <magepychoall translate="label" module="mpcustomer">
14
+ <label>MagePsycho Extensions</label>
15
+ <sort_order>400</sort_order>
16
+ </magepychoall>
17
+ </tabs>
18
<sections>
19
+ <magepychoinfo translate="label" module="mpcustomer">
20
+ <label>Info</label>
21
+ <tab>magepychoall</tab>
22
+ <frontend_type>text</frontend_type>
23
+ <sort_order>99999999999</sort_order>
24
+ <show_in_default>1</show_in_default>
25
+ <show_in_website>1</show_in_website>
26
+ <show_in_store>1</show_in_store>
27
+ <groups>
28
+ <info>
29
+ <frontend_model>mpcustomer/system_config_info</frontend_model>
30
+ <sort_order>10</sort_order>
31
+ <show_in_default>1</show_in_default>
32
+ <show_in_website>1</show_in_website>
33
+ <show_in_store>1</show_in_store>
34
+ </info>
35
+ </groups>
36
+ </magepychoinfo>
37
<mpcustomer2 module="mpcustomer">
38
<label>Custom Login Redirect</label>
39
<tab>magepychoall</tab>
44
<show_in_store>1</show_in_store>
45
<groups>
46
<info>
47
+ <frontend_model>mpcustomer/system_config_extension</frontend_model>
48
<sort_order>0</sort_order>
49
<show_in_default>1</show_in_default>
50
<show_in_website>1</show_in_website>
app/etc/modules/MagentoPycho_All.xml DELETED
@@ -1,18 +0,0 @@
1
- <?xml version="1.0"?>
2
- <!--
3
- /**
4
- * @company GuruWebSoft-Guru In Web Solutions <www.guruwebsoft.com>
5
- * @author Rajendra K Bhatta <rajen_k_bhtt@hotmail.com>
6
- *
7
- * @category MagentoPycho
8
- * @package MagentoPycho_All
9
- */
10
- -->
11
- <config>
12
- <modules>
13
- <MagentoPycho_All>
14
- <active>true</active>
15
- <codePool>local</codePool>
16
- </MagentoPycho_All>
17
- </modules>
18
- </config>
package.xml CHANGED
@@ -1,19 +1,19 @@
1
<?xml version="1.0"?>
2
<package>
3
<name>Custom_Login_Redirect</name>
4
- <version>1.1.0</version>
5
<stability>stable</stability>
6
<license>OSL v3.0</license>
7
<channel>community</channel>
8
<extends/>
9
<summary>Custom Login Redirect allows you to redirect to custom page after customer login.</summary>
10
<description>Custom Login Redirect allows you to redirect to custom page after customer login.</description>
11
- <notes>Changelog:
12
- - Fixed the 404 error in customer address page</notes>
13
- <authors><author><name>MagentoPycho</name><user>auto-converted</user><email>rajen_k_bhtt@hotmail.com</email></author></authors>
14
- <date>2010-11-18</date>
15
- <time>10:02:01</time>
16
- <contents><target name="magelocal"><dir name="MagentoPycho"><dir name="All"><dir name="Block"><dir name="System"><dir name="Config"><file name="Info.php" hash="e6914d79f7c4277b4933c872d7580237"/></dir></dir></dir><dir name="etc"><file name="config.xml" hash="cafaf7b9c9d1a8cd9a4b7300e322bdb1"/><file name="system.xml" hash="d3d9a00dfec34114c0035154e441a17a"/></dir><dir name="Helper"><file name="Data.php" hash="576c0537873a3fc2480596e1b78143ca"/></dir></dir><dir name="Customer"><dir name="Block"><dir name="System"><dir name="Config"><file name="Info.php" hash="d82bda25029bae202e031932d444e613"/></dir></dir></dir><dir name="controllers"><file name="AccountController.php" hash="43481f1c9386e8aac98d050cde0e9bb2"/></dir><dir name="etc"><file name="config.xml" hash="7c5f7cacd00ca4f8636602fefc75c8b7"/><file name="system.xml" hash="a36b8e0bd19fc13830cd708fced672a5"/></dir><dir name="Helper"><file name="Data.php" hash="11c167cf535dcb2ccdcc805c4553bbc9"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="MagentoPycho_All.xml" hash="08ef49c26bf700e076b16ef77048ca23"/><file name="MagentoPycho_Customer.xml" hash="d0f479e60cdd93402291cd0fcbcaf867"/></dir></target></contents>
17
<compatible/>
18
<dependencies/>
19
</package>
1
<?xml version="1.0"?>
2
<package>
3
<name>Custom_Login_Redirect</name>
4
+ <version>1.1.1</version>
5
<stability>stable</stability>
6
<license>OSL v3.0</license>
7
<channel>community</channel>
8
<extends/>
9
<summary>Custom Login Redirect allows you to redirect to custom page after customer login.</summary>
10
<description>Custom Login Redirect allows you to redirect to custom page after customer login.</description>
11
+ <notes>- Fixed the minor issue related to not logged in customer&#xD;
12
+ - Removed the annoying intro page</notes>
13
+ <authors><author><name>Raj K B</name><user>auto-converted</user><email>rajen_k_bhtt@gmail.com</email></author></authors>
14
+ <date>2011-04-18</date>
15
+ <time>11:53:16</time>
16
+ <contents><target name="mageetc"><dir name="modules"><file name="MagentoPycho_Customer.xml" hash="d0f479e60cdd93402291cd0fcbcaf867"/></dir></target><target name="magelocal"><dir name="MagentoPycho"><dir name="Customer"><dir name="Block"><dir name="System"><dir name="Config"><file name="Extension.php" hash="696c5c1911435c273dd1012b3381d369"/><file name="Info.php" hash="78711bf514c051687acf78b199b2459d"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="ea1257615a3190dcea6027a7018e81be"/></dir><dir name="controllers"><file name="AccountController.php" hash="86f17efdfd2f9279e131801040943475"/></dir><dir name="etc"><file name="config.xml" hash="93079b4bb55e625b695d0f890ce1e49d"/><file name="system.xml" hash="48a9b7f79141c2a8b38346a1dc3ed9bf"/></dir></dir></dir></target></contents>
17
<compatible/>
18
<dependencies/>
19
</package>