php - magento 1.9.3.9 中损坏的模块块我如何调试问题
问题描述
所以我知道关于我的模块可能还有很多其他问题没有显示在前端。但它们似乎都与驼峰错误以及 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>
和等模块文件夹中的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
我的怀疑是阻止权限,但以前没有阻止权限,它工作正常,我已经做了很多改变,现在我不得不回过头来看看是什么原因造成的
谢谢
解决方案
推荐阅读
- google-cloud-platform - GCP VPC 对等互连(自动模式)
- plotly - 如何在 react plotly.js 散点图中添加带有 setstate 的 onclick 事件?
- php - 代码覆盖 phpunit 测试问题
- c++ - 在特定位置插入节点
- javascript - 被删除组件的状态覆盖下一个组件
- java - 从文件中使用扫描仪时输入不匹配
- webrtc - 网络音频:如何设置与扬声器不同的目的地?
- sql-server - tSQLt 测试在我的老师工作时不起作用
- python - Tkinter 滞后于“更新”命令
- python - 构建networkx图时的问题