因此,我了解关于模块未在前端显示的其他问题。但是它们似乎都与驼峰错误和config.xml和system.xml格式不正确有关,这是我没有碰过的。
我一直在magento商店工作,最近对我的模板和模块做了很多更改,最近又在结帐页面上破坏了我的礼物模块
我的主要问题是我该如何调试,我在error_log中没有看到错误
我正在尝试在模板的结帐页面中加载以下代码段
magento / app / design / frontend / base / default / template / ig_cartgifts / gifts.phtml
我正在使用主题,但是过去这并不是phtml在基本默认模板中的问题,我也尝试将其添加到主题文件结构中
我从主题中的cart.phtml中调用它
magento / app / design / frontend / blacknwhite / default / template / checkout / cart.phtml
<div class="gift-container-content" style="display: block;">
<?php if ($this->getChildHtml('gifts')): ?>
<?php echo $this->getChildHtml('gifts'); // IG GiftCart module - nothing to do with Meigee or B&W theme ?>
<?php endif; ?>
</div>
这是我要尝试调试的块,为什么它不加载
magento / app / design / frontend / base / default / template / ig_cartgifts / gifts.phtml
<h3><?php echo $this->__('debug') ?></h3>
以下是我的config.xml
magento / app / code / community / IG / CartGifts / etc / config.xml
<?xml version="1.0"?>
<config>
<modules>
<IG_CartGifts>
<version>1.0.0</version>
</IG_CartGifts>
</modules>
<frontend>
<layout>
<updates>
<ig_cartgifts>
<file>ig_cartgifts.xml</file>
</ig_cartgifts>
</updates>
</layout>
</frontend>
<global>
<models>
<ig_cartgifts>
<class>IG_CartGifts_Model</class>
</ig_cartgifts>
</models>
<resources>
<ig_cartgifts_setup>
<setup>
<module>IG_CartGifts</module>
</setup>
<connection>
<use>core_setup</use>
</connection>
</ig_cartgifts_setup>
<ig_cartgifts_write>
<connection>
<use>core_write</use>
</connection>
</ig_cartgifts_write>
<ig_cartgifts_read>
<connection>
<use>core_read</use>
</connection>
</ig_cartgifts_read>
</resources>
<blocks>
<ig_cartgifts>
<class>IG_CartGifts_Block</class>
</ig_cartgifts>
</blocks>
<helpers>
<ig_cartgifts>
<class>IG_CartGifts_Helper</class>
</ig_cartgifts>
</helpers>
<events>
<checkout_cart_product_add_after>
<observers>
<ig_cartgifts>
<class>ig_cartgifts/observer</class>
<method>onCheckoutCartProductAddAfter</method>
</ig_cartgifts>
</observers>
</checkout_cart_product_add_after>
<checkout_cart_save_after>
<observers>
<ig_cartgifts>
<type>singleton</type>
<class>ig_cartgifts/observer</class>
<method>onCheckoutCartSaveAfter</method>
</ig_cartgifts>
</observers>
</checkout_cart_save_after>
<checkout_cart_update_items_after>
<observers>
<ig_cartgifts>
<class>ig_cartgifts/observer</class>
<method>onCheckoutCartUpdateItemsAfter</method>
</ig_cartgifts>
</observers>
</checkout_cart_update_items_after>
</events>
</global>
<adminhtml>
<translate>
<modules>
<ig_cartgifts>
<files>
<default>IG_CartGifts.csv</default>
</files>
</ig_cartgifts>
</modules>
</translate>
<acl>
<resources>
<admin>
<children>
<system>
<children>
<config>
<children>
<ig_cartgifts translate="title" module="ig_cartgifts">
<title>IG CartGifts</title>
<sort_order>50</sort_order>
</ig_cartgifts>
</children>
</config>
</children>
</system>
</children>
</admin>
</resources>
</acl>
</adminhtml>
<default>
<ig_cartgifts>
<general>
<enabled>1</enabled>
<show_all>1</show_all>
<show_notinstock>1</show_notinstock>
</general>
</ig_cartgifts>
</default>
</config>
magento / app / code / community / IG / CartGifts / etc / system.xml
<?xml version="1.0"?>
<config>
<tabs>
<ig translate="label" module="ig_cartgifts">
<label>IdealiaGroup</label>
<sort_order>200</sort_order>
</ig>
</tabs>
<sections>
<ig_cartgifts translate="label" module="ig_cartgifts">
<label>IG CartGifts</label>
<tab>ig</tab>
<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>
<groups>
<general translate="label">
<label>General</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>
<enabled translate="label">
<label>Enable CartGifts</label>
<frontend_type>select</frontend_type>
<source_model>adminhtml/system_config_source_yesno</source_model>
<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>
</enabled>
<show_all translate="label">
<label>Show all gifts</label>
<frontend_type>select</frontend_type>
<source_model>adminhtml/system_config_source_yesno</source_model>
<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>
</show_all>
<show_notinstock translate="label">
<label>Show not in stock gifts</label>
<frontend_type>select</frontend_type>
<source_model>adminhtml/system_config_source_yesno</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>
</show_notinstock>
</fields>
</general>
</groups>
</ig_cartgifts>
</sections>
</config>
以及etc modules文件夹中的xml
magento / app / etc / modules / IG_CartGifts.xml
<?xml version="1.0"?>
<config>
<modules>
<IG_CartGifts>
<active>true</active>
<codePool>community</codePool>
</IG_CartGifts>
</modules>
</config>
那么,如果我将网站放到调试探查器中,却没有将任何错误放到error_log中,那么我该如何调试为什么不加载呢?
我的怀疑是阻止权限,但以前在没有阻止权限的情况下运行良好,现在我做了很多更改,我不得不回过头去看看是什么原因造成的
谢谢