Magento - plugin overwrite local.xml block - magento

I have a local.xml file that has the following:
<default>
<cms_index_index translate="label">
<reference name="masthead">
<block type="page/html" template="cms/masthead/homepage.phtml" as="banners" />
</reference>
</cms_index_index translate="label">
</default>
I have a plugin that has it's own config.xml - I wish to override the above block with a template located in: /app/code/local/MageWorx/GeoIP/cms/homepage.phtml.
The config.xml file is however different and looks like:
<config>
<modules>
<MageWorx_GeoIP>
<version>1.0.7</version>
</MageWorx_GeoIP>
</modules>
<frontend>
<translate>
<modules>
<MageWorx_GeoIP>
<files>
<default>MageWorx_GeoIP.csv</default>
</files>
</MageWorx_GeoIP>
</modules>
</translate>
<routers>
<geoip>
<use>standard</use>
<args>
<module>MageWorx_GeoIP</module>
<frontName>geoip</frontName>
</args>
</geoip>
</routers>
<layout>
<updates>
<geoip>
<file>geoip.xml</file>
</geoip>
</updates>
</layout>
<events>
<controller_action_predispatch>
<observers>
<geoip>
<type>singleton</type>
<class>MageWorx_GeoIP_Model_Observer</class>
<method>geoipAutoswitcher</method>
</geoip>
</observers>
</controller_action_predispatch>
<controller_action_predispatch_directory_currency_switch>
<observers>
<geoip>
<type>singleton</type>
<class>MageWorx_GeoIP_Model_Observer</class>
<method>setCurrency</method>
</geoip>
</observers>
</controller_action_predispatch_directory_currency_switch>
</events>
</frontend>
<global>
<models>
<geoip>
<class>MageWorx_GeoIP_Model</class>
<resourceModel>geoip_mysql4</resourceModel>
</geoip>
<geoip_mysql4>
<class>MageWorx_GeoIP_Model_Mysql4</class>
</geoip_mysql4>
<core>
<rewrite>
<store>MageWorx_GeoIP_Model_Core_Store</store>
</rewrite>
</core>
</models>
<resources>
<geoip_setup>
<setup>
<module>MageWorx_GeoIP</module>
<class>MageWorx_GeoIP_Model_Mysql4_Setup</class>
</setup>
<connection>
<use>core_setup</use>
</connection>
</geoip_setup>
<geoip_write>
<connection>
<use>core_write</use>
</connection>
</geoip_write>
<geoip_read>
<connection>
<use>core_read</use>
</connection>
</geoip_read>
</resources>
<blocks>
<geoip>
<class>MageWorx_GeoIP_Block</class>
</geoip>
<adminhtml>
<rewrite>
<sales_order_view_info>MageWorx_Adminhtml_Block_Geoip_Adminhtml_Sales_Order_View_Info</sales_order_view_info>
<customer_online_grid>MageWorx_Adminhtml_Block_Geoip_Adminhtml_Customer_Online_Grid</customer_online_grid>
<system_store_edit_form>MageWorx_Adminhtml_Block_Geoip_Adminhtml_System_Store_Edit_Form</system_store_edit_form>
</rewrite>
</adminhtml>
<checkout>
<rewrite>
<onepage_billing>MageWorx_GeoIP_Block_Checkout_Onepage_Billing</onepage_billing>
<onepage_shipping>MageWorx_GeoIP_Block_Checkout_Onepage_Shipping</onepage_shipping>
</rewrite>
</checkout>
<customer>
<rewrite>
<address_edit>MageWorx_GeoIP_Block_Customer_Address_Edit</address_edit>
</rewrite>
</customer>
</blocks>
<helpers>
<geoip>
<class>MageWorx_GeoIP_Helper</class>
</geoip>
</helpers>
</global>
<adminhtml>
<acl>
<resources>
<all><title>Allow Everything</title></all>
<admin>
<children>
<system>
<children>
<config>
<children>
<mageworx_customers translate="title" module="mageworx">
<title>MageWorx > Customers</title>
<sort_order>1</sort_order>
<children>
<geoip translate="title" module="geoip">
<title>GeoIP Location</title>
</geoip>
</children>
</mageworx_customers>
</children>
</config>
</children>
</system>
</children>
</admin>
</resources>
</acl>
<layout>
<updates>
<geoip>
<file>geoip.xml</file>
</geoip>
</updates>
</layout>
</adminhtml>
<default>
<mageworx_customers>
<geoip>
<enable_store_switcher>1</enable_store_switcher>
<enable_currency_switcher>1</enable_currency_switcher>
<force_store_view>1</force_store_view>
<store_switcher_scope>1</store_switcher_scope>
<disable_store_switcher_key>off</disable_store_switcher_key>
<store_switcher_exception_urls>/paypal/*</store_switcher_exception_urls>
<db_type>1</db_type>
<db_path>lib/GeoIP/GeoIP.dat</db_path>
<enable_billing_country>1</enable_billing_country>
<enable_shipping_country>1</enable_shipping_country>
<enable_address_country>1</enable_address_country>
</geoip>
</mageworx_customers>
</default>
Does anyone know where and what I should add in that config.xml to override the local.xml block?

you can not override any of your block or action with local.xml to config.xml
here is magento truth is
config.xml and local.xml are loaded together, along with any other xml file you place in app/local. They are loaded in Mage_Core_Model_Config::loadBase()
public function loadBase()
{
$etcDir = $this->getOptions()->getEtcDir();
$files = glob($etcDir.DS.'*.xml');
$this->loadFile(current($files));
while ($file = next($files)) {
$merge = clone $this->_prototype;
$merge->loadFile($file);
$this->extend($merge);
}
if (in_array($etcDir.DS.'local.xml', $files)) {
$this->_isLocalConfigLoaded = true;
}
return $this;
}
And if your want to understand more about local.xml, see this.
hope you can understand more clearly now.

Related

Magento - How to add custom block at the /checkout/cart/ page?

I am working on a custom extension and i want to add additional block to the /checkout/cart/ page.
Take a look:
Here is my config:
<?xml version="1.0"?>
<config>
<modules>
<VivasIndustries_ExpressDelivery>
<version>1.0.0</version>
</VivasIndustries_ExpressDelivery>
</modules>
<global>
<models>
<expressdelivery>
<class>VivasIndustries_ExpressDelivery_Model</class>
<resourceModel>vivasindustries_expressdelivery_resource</resourceModel>
</expressdelivery>
<vivasindustries_expressdelivery_resource>
<class>VivasIndustries_ExpressDelivery_Model_Resource</class>
<entities>
<expressdelivery>
<table>VivasIndustries_ExpressDelivery</table>
</expressdelivery>
</entities>
</vivasindustries_expressdelivery_resource>
</models>
<resources>
<expressdelivery_setup>
<setup>
<module>VivasIndustries_ExpressDelivery</module>
</setup>
<connection>
<use>core_setup</use>
</connection>
</expressdelivery_setup>
<expressdelivery_read>
<connection>
<use>core_read</use>
</connection>
</expressdelivery_read>
<expressdelivery_write>
<connection>
<use>core_write</use>
</connection>
</expressdelivery_write>
</resources>
<helpers>
<expressdelivery>
<class>VivasIndustries_ExpressDelivery_Helper</class>
</expressdelivery>
</helpers>
<blocks>
<expressdelivery>
<class>VivasIndustries_ExpressDelivery_Block</class>
</expressdelivery>
</blocks>
</global>
<adminhtml>
<acl>
<resources>
<all>
<title>Allow Everything</title>
</all>
<admin>
<children>
<system>
<children>
<config>
<children>
<expressdeliveryadmin>
<title>Vivas - All</title>
</expressdeliveryadmin>
</children>
</config>
</children>
</system>
</children>
</admin>
</resources>
</acl>
<layout>
<updates>
<expressdelivery>
<file>expressdelivery.xml</file>
</expressdelivery>
</updates>
</layout>
</adminhtml>
<admin>
<routers>
<adminhtml>
<args>
<modules>
<VivasIndustries_ExpressDelivery before="Mage_Adminhtml">VivasIndustries_ExpressDelivery_Adminhtml</VivasIndustries_ExpressDelivery>
</modules>
</args>
</adminhtml>
</routers>
</admin>
</config>
How can i add a custom block bellow that block?
Can you please help me out?
Thanks in advance!
For example If you want to add a static block outsite the cart total:
Add below code at checkout_cart_index handle after the cart_totals block in your theme/layout/checkout.xml like
<block type="checkout/cart_totals" name="checkout.cart.totals" as="totals" template="checkout/cart/totals.phtml"/>
<block type="cms/block" name="customblock" after="totals" >
<action method="setBlockId"><block_id>myblock</block_id></action>
</block>
after that call this block in you cart.phtml file after closing tag of
"<div class="cart-totals">"
like:
<?php echo $this->getChildHtml('customblock') ?>
In your case you can create a phtml file for your block and can show as above.

adminhtml tag in config.xml file does not work

I am new to magento and making a custom module and want to work on admin end but after installing extension I get this error:
Fatal error: Class 'Submitdigital_CustomLogo_Helper_Data' not found in /var/zpanel/hostdata/zadmin/public_html/unisport_com/app/Mage.php on line 547
After insatalling extension when I clear cashe it give me this error. After somestudy I found that the error is due to this file at path:
app/code/local/Submitdigital/CustomLogo/etc/config.xml
<?xml version="1.0"?>
<config>
<modules>
<Submitdigital_CustomLogo>
<version>0.1.0</version>
</Submitdigital_CustomLogo>
</modules>
<global>
<helpers>
<customlogo>
<class>Submitdigital_CustomLogo_Helper</class>
</customlogo>
</helpers>
<blocks>
<customlogo>
<class>Submitdigital_CustomLogo_Block</class>
</customlogo>
</blocks>
<models>
<customlogo>
<class>Submitdigital_CustomLogo_Model</class>
<resourceModel>customlogo_mysql4</resourceModel>
</customlogo>
<customlogo_mysql4>
<class>Submitdigital_CustomLogo_Model_Mysql4</class>
<entities>
<customlogo>
<table>customlogo</table>
</customlogo>
</entities>
</customlogo_mysql4>
</models>
<resources>
<customlogo_setup>
<setup>
<module>Submitdigital_CustomLogo</module>
<class>Mage_Eav_Model_Entity_Setup</class>
</setup>
<connection>
<use>core_setup</use>
</connection>
</customlogo_setup>
<customlogo_write>
<connection>
<use>core_write</use>
</connection>
</customlogo_write>
<customlogo_read>
<connection>
<use>core_read</use>
</connection>
</customlogo_read>
</resources>
</global>
<admin>
<routers>
<admin_customlogo>
<use>admin</use>
<args>
<module>Submitdigital_CustomLogo</module>
<frontName>admin_customlogo</frontName>
</args>
</admin_customlogo>
</routers>
</admin>
<adminhtml>
<menu>
<customlogo module="customlogo">
<title>SubmitDigital</title>
<sort_order>100</sort_order>
<children>
<customlogo module="customlogo">
<title>Manage Customlogo</title>
<sort_order>0</sort_order>
<action>customlogo/adminhtml_customlogo</action>
</customlogo>
</children>
</customlogo>
</menu>
<acl>
<resources>
<all>
<title>Allow Everything</title>
</all>
<admin>
<children>
<customlogo translate="title" module="customlogo">
<title>SubmitDigital</title>
<sort_order>1000</sort_order>
<children>
<customlogo translate="title">
<title>Manage Customlogo</title>
<sort_order>0</sort_order>
</customlogo>
</children>
</customlogo>
</children>
</admin>
</resources>
</acl>
<layout>
<updates>
<customlogo>
<file>customlogo.xml</file>
</customlogo>
</updates>
</layout>
</adminhtml>
<frontend>
<routers>
<customlogo>
<use>standard</use>
<args>
<module>Submitdigital_CustomLogo</module>
<frontName>customlogo</frontName>
</args>
</customlogo>
</routers>
<layout>
<updates>
<customlogo>
<file>customlogo.xml</file>
</customlogo>
</updates>
</layout>
</frontend>
</config>
all goes well with the file but when I add <adminhtml>...</adminhtml> in the file it gives the above error and hence I am not able to see anything at my admin end.
Please Help
here is my customlogo.xml
<?xml version="1.0"?>
<layout version="0.1.0">
<customlogo_adminhtml_customlogo_index>
<reference name="content">
<block type="customlogo/adminhtml_customlogo" name="customlogo" />
</reference>
</customlogo_adminhtml_customlogo_index>
</layout>
You have to create the helper class to fix this issue.
app/code/local/Submitdigital/CustomLogo/Helper/Data.php
class Submitdigital_CustomLogo_Helper_Data extends Mage_Core_Helper_Abstract
{
}
You have the following code to call the helper
<customlogo module="customlogo">
Here
module parameter is used to call the helper for translation.

Shows wrong url for a custom module magento

I have created a custom module 'Measurement'.and the frontend url is http://urbanior.grapesdigital.com/measurement/.
I want to add a link in left side like Measurements in my account page. so I added this in my measurement.xml page
measuement.xml
<customer_account>
<reference name="customer_account_navigation">
<action method="addLink" translate="label" module="measurement"><name>grapes_measurement</name><path>measurement/</path><label>Measurements</label></action>
</reference>
</customer_account>
config.xml
<?xml version="1.0"?>
<config>
<modules>
<Grapes_Measurement>
<version>0.1.0</version>
</Grapes_Measurement>
</modules>
<frontend>
<routers>
<measurement>
<use>standard</use>
<args>
<module>Grapes_Measurement</module>
<frontName>measurement</frontName>
</args>
</measurement>
</routers>
<layout>
<updates>
<measurement>
<file>measurement.xml</file>
</measurement>
</updates>
</layout>
</frontend>
<global>
<helpers>
<measurement>
<class>Grapes_Measurement_Helper</class>
</measurement>
</helpers>
<blocks>
<measurement>
<class>Grapes_Measurement_Block</class>
</measurement>
</blocks>
<models>
<measurement>
<class>Grapes_Measurement_Model</class>
<resourceModel>measurement_mysql4</resourceModel>
</measurement>
<measurement_mysql4>
<class>Grapes_Measurement_Model_Mysql4</class>
<entities>
<measurement>
<table>measurements</table>
</measurement>
</entities>
</measurement_mysql4>
</models>
<resources>
<measurement_setup>
<setup>
<module>Grapes_Measurement</module>
</setup>
<connection>
<use>core_setup</use>
</connection>
</measurement_setup>
<measurement_write>
<connection>
<use>core_write</use>
</connection>
</measurement_write>
<measurement_read>
<connection>
<use>core_read</use>
</connection>
</measurement_read>
</resources>
</global>
<admin>
<routers>
<measurement>
<use>admin</use>
<args>
<module>Grapes_Measurement</module>
<frontName>admin_measurement</frontName>
</args>
</measurement>
</routers>
</admin>
<adminhtml>
<menu>
<measurement module="measurement">
<title>Measurement</title>
<sort_order>100</sort_order>
<children>
<measurement module="measurement">
<title>Manage Measurement</title>
<sort_order>0</sort_order>
<action>admin_measurement/adminhtml_measurement</action>
</measurement>
</children>
</measurement>
</menu>
<acl>
<resources>
<all>
<title>Allow Everything</title>
</all>
<admin>
<children>
<measurement translate="title" module="measurement">
<title>Measurement</title>
<sort_order>1000</sort_order>
<children>
<measurement translate="title">
<title>Manage Measurement</title>
<sort_order>0</sort_order>
</measurement>
</children>
</measurement>
</children>
</admin>
</resources>
</acl>
<layout>
<updates>
<measurement>
<file>measurement.xml</file>
</measurement>
</updates>
</layout>
</adminhtml>
</config>
But when I click on this link, it shows the url like http://urbanior.grapesdigital.com/admin_measurement/
It is taking the admin route path instead of frontend path. I don't know how to resolve this issue. It opens the same page but URL is different.
please check in config.xml you have same route "measurement" for admin please remove admin route or change it.

Mage registry key “_singleton/ Observer” already exists

Getting the error Mage registry key "_singleton/Mynamepsace_Dealers_Model_Observer" already exists when admin creates new order. In my config.xml I didn't find any error. I checked lot of posts regarding this issue, but did not trace the solution. Here is my config.xml -
<config>
<modules>
<Mynamespace_Dealers>
<version>1.4.0</version>
</Mynamespace_Dealers>
</modules>
<frontend>
<routers>
<dealers>
<use>standard</use>
<args>
<module>Mynamespace_Dealers</module>
<frontName>dealers</frontName>
</args>
</dealers>
</routers>
<layout>
<updates>
<dealers>
<file>dealers.xml</file>
</dealers>
</updates>
</layout>
</frontend>
<admin>
<routers>
<dealers>
<use>admin</use>
<args>
<module>Mynamespace_Dealers</module>
<frontName>dealers</frontName>
</args>
</dealers>
</routers>
</admin>
<adminhtml>
<events>
<sales_order_save_before>
<observers>
<dealers_order_save_before>
<class>Mynamepsace_Dealers_Model_Observer</class>
<method>orderSaveBefore</method>
</dealers_order_save_before>
</observers>
</sales_order_save_before>
</events>
<menu>
<dealers module="dealers">
<title>Dealers</title>
<sort_order>71</sort_order>
<children>
<items module="dealers">
<title>Manage Dealers</title>
<sort_order>0</sort_order>
<action>dealers/adminhtml_dealers</action>
</items>
</children>
</dealers>
</menu>
<acl>
<resources>
<admin>
<children>
<system>
<children>
<config>
<children>
<dealers translate="title" module="dealers">
<title>Dealers Section</title>
<sort_order>50</sort_order>
</dealers>
</children>
</config>
</children>
</system>
</children>
</admin>
</resources>
</acl>
<layout>
<updates>
<dealers>
<file>dealers.xml</file>
</dealers>
</updates>
</layout>
</adminhtml>
<global>
<models>
<dealers>
<class>Mynamespace_Dealers_Model</class>
<resourceModel>dealers_mysql4</resourceModel>
</dealers>
<dealers_mysql4>
<class>Mynamespace_Dealers_Model_Mysql4</class>
<entities>
<order><table>sales_order</table></order>
</entities>
</dealers_mysql4>
</models>
<resources>
<dealers_setup>
<setup>
<module>Mynamespace_Dealers</module>
<class>Mage_Sales_Model_Mysql4_Setup</class>
</setup>
<connection>
<use>core_setup</use>
</connection>
</dealers_setup>
<dealers_write>
<connection>
<use>core_write</use>
</connection>
</dealers_write>
<dealers_read>
<connection>
<use>core_read</use>
</connection>
</dealers_read>
</resources>
<blocks>
<dealers>
<class>Mynamespace_Dealers_Block</class>
</dealers>
</blocks>
<helpers>
<dealers>
<class>Mynamespace_Dealers_Helper</class>
</dealers>
</helpers>
</global>
</config>
and here is my observer class-
<?php
class Mynamepsace_Dealers_Model_Observer
{
public function orderSaveBefore()
{
echo "I am here"; exit;
$order = $observer->getEvent()->getOrder();
}
}
Replace this code :
<events>
<sales_order_save_before>
<observers>
<dealers_order_save_before>
<class>Mynamepsace_Dealers_Model_Observer</class>
<method>orderSaveBefore</method>
</dealers_order_save_before>
</observers>
</sales_order_save_before>
</events>
with
<events>
<sales_order_save_before>
<observers>
<dealers_order_save_before>
<type>singleton</type>
<class>Mynamepsace_Dealers_Model_Observer</class>
<method>orderSaveBefore</method>
</dealers_order_save_before>
</observers>
</sales_order_save_before>
</events>
in config.xml
Note that <dealers_order_save_before> this should be unique. Check that you have used this anywhere in the other module in the same application.
Cheers :-)

Magento plugins

I am trying to install 2 plugins for magento: free-testimonial and MW_EasyTestimonial.
During installation I found that 2 plugins using the same names:
file app\code\community\Magebuzz\Testimonial\etc\config.xml:
<default>
<testimonial>
<general_option>
<show_link_testimonial>1</show_link_testimonial>
<enable_sidebar>1</enable_sidebar>
<enable_testimonial_paging>1</enable_testimonial_paging>
<divide_page>9, 15, 30, 'all'</divide_page>
<max_testimonials_sidebar>3</max_testimonials_sidebar>
<testimonial_sidebar_slider>0</testimonial_sidebar_slider>
</general_option>
<testimonial_options>
<testimonial_captcha_enabled>1</testimonial_captcha_enabled>
<allow_customers_write_testimonial >1</allow_customers_write_testimonial >
<allow_guest_write_testimonial>0</allow_guest_write_testimonial>
<approve_testimonial>1</approve_testimonial>
<thank_message><![CDATA[Your testimonial was successfully posted and waiting for approval.]]></thank_message>
</testimonial_options>
<email_configuration>
<send_email_after_post_testimonial>0</send_email_after_post_testimonial>
<send_email_after_approve_testimonial>0</send_email_after_approve_testimonial>
<select_template_post>testimonial_email_configuration_select_template_post</select_template_post>
<select_template_approve>testimonial_email_configuration_select_template_approve</select_template_approve>
</email_configuration>
</testimonial>
</default>
<modules>
<Magebuzz_Testimonial>
<version>0.1.4</version>
</Magebuzz_Testimonial>
</modules>
<frontend>
<routers>
<testimonial>
<use>standard</use>
<args>
<module>Magebuzz_Testimonial</module>
<frontName>testimonial</frontName>
</args>
</testimonial>
</routers>
<layout>
<updates>
<testimonial>
<file>testimonial.xml</file>
</testimonial>
</updates>
</layout>
</frontend>
<admin>
<routers>
<testimonial>
<use>admin</use>
<args>
<module>Magebuzz_Testimonial</module>
<frontName>testimonial</frontName>
</args>
</testimonial>
</routers>
</admin>
<adminhtml>
<layout>
<updates>
<testimonial>
<file>testimonial.xml</file>
</testimonial>
</updates>
</layout>
</adminhtml>
<global>
<models>
<testimonial>
<class>Magebuzz_Testimonial_Model</class>
<resourceModel>testimonial_mysql4</resourceModel>
</testimonial>
<testimonial_mysql4>
<class>Magebuzz_Testimonial_Model_Mysql4</class>
<entities>
<testimonial>
<table>simple_testimonial</table>
</testimonial>
</entities>
</testimonial_mysql4>
</models>
<resources>
<testimonial_setup>
<setup>
<module>Magebuzz_Testimonial</module>
</setup>
<connection>
<use>core_setup</use>
</connection>
</testimonial_setup>
<testimonial_write>
<connection>
<use>core_write</use>
</connection>
</testimonial_write>
<testimonial_read>
<connection>
<use>core_read</use>
</connection>
</testimonial_read>
</resources>
<blocks>
<testimonial>
<class>Magebuzz_Testimonial_Block</class>
</testimonial>
</blocks>
<helpers>
<testimonial>
<class>Magebuzz_Testimonial_Helper</class>
</testimonial>
</helpers>
<template>
<email>
<testimonial_email_configuration_select_template_post translate="label" module="testimonial">
<label>Custom Email Template After Post Testimonial</label>
<file>email_template_after_post_testimonial.html</file>
<type>html</type>
</testimonial_email_configuration_select_template_post >
<testimonial_email_configuration_select_template_approve translate="label" module="testimonial">
<label>Custom Email Template After Approve Testimonial</label>
<file>email_template_after_approve_testimonial.html</file>
<type>html</type>
</testimonial_email_configuration_select_template_approve >
</email>
</template>
</global>
file app\code\local\Hm\Testimonial\etc\config.xml:
<modules>
<Hm_Testimonial>
<version>2.2.3</version>
</Hm_Testimonial>
</modules>
<frontend>
<secure_url>
<testimonial>/testimonial/</testimonial>
</secure_url>
<routers>
<testimonial>
<use>standard</use>
<args>
<module>Hm_Testimonial</module>
<frontName>testimonial</frontName>
</args>
</testimonial>
</routers>
<layout>
<updates>
<testimonial>
<file>testimonial.xml</file>
</testimonial>
</updates>
</layout>
<translate>
<modules>
<Hm_Testimonial>
<files>
<default>Hm_Testimonial.csv</default>
</files>
</Hm_Testimonial>
</modules>
</translate>
</frontend>
<admin>
<routers>
<testimonial>
<use>admin</use>
<args>
<module>Hm_Testimonial</module>
<frontName>testimonial</frontName>
</args>
</testimonial>
</routers>
</admin>
<adminhtml>
<translate>
<modules>
<Hm_Testimonial>
<files>
<default>Hm_Testimonial.csv</default>
</files>
</Hm_Testimonial>
</modules>
</translate>
<menu>
<testimonial module="testimonial">
<title>Testimonials</title>
<sort_order>71</sort_order>
<children>
<items module="testimonial">
<title>Manage Testimonials</title>
<sort_order>0</sort_order>
<action>testimonial/adminhtml_testimonial</action>
</items>
<configurations module="testimonial">
<title>Configuration</title>
<sort_order>1</sort_order>
<action>adminhtml/system_config/edit/section/hm_testimonial</action>
</configurations>
</children>
</testimonial>
</menu>
<acl>
<resources>
<all>
<title>Allow Everything</title>
</all>
<admin>
<children>
<Hm_Testimonial>
<title>Testimonial Module</title>
<sort_order>10</sort_order>
<items module="testimonial" translate="title">
<title>Manage Product</title>
<sort_order>0</sort_order>
</items>
<configurations module="testimonial" translate="title">
<title>Configurations</title>
<sort_order>30</sort_order>
</configurations>
</Hm_Testimonial>
<system>
<children>
<config>
<children>
<hm_testimonial>
<title>Hello Magento Testimonial</title>
</hm_testimonial>
</children>
</config>
</children>
</system>
</children>
</admin>
</resources>
</acl>
<layout>
<updates>
<testimonial>
<file>testimonial.xml</file>
</testimonial>
</updates>
</layout>
</adminhtml>
<global>
<models>
<testimonial>
<class>Hm_Testimonial_Model</class>
<resourceModel>testimonial_mysql4</resourceModel>
</testimonial>
<testimonial_mysql4>
<class>Hm_Testimonial_Model_Mysql4</class>
<entities>
<testimonial>
<table>testimonial</table>
</testimonial>
<testimonial_store>
<table>testimonial_store</table>
</testimonial_store>
</entities>
</testimonial_mysql4>
</models>
<resources>
<testimonial_setup>
<setup>
<module>Hm_Testimonial</module>
</setup>
<connection>
<use>core_setup</use>
</connection>
</testimonial_setup>
<testimonial_write>
<connection>
<use>core_write</use>
</connection>
</testimonial_write>
<testimonial_read>
<connection>
<use>core_read</use>
</connection>
</testimonial_read>
</resources>
<blocks>
<testimonial>
<class>Hm_Testimonial_Block</class>
</testimonial>
</blocks>
<helpers>
<testimonial>
<class>Hm_Testimonial_Helper</class>
</testimonial>
</helpers>
<template>
<email>
<testimonial_email_email_template translate="label" module="contacts">
<label>Testimonial Email</label>
<file>testimonial_email.html</file>
<type>text</type>
</testimonial_email_email_template>
</email>
</template>
<events>
<controller_front_init_before>
<observers>
<testimonial>
<type>singleton</type>
<class>Hm_Testimonial_Model_Observer</class>
<method>checkLicense</method>
</testimonial>
</observers>
</controller_front_init_before>
</events>
</global>
<default>
<hm_testimonial>
<general>
<enable>0</enable>
<maxword>30</maxword>
<delay>4000</delay>
<width>160</width>
<height>160</height>
<slider>fadeZoom</slider>
<heightslide>400</heightslide>
<allow_media>1</allow_media>
<allow_media_popup>1</allow_media_popup>
<total>5</total>
<maxfilesize>0</maxfilesize>
</general>
<email>
<template_email>testimonial_email_email_template</template_email>
</email>
</hm_testimonial>
</default>
How can I arrange installation of 2 plugins?
It's gonna take quite a few code changes, and most probably it would be easier to merge in any function missing from one of them, from the code in the other one.
You could of course try to change all the <testimonial> to <hm_testimonial> in the second XML, but that would also require that you change each PHP file in that module to use the corresponding getModel('hm_testimonial/model'), Mage::helper('hm_testimonial') and so on in probably every place you see "testimonial" mentioned adding "hm_" to the start.
At least it doesn't look like they are overriding any core classes, that would have made it much trickier.

Resources