我为magento安装新主题并更改“系统>配置”>设计。 我在主题选项中为新主题写了名字。在“保存配置”之后,当我尝试转到“系统>配置”时出现错误:在第546行的/ app / Mage.php中找不到类'ThemeAdminPanel_ExtraConfig_Helper_Data'
上传新主题的文件时,我发现在app/code/local
中创建新文件夹:
/app/code/local/ThemeAdminPanel
/app/code/local/Mage
应用程序/代码/本地/ ThemeAdminPanel / ExtraConfig的/ etc / config.xml中:
<?xml version="1.0"?>
<config>
<modules>
<ThemeAdminPanel_ExtraConfig>
<version>1.0.0</version>
<depends>
<!-- no dependencies -->
</depends>
</ThemeAdminPanel_ExtraConfig>
</modules>
<global>
<models>
<!-- ... -->
<ExtraConfig>
<class>ThemeAdminPanel_ExtraConfig_Model</class>
</ExtraConfig>
<!-- ... -->
</models>
<helpers>
<ExtraConfig>
<class>ThemeAdminPanel_ExtraConfig_Helper</class>
</ExtraConfig>
</helpers>
<resources />
<extraconfig />
<blocks>
<mygeneral><class>ThemeAdminPanel_ExtraConfig_Block</class></mygeneral>
</blocks>
</global>
<!---->
<default>
<mygeneral>
<generaloptions>
<menutype>1</menutype>
<topbanner>default/phone.png</topbanner>
<googlefont>Source Sans Pro:200,200italic,300,300italic,regular,italic,600,600italic,700,700italic,900,900italic</googlefont>
<additional_nav>Contacts</additional_nav>
<additional_nav_href>index.php/contacts/</additional_nav_href>
<topbtn>1</topbtn>
<enable_ajax>1</enable_ajax>
<hide_wish>0</hide_wish>
<hide_compare>0</hide_compare>
<hide_cart>0</hide_cart>
</generaloptions>
<background>
<maincolor>F7F7F9</maincolor>
<pattern>default/pattern.png</pattern>
<bg_repeat></bg_repeat>
<bg_attachment></bg_attachment>
<bg_position_x></bg_position_x>
<bg_position_y></bg_position_y>
</background>
<product_list>
<shorten_name>23</shorten_name>
<layer>1</layer>
<sale_label>1</sale_label>
<sale_label_text>Sale</sale_label_text>
<new_label>1</new_label>
<new_label_text>New</new_label_text>
</product_list>
<share>
<facebookgroupid>115403961948855</facebookgroupid>
<twittername>dedalx</twittername>
<use_share>1</use_share>
<share_code><![CDATA[<span class='st_fblike_hcount' displayText='Facebook Like'></span>
<span class='st_twitter_hcount' displayText='Tweet'></span>
<span class='st_pinterest_hcount' displayText='Pinterest'></span>
<span class='st_plusone_hcount' displayText='Google +1'></span>]]></share_code>
</share>
<slideshow>
<use_slideshow>1</use_slideshow>
<hide_right_sliders>0</hide_right_sliders>
<autoplay>1</autoplay>
<speed>8000</speed>
<slides_count>2</slides_count>
</slideshow>
<productpage>
<use_zoom>1</use_zoom>
<use_carousel>1</use_carousel>
</productpage>
<colors>
<active_color>6CBE42</active_color>
<button_hover>58BAE9</button_hover>
</colors>
<customcode>
<customcss>/* Add any CSS code here */</customcss>
<customjs>// Add any JavaScript code here</customjs>
</customcode>
</mygeneral>
</default>
<!---->
<adminhtml>
<menu>
<metroshop translate="title" module="ExtraConfig">
<title>MetroShop</title>
<sort_order>6666</sort_order>
<children>
<settings translate="title" module="ExtraConfig">
<title>Theme Settings</title>
<sort_order>10</sort_order>
<action>adminhtml/system_config/edit/section/mygeneral</action>
</settings>
</children>
</metroshop>
</menu>
<layout>
<updates>
<ExtraConfig>
<file>options.xml</file>
</ExtraConfig>
</updates>
</layout>
</adminhtml>
</config>
应用程序/代码/本地/ ThemeAdminPanel / ExtraConfig /助手/ Data.php:
<?php
class ThemeAdminPanel_ExtraConfig_Helper_Data extends Mage_Core_Helper_Abstract
{
}
?>
我看到这个类已添加到代码中但在此部分的/app/Mage.php中找不到:
public static function helper($name)
{
$registryKey = '_helper/' . $name;
if (!self::registry($registryKey)) {
$helperClass = self::getConfig()->getHelperClassName($name);
self::register($registryKey, new $helperClass);
}
return self::registry($registryKey);
}
据我所知,关于向Mage.php添加类的主题有一些问题。
文件etc / config.xml中的附加内容没有类'ThemeAdminPanel_ExtraConfig_Helper_Data'。但'我不确定如何解决和解决这个问题。
请帮我解决这个问题。
通过FTP清除所有缓存。