Magento 核心功能在远程系统中工作,在另一个系统中显示错误

发布于 2024-07-26 15:50:10 字数 701 浏览 3 评论 0原文

在前端模板文件夹的catalog.xml文件中,我为选项卡定义了块来显示产品标签、附加信息等,以这种方式:

<action method="addTab" translate="title" module="catalog">
<alias>additional</alias>
<title>Additional Information</title>
<block>catalog/product_view_attributes</block>
<template>catalog/product/view/attributes.phtml</template>
</action>

这在远程系统中工作正常,但是当我将其安装在本地Magento并尝试制作一个时额外的 .phtml 文件用于在选项卡中显示品牌图像,然后在产品详细信息页面中,显示以下错误:

Fatal error: Call to a member function setTemplate() on a non-object in C:\wamp\www\magento\ app\code\core\Mage\Catalog\Block\Product\View\Tabs.php on line 60

上面的文件是核心的一部分,我没有修改。 我尝试替换所有核心文件,但仍然无法正常工作。

In catalog.xml file of frontend template folder I had blocks defined for tabs to display product tags,additional information etc.in this way:

<action method="addTab" translate="title" module="catalog">
<alias>additional</alias>
<title>Additional Information</title>
<block>catalog/product_view_attributes</block>
<template>catalog/product/view/attributes.phtml</template>
</action>

Which was working fine in the remote system, but when i installed it in local Magento and tried to make one extra .phtml file for displaying brand image in the tab, then in product details page, the following error is displayed:

Fatal error: Call to a member function setTemplate() on a non-object in C:\wamp\www\magento\app\code\core\Mage\Catalog\Block\Product\View\Tabs.php on line 60

The above file is a part of the core which I did not modify. I tried replacing all the core files but still it is not working.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

百变从容 2024-08-02 15:50:10

查看它是否正在使用未在该文件中创建的任何对象

look whether it is using any object that is not created in that file

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文