Version Notes
* Fix for customers imported without store link
Download this release
Release Info
Developer | Yury Ksenevich |
Extension | SpadarLogin |
Version | 1.0.5 |
Comparing to | |
See all releases |
Code changes from version 1.0.4 to 1.0.5
app/code/community/Widgento/Login/Helper/Data.php
CHANGED
@@ -21,38 +21,38 @@
|
|
21 |
|
22 |
class Widgento_Login_Helper_Data extends Mage_Core_Helper_Abstract
|
23 |
{
|
24 |
-
public function getCustomerStoreId($customerId)
|
25 |
-
{
|
26 |
-
if (!$customerId)
|
27 |
-
{
|
28 |
-
return false;
|
29 |
-
}
|
30 |
-
|
31 |
-
$customer = Mage::getModel('customer/customer')->load($customerId);
|
32 |
-
|
33 |
-
$customerStore = Mage::app()->getStore($customer->getStoreId());
|
34 |
-
|
35 |
-
if ($customerStore && $customerStore->getIsActive())
|
36 |
-
{
|
37 |
-
return $customer->getStoreId();
|
38 |
-
}
|
39 |
-
|
40 |
-
if ($customerStore)
|
41 |
-
{
|
42 |
-
$customerWebsite = Mage::app()->getWebsite($customerStore->getWebsiteId());
|
43 |
-
|
44 |
-
foreach ($customerWebsite->getStores() as $websiteStore)
|
45 |
-
{
|
46 |
-
if ($websiteStore->getIsActive())
|
47 |
-
{
|
48 |
-
return $websiteStore->getId();
|
49 |
-
}
|
50 |
-
}
|
51 |
-
}
|
52 |
-
|
53 |
-
if (0 == Mage::getStoreConfig('customer/account_share/scope'))
|
54 |
-
{
|
55 |
-
Mage::app()->getDefaultStoreView()->getId();
|
56 |
-
}
|
57 |
-
}
|
58 |
-
}
|
21 |
|
22 |
class Widgento_Login_Helper_Data extends Mage_Core_Helper_Abstract
|
23 |
{
|
24 |
+
public function getCustomerStoreId($customerId)
|
25 |
+
{
|
26 |
+
if (!$customerId)
|
27 |
+
{
|
28 |
+
return false;
|
29 |
+
}
|
30 |
+
|
31 |
+
$customer = Mage::getModel('customer/customer')->load($customerId);
|
32 |
+
|
33 |
+
$customerStore = Mage::app()->getStore($customer->getStoreId());
|
34 |
+
|
35 |
+
if ($customerStore && $customerStore->getIsActive())
|
36 |
+
{
|
37 |
+
return $customer->getStoreId();
|
38 |
+
}
|
39 |
+
|
40 |
+
if ($customerStore)
|
41 |
+
{
|
42 |
+
$customerWebsite = Mage::app()->getWebsite($customerStore->getWebsiteId());
|
43 |
+
|
44 |
+
foreach ($customerWebsite->getStores() as $websiteStore)
|
45 |
+
{
|
46 |
+
if ($websiteStore->getIsActive())
|
47 |
+
{
|
48 |
+
return $websiteStore->getId();
|
49 |
+
}
|
50 |
+
}
|
51 |
+
}
|
52 |
+
|
53 |
+
if (0 == Mage::getStoreConfig('customer/account_share/scope'))
|
54 |
+
{
|
55 |
+
return Mage::app()->getDefaultStoreView()->getId();
|
56 |
+
}
|
57 |
+
}
|
58 |
+
}
|
app/code/community/Widgento/Login/etc/config.xml
CHANGED
@@ -23,7 +23,7 @@
|
|
23 |
<config>
|
24 |
<modules>
|
25 |
<Widgento_Login>
|
26 |
-
<version>1.0.
|
27 |
</Widgento_Login>
|
28 |
</modules>
|
29 |
|
23 |
<config>
|
24 |
<modules>
|
25 |
<Widgento_Login>
|
26 |
+
<version>1.0.5</version>
|
27 |
</Widgento_Login>
|
28 |
</modules>
|
29 |
|
package.xml
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>SpadarLogin</name>
|
4 |
-
<version>1.0.
|
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>*
|
12 |
<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>
|
13 |
-
<date>2013-
|
14 |
-
<time>
|
15 |
-
<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="4b7520e5f6361f242f787183ff522ffd"/><file name="Data.php" hash="
|
16 |
<compatible/>
|
17 |
<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/></package></required></dependencies>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>SpadarLogin</name>
|
4 |
+
<version>1.0.5</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>* Fix for customers imported without store link</notes>
|
12 |
<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>
|
13 |
+
<date>2013-12-30</date>
|
14 |
+
<time>08:31:16</time>
|
15 |
+
<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="4b7520e5f6361f242f787183ff522ffd"/><file name="Data.php" hash="d3021cf779464f6b4ba0791ba421fc6d"/></dir><dir name="Model"><file name="Login.php" hash="31e985418c1c873832602d10cc04f60d"/><dir name="Mysql4"><file name="Login.php" hash="da7c714b4e378f34d5d7b524bba6044b"/></dir><file name="Uninstall.php" hash="2434a51afa2a2ea347787d4fa1851270"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="IndexController.php" hash="9f4670f3e0408057843c65a95eb57f9d"/></dir><file name="IndexController.php" hash="2d6ab4505667dc4be6df53ba32566cdb"/></dir><dir name="etc"><file name="config.xml" hash="b78d29da5c96edc0de258ddce2a4a876"/><file name="manifest.xml" hash="4b90d9b13f74af0fc9a6fb18d62834b4"/><file name="system.xml" hash="ae3eeeadd9e69fd4183734e64d8b5704"/></dir><dir name="sql"><dir name="widgentologin_setup"><file name="mysql4-install-0.1.0.php" hash="b6a1f14309120188482a98bc8b9752a4"/><file name="mysql4-install-1.0.1.php" hash="926bb30acb34908a2ff1bca3de2592a0"/><file name="mysql4-upgrade-1.0.1.php" hash="c72c64b04ff93a161387c8e988a0e38d"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Widgento_Core.xml" hash="bbbe85f43685ff715e596022e8f3b85c"/><file name="Widgento_Login.xml" hash="b2f6acf7566648e2404294075c28a0bd"/><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>
|
16 |
<compatible/>
|
17 |
<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/></package></required></dependencies>
|
18 |
</package>
|