0
votes

I've written for Magento 1.9.x a custom module. Local it is workin great, but it's not being loaded on the server... it look like the module is not loaded.

I want to override customer AccountController and Helper/Data from customer.

Can anyone find an error in the files? Thanks!

I already cleared cache in magento and in /var/cache but with no effect

This are my Files:

/app/etc/modules/Org_RestLogin.xml

<?xml version="1.0"?> 
<config>
    <modules>
         <Org_RestLogin>
              <active>true</active> 
              <codePool>local</codePool> 
              <depends>
                  <Mage_Customer /> <!-- Make sure, this is loaded first -->
              </depends>
         </Org_RestLogin>
    </modules>
 </config>

/app/code/local/org/RestLogin/etc/config.xml

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <modules>
        <Org_RestLogin>
            <version>1.1.1</version>
        </Org_RestLogin>
    </modules>

    <frontend>
        <routers>
            <customer>
                <args>
                    <modules>
                        <org_restlogin before="Mage_Customer">Org_RestLogin</org_restlogin>
                    </modules>
                </args>
            </customer>
        </routers>
    </frontend>

    <global>
       <helpers>
          <customer>
              <rewrite>
                  <data>Org_RestLogin_Customer_Helper_Data</data>
             </rewrite>
          </customer>
       </helpers>
    </global>
</config>

/app/code/local/org/RestLogin/controllers/AccountController.php

<?php
require_once 'Mage/Customer/controllers/AccountController.php';

class Org_RestLogin_AccountController extends Mage_Customer_AccountController {
    //my custom methods
}

/app/code/local/org/RestLogin/Customer/Helper/Data.php

<?php
class Org_RestLogin_Customer_Helper_Data extends Mage_Customer_Helper_Data
{
    /**
     * Check whether customers registration is allowed
     *
     * @return bool
     */
    public function isRegistrationAllowed() {
        return false;
    }
}
1
is there any file permissions set on live server? Have you check is your module showing in admin section ?Rohit Goel
In admin section the module is showing. File permissions are also correctTobi
is your local and live server using same magento version ?Rohit Goel
They are using the same magento version: 1.9.2.3Tobi
is the compilation mode disabled or enabled ?Rohit Goel

1 Answers

0
votes

I found the solution. It was a typo in the folder... "org" should be "Org"