- 08 Jul 2013, 09:36
#41132
Pessoal! Instalei o modulo “force_customer_login.xml” este modulo força o cadastro de cliente na pagina inicial, se possível gostaria de obter ajuda, no campo de cadastro do cliente gostaria de remover o campo senha, a ideia e liberar o acesso somente após aprovação do cadastro.
Segue abaixo o código “force_customer_login.xml”
<modification>
<id>Force Customer Login</id>
<version>152.1</version>
<vqmver>2.1.5</vqmver>
<author>Qphoria</author>
<file name="catalog/controller/common/header.php">
<operation>
<search position="after"><![CDATA[
function index()
]]></search>
<add trim="true"><![CDATA[
//Q: Force Customer Login
$match = false;
if (!empty($this->request->get['route'])) {
$skip = array(
'payment',
'feed',
'forgotten',
'login',
'register',
);
foreach ($skip as $s) {
if (strpos($this->request->get['route'], $s) !== false) {
$match = true;
break;
}
}
}
if (!$match) {
if (!$this->customer->isLogged()) {
$this->redirect($this->url->link('account/login', 'SSL'));
}
}
]]></add>
</operation>
</file>
</modification>
Segue abaixo o código “force_customer_login.xml”
<modification>
<id>Force Customer Login</id>
<version>152.1</version>
<vqmver>2.1.5</vqmver>
<author>Qphoria</author>
<file name="catalog/controller/common/header.php">
<operation>
<search position="after"><![CDATA[
function index()
]]></search>
<add trim="true"><![CDATA[
//Q: Force Customer Login
$match = false;
if (!empty($this->request->get['route'])) {
$skip = array(
'payment',
'feed',
'forgotten',
'login',
'register',
);
foreach ($skip as $s) {
if (strpos($this->request->get['route'], $s) !== false) {
$match = true;
break;
}
}
}
if (!$match) {
if (!$this->customer->isLogged()) {
$this->redirect($this->url->link('account/login', 'SSL'));
}
}
]]></add>
</operation>
</file>
</modification>



