admin で致命的なエラー「Fatal error: Class 'Mage_Giftcards_Helper_Data' not found in ..../app/Mage.php on line 546」をスローする 1 つのモジュール拡張機能をインストールしました。
このリンクhttps://stackoverflow.com/a/9191286/2919940とこのリンクも参照しましたhttps://magento.stackexchange.com/a/7133/3693
しかし、私は持っています
<global>
<helpers>
<giftcards>
<class>Webtex_Giftcards_Helper</class>
</giftcards>
</helpers>
</global>
私のconfig.xmlで、私はこのクラスを持っています
class Webtex_Giftcards_Helper_Data extends Mage_Core_Helper_Data{
// my methods
}
「/app/code/local/Webtex/Giftcards/Helper/Data.php」パスで宣言されています。
空の「var/cache」ディレクトリを作成して、コンパイラを無効にし、キャッシュをクリアしました。
config.xml にはヘルパー クラスを定義する必要があり、Data.php にはそのヘルパー クラスを宣言する必要があります。
しかし、私の場合は両方ありますが、このエラーの理由は何ですか? 私はそのモジュールを私の新しいmagentoインストールでもテストしました。
Magento のバージョンは 1.7.0.2 です
このエラーのヘルプを提供してください?? クラス名の競合がある場合、どうすればそれをデバッグできますか??
更新: これが私の app/etc/modules/Webtex_Giftcards.xml ファイルです。
<?xml version="1.0"?>
<config>
<modules>
<Webtex_Giftcards>
<active>true</active>
<codePool>local</codePool>
<name>Webtex Gift Cards</name>
</Webtex_Giftcards>
</modules>
</config>
そして、これが私のsystem.xmlファイルです
<?xml version="1.0"?>
<config>
<tabs>
<webtex translate="label" module="giftcards">
<label>WebTex</label>
<sort_order>300</sort_order>
</webtex>
</tabs>
<sections>
<giftcards module="giftcards">
<tab>webtex</tab>
<label>Gift Cards</label>
<frontend_type>text</frontend_type>
<sort_order>200</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<groups>
<default module="giftcards">
<label>Defaults</label>
<frontend_type>text</frontend_type>
<sort_order>10</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<fields>
<min_card_value>
<label>Min Gift Card Value</label>
<frontend_type>text</frontend_type>
<sort_order>20</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</min_card_value>
<max_card_value>
<label>Max Gift Card Value</label>
<frontend_type>text</frontend_type>
<sort_order>21</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</max_card_value>
<show_in_shopping_cart>
<label>Show In Shopping Cart Page</label>
<frontend_type>select</frontend_type>
<source_model>adminhtml/system_config_source_yesno</source_model>
<sort_order>22</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</show_in_shopping_cart>
<show_as_payment_method>
<label>Show As Payment Method</label>
<frontend_type>select</frontend_type>
<source_model>adminhtml/system_config_source_yesno</source_model>
<sort_order>22</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</show_as_payment_method>
<show_mail_delivery_date_field>
<label>Show email delivery date field</label>
<frontend_type>select</frontend_type>
<source_model>adminhtml/system_config_source_yesno</source_model>
<sort_order>23</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</show_mail_delivery_date_field>
</fields>
</default>
<email module="giftcards">
<label>Email Options</label>
<frontend_type>text</frontend_type>
<sort_order>50</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<fields>
<card_picture>
<label>Use default GiftCard picture for Email</label>
<frontend_type>select</frontend_type>
<source_model>adminhtml/system_config_source_yesno</source_model>
<sort_order>24</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<comment>Set "No" for use product picture</comment>
</card_picture>
<email_template>
<label>Template for e-mail</label>
<frontend_type>select</frontend_type>
<source_model>adminhtml/system_config_source_email_template</source_model>
<sort_order>30</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</email_template>
<print_template>
<label>Template for print</label>
<frontend_type>select</frontend_type>
<source_model>adminhtml/system_config_source_email_template</source_model>
<sort_order>30</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</print_template>
<offline_template>
<label>Template for offline</label>
<frontend_type>select</frontend_type>
<source_model>adminhtml/system_config_source_email_template</source_model>
<sort_order>30</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</offline_template>
<confirm_template>
<label>Template for confirmation</label>
<frontend_type>select</frontend_type>
<source_model>adminhtml/system_config_source_email_template</source_model>
<sort_order>30</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</confirm_template>
</fields>
</email>
</groups>
</giftcards>
</sections>
</config>
そして、これが私のconfig.xmlファイルです。
<?xml version="1.0"?>
<config>
<modules>
<Webtex_Giftcards>
<version>3.3.1</version>
</Webtex_Giftcards>
</modules>
<admin>
<routers>
<giftcards>
<use>admin</use>
<args>
<module>Webtex_Giftcards</module>
<frontName>giftcards</frontName>
</args>
</giftcards>
<adminhtml>
<args>
<modules>
<Webtex_Giftcards before="Mage_Adminhtml">Webtex_Giftcards_Adminhtml</Webtex_Giftcards>
</modules>
</args>
</adminhtml>
</routers>
</admin>
<frontend>
<routers>
<checkout>
<args>
<modules>
<Webtex_Giftcards before="Mage_Checkout">Webtex_Giftcards</Webtex_Giftcards>
</modules>
</args>
</checkout>
</routers>
<layout>
<updates>
<giftcards>
<file>giftcards.xml</file>
</giftcards>
</updates>
</layout>
<translate>
<modules>
<Webtex_Giftcards>
<files>
<default>Webtex_Giftcards.csv</default>
</files>
</Webtex_Giftcards>
</modules>
</translate>
</frontend>
<global>
<rewrite>
<giftcards_giftcards_index>
<from><![CDATA[#^/customer/giftcards/#]]></from>
<to>/giftcards/giftcards/</to>
</giftcards_giftcards_index>
<giftcards_giftcards_balance>
<from><![CDATA[#^/customer/giftcards/balance/#]]></from>
<to>/giftcards/giftcards/balance/</to>
</giftcards_giftcards_balance>
<giftcards_giftcards_print>
<from><![CDATA[#^/customer/giftcards/print/#]]></from>
<to>/giftcards/giftcards/print/</to>
</giftcards_giftcards_print>
<giftcards_giftcards_apply>
<from><![CDATA[#^/customer/giftcards/apply/#]]></from>
<to>/giftcards/giftcards/apply/</to>
</giftcards_giftcards_apply>
</rewrite>
<models>
<giftcards>
<class>Webtex_Giftcards_Model</class>
<resourceModel>giftcards_mysql4</resourceModel>
</giftcards>
<giftcards_mysql4>
<class>Webtex_Giftcards_Model_Mysql4</class>
<entities>
<giftcards>
<table>giftcards_card</table>
</giftcards>
<cardslist>
<table>giftcards_cardlist</table>
</cardslist>
<order>
<table>giftcard_order</table>
</order>
</entities>
</giftcards_mysql4>
<sales>
<rewrite>
<order>Webtex_Giftcards_Model_Sales_Order</order>
</rewrite>
</sales>
</models>
<resources>
<giftcards_setup>
<setup>
<module>Webtex_Giftcards</module>
<class>Mage_Catalog_Model_Resource_Eav_Mysql4_Setup</class>
</setup>
<connection>
<use>core_setup</use>
</connection>
</giftcards_setup>
</resources>
<helpers>
<giftcards>
<class>Webtex_Giftcards_Helper</class>
</giftcards>
</helpers>
<blocks>
<giftcards>
<class>Webtex_Giftcards_Block</class>
</giftcards>
</blocks>
<events>
<catalog_product_save_before>
<observers>
<webtex_giftcards_observer_catalog_product_save_after>
<type>singleton</type>
<class>giftcards/observer</class>
<method>catalogProductSaveBefore</method>
</webtex_giftcards_observer_catalog_product_save_after>
</observers>
</catalog_product_save_before>
<order_cancel_after>
<observers>
<webtex_giftcards_observer_sales_order_cancel_after>
<type>singleton</type>
<class>giftcards/observer</class>
<method>salesOrderCancelAfter</method>
</webtex_giftcards_observer_sales_order_cancel_after>
</observers>
</order_cancel_after>
<sales_order_payment_refund>
<observers>
<webtex_giftcards_observer_sales_order_creditmemo_refund>
<type>singleton</type>
<class>giftcards/observer</class>
<method>saleOrderPaymentRefund</method>
</webtex_giftcards_observer_sales_order_creditmemo_refund>
</observers>
</sales_order_payment_refund>
<sales_order_save_after>
<observers>
<webtex_giftcards_observer_sales_order_save_after>
<type>singleton</type>
<class>giftcards/observer</class>
<method>salesOrderSaveAfter</method>
</webtex_giftcards_observer_sales_order_save_after>
</observers>
</sales_order_save_after>
<sales_model_service_quote_submit_after>
<observers>
<webtex_giftcards_observer_checkout_type_onepage_save_order_after>
<type>singleton</type>
<class>giftcards/observer</class>
<method>checkoutTypeOnepageSaveOrderAfter</method>
</webtex_giftcards_observer_checkout_type_onepage_save_order_after>
</observers>
</sales_model_service_quote_submit_after>
<core_block_abstract_to_html_after>
<observers>
<webtex_giftcards_observer_checkpriceiszero>
<type>singleton</type>
<class>giftcards/observer</class>
<method>checkpriceiszero</method>
</webtex_giftcards_observer_checkpriceiszero>
</observers>
</core_block_abstract_to_html_after>
<sales_quote_collect_totals_after>
<observers>
<webtex_giftcards_discount_observer_testdiscountquote>
<type>singleton</type>
<class>giftcards/discount_observer</class>
<method>testDiscountQuote</method>
</webtex_giftcards_discount_observer_testdiscountquote>
</observers>
</sales_quote_collect_totals_after>
</events>
<template>
<email>
<giftcards_email_email_template translate="label" module="giftcards">
<label>Gift Card E-mail</label>
<file>giftcard_email.html</file>
<type>html</type>
</giftcards_email_email_template>
<giftcards_email_print_template translate="label" module="giftcards">
<label>Gift Card Print</label>
<file>giftcard_print.html</file>
<type>html</type>
</giftcards_email_print_template>
<giftcards_email_offline_template translate="label" module="giftcards">
<label>Gift Card Offline</label>
<file>giftcard_offline.html</file>
<type>html</type>
</giftcards_email_offline_template>
<giftcards_email_confirm_template translate="label" module="giftcards">
<label>Gift Card Confirm</label>
<file>giftcard_confirm.html</file>
<type>html</type>
</giftcards_email_confirm_template>
</email>
</template>
<catalog>
<product>
<type>
<giftcards module="giftcards">
<label>Gift Card</label>
<model>giftcards/product_type_giftcards</model>
<price_model>giftcards/product_price</price_model>
<is_qty>1</is_qty>
<composite>0</composite>
</giftcards>
</type>
</product>
</catalog>
<sales>
<quote>
<totals>
<discount>
<class>giftcards/discount</class>
<after>subtotal,shipping</after>
<before>grand_total</before>
</discount>
</totals>
</quote>
</sales>
</global>
<adminhtml>
<sales>
<order>
<create>
<available_product_types>
<giftcards />
</available_product_types>
</create>
</order>
</sales>
</adminhtml>
<default>
<giftcards>
<email>
<email_template>giftcards_email_email_template</email_template>
<print_template>giftcards_email_print_template</print_template>
<offline_template>giftcards_email_offline_template</offline_template>
<confirm_template>giftcards_email_confirm_template</confirm_template>
</email>
</giftcards>
</default>
<adminhtml><layout><updates><blog><file>webtex/giftcards/giftcards.xml</file></blog></updates></layout></adminhtml>
<crontabs>
<jobs>
<schedule><cron_expr>0 1 * * *</cron_expr></schedule>
<run><model>giftcards/observer::sendEmailByDeliveryDate</model></run>
</jobs>
</crontabs>
</config>
ありがとう