Php Magento模板未加载
我需要删除默认的Magento签出并添加自定义签出。问题是自定义扩展模板未加载。日志未显示任何错误。我已附上屏幕截图 代码在这里 这里有两个问题 块没有渲染吗Php Magento模板未加载,php,magento,Php,Magento,我需要删除默认的Magento签出并添加自定义签出。问题是自定义扩展模板未加载。日志未显示任何错误。我已附上屏幕截图 代码在这里 这里有两个问题 块没有渲染吗 即使我已取消设置“checkout.onepage”块,当我转储整个布局时,它仍显示默认的签出布局代码。这是正常行为吗?问题在于控制器: $this->getLayout()->getBlock('content')->unsetChildren('checkout.onepage') 见: 因此,您的代码应该是: $this->getL
即使我已取消设置“checkout.onepage”块,当我转储整个布局时,它仍显示默认的签出布局代码。这是正常行为吗?问题在于控制器:
$this->getLayout()->getBlock('content')->unsetChildren('checkout.onepage')代码>
见:
因此,您的代码应该是:
$this->getLayout()->getBlock('checkout.onepage')->unsetChildren()代码>
或
$this->getLayout()->getBlock('content')->unsetChild('checkout.onepage')代码>愚蠢的问题:您的模块启用了吗?布局文件onepagecheckout.xml的确切位置?你能显示文件路径吗?@ceckoslab我已经更新了代码。@blakcaps谢谢!如果在onepagecheckout.xml中将处理程序更改为?@ceckoslab添加无效。系统生成的句柄为,但预期为。我猜模块xml文件未加载。
Mage_Core_Block_Abstract
/**
* Unset all children blocks
*
* @return Mage_Core_Block_Abstract
*/
public function unsetChildren()
{
$this->_children = array();
$this->_sortedChildren = array();
return $this;
}
/**
* Unset child block
*
* @param string $alias
* @return Mage_Core_Block_Abstract
*/
public function unsetChild($alias)
{
if (isset($this->_children[$alias])) {
unset($this->_children[$alias]);
}
if (!empty($this->_sortedChildren)) {
$key = array_search($alias, $this->_sortedChildren);
if ($key !== false) {
unset($this->_sortedChildren[$key]);
}
}
return $this;
}