Can't make overwrite of system_store_edit_form to work
-
12-12-2019 - |
Question
I need to add extra fields in multi store edit view, but currently I'm stuck with extension code, and seems that extension is not loaded?
My xml file looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<config>
<modules>
<Lso_Adminhtml>
<version>0.1.0</version>
</Lso_Adminhtml>
</modules>
<global>
<blocks>
<adminhtml>
<rewrite>
<system_store_edit_form>Lso_Adminhtml_Block_System_Store_Edit_Form</system_store_edit_form>
</rewrite>
</adminhtml>
</blocks>
</global>
</config>
As far as I understand my class Lso_Adminhtml_Block_System_Store_Edit_Form
should be called for rendering and die()?
/app/code/local/Lso/Adminhtml/Block/System/Store/Edit/Form.php
<?php class Lso_Adminhtml_Block_System_Store_Edit_Form extends Mage_Adminhtml_Block_System_Store_Edit_Form{
public function __construct()
{
die(123);
}
}
?>
What I am missing here?
Thanks in advance!
Update: one more file /app/etc/modules/Lso_Adminhtml.xml
<?xml version="1.0"?>
<config>
<modules>
<Lso_Adminhtml>
<active>true</active>
<codePool>local</codePool>
</Lso_Adminhtml>
</modules>
</config>
Update: mangento version 1.9.1.1
Solution
Ok so i just tried your code and it works fine, however the die
function actually does not output anything.
Changed it to Mage::log(123);
and i got an output in the system log. So it definitely works.
I even echo 'hello';
just to be sure.
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange