1

my config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Mindtwo_Formbuildercrfprotection>
            <version>0.0.1</version>
            <depends>
                <Phxsolution_Formbuilder/>
            </depends>
        </Mindtwo_Formbuildercrfprotection>
    </modules>
    <frontend>
        <routers>
            <formbuilder>
                <args>
                    <modules>
                        <mindtwo_formbuildercrfprotection before="Phxsolution_Formbuilder">Mindtwo_Formbuildercrfprotection</mindtwo_formbuildercrfprotection>
                    </modules>
                </args>
            </formbuilder>
        </routers>
    </frontend>
</config>

and in indexController.php

<?php
require_once("Phxsolution/Formbuilder/controllers/IndexController.php");
class Mindtwo_Formbuildercrfprotection_IndexController extends Phxsolution_Formbuilder_IndexController
{

    public function indexAction()
    {die("dsfdf");
        $this->loadLayout();
        $this->getLayout()->getBlock("head")->setTitle($this->__("Formbuilder"));

        $breadcrumbs = $this->getLayout()->getBlock("breadcrumbs");
        $breadcrumbs->addCrumb("home", array(
            "label" => $this->__("Home"),
            "title" => $this->__("Home"),
            "link"  => Mage::getBaseUrl()
        ));
        $breadcrumbs->addCrumb("formbuilder", array(
            "label" => $this->__("Formbuilder"),
            "title" => $this->__("Formbuilder")
        ));
        $this->renderLayout();
    }

}

but it is not working

0
  • Is <formbuilder> the right tag of Phxsolution_Formbuilder module for his controller ? Check his config (Phxsolution_Formbuilder/etc/config.xml and see the correct tag)
  • Try to use the depends in the etc/modules directory when your module is declared, don't put it in the config.xml.
  • Add this :

require_once(Mage::getModuleDir('controllers','Phxsolution_Formbuilder').DS. 'IndexController.php');

instead of this

require_once("Phxsolution/Formbuilder/controllers/IndexController.php");

  • Try not to use long names for your module (Formbuildercrfprotection)
  • yes i have checked it tag is correct and i moved depends in etc/modules but still its not working – Shubhajay Das Jan 7 at 10:08
  • Try the require once i posted , also add the die in other positions , add it outside the function to see the result. – Ylgen Guxholli Jan 7 at 10:57
  • yes i have used require once as you written not working – Shubhajay Das Jan 7 at 11:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.