/ / Wtyczki Magento - magento, wtyczki

Wtyczki Magento - Magento, wtyczki

Próbuję zainstalować 2 wtyczki do magento: free-testimonial i MW_EasyTestimonial. Podczas instalacji stwierdziłem, że 2 wtyczki o tych samych nazwach:

plik appcodecommunityMagebuzzTestimonialetcconfig.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>

plik appcodelocalHmTestimonialetcconfig.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>

Jak mogę zorganizować instalację 2 wtyczek?

Odpowiedzi:

0 dla odpowiedzi № 1

To zajmie sporo zmian w kodzie i najprawdopodobniej łatwiej byłoby scalić jakąkolwiek funkcję, której brakuje w jednej z nich, z kodem w drugiej.

Możesz oczywiście spróbować zmienić wszystkie pliki <testimonial> do <hm_testimonial> w drugim pliku XML, ale wymagałoby to również zmiany każdego pliku PHP w tym module, aby używał odpowiedniego getModel("hm_testimonial/model"), Mage::helper("hm_testimonial") i tak dalej, chyba w każdym miejscu, w którym widzisz "referencje", wspominano o dodaniu "hm_" na początku.

Przynajmniej nie wygląda na to, że przesłaniają jakiekolwiek podstawowe klasy, co znacznie utrudniłoby sprawę.