Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Cannot Redeclare Class Exception
 
shuron
Member
 
Avatar
Total Posts:  58
Joined:  2007-12-09
 

Hello everybody,

I get “Cannot redeclare Class"- exceptions on overriding of Adminhtml/Sales/order/Create/Search/Grid.php in my own module. Which means that this class is about to be includet twice.
I don’t know why does it happen. It is my second module. Fist module has override models and it worked fine.
this wine ovverides part of a Block - a Blockwidget.

<config>
    <
modules>
        <
Techphp_AdvancedBP>
            <
version>0.0.1</version>
        </
Techphp_AdvancedBP>
    </
modules>
    
    <global>
        <
models>
        </
models>
        <
blocks>    
            <
adminhtml>
                <
rewrite>
<
sales_order_create_search_grid>Techphp_AdvancedBP_Block_Sales_Order_Create_Search_Grid</sales_order_create_search_grid>
                </
rewrite>
            </
adminhtml>     
        </
blocks>
               <
resources>
            <
advancedbp_setup>
                <
setup>
                    <
module>Techphp_AdvancedBP</module>
                </
setup>
                <
connection>
                    <use>
core_setup</use>
                </
connection>
            </
advancedbp_setup>
            <
advancedbp_write>
                <use>
core_write</use>
            </
advancedbp_write>
            <
advancedbp_read>
                <use>
core_read</use>
            </
advancedbp_read>
        </
resources>
    </global>
</
config>

Class def.

class Techph_AdvancedBP_Block_Sales_Order_Create_Search_Grid extends Mage_Adminhtml_Block_Widget_Grid
{
....

Can anybopdy give me a hint why does it happen?

 
Magento Community Magento Community
Magento Community
Magento Community
 
shuron
Member
 
Avatar
Total Posts:  58
Joined:  2007-12-09
 

I found the problem it was a typo. Sorry

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top