Magento 需要帮助与愿望清单
删除侧栏中的所有项目后,侧栏中的愿望列表部分将消失。。但我想拍摄它,即使在愿望列表中没有带有文本“向你的愿望列表中添加一些项目”的项目。。就像“比较部分”。。我该怎么做 我尝试编辑.phtml文件来完成此操作,但它不起作用。。我需要为此编辑任何xml布局文件吗?仅供参考,请不要声名狼藉 愿望列表类别在1.4.2之后已更改:Magento 需要帮助与愿望清单,magento,Magento,删除侧栏中的所有项目后,侧栏中的愿望列表部分将消失。。但我想拍摄它,即使在愿望列表中没有带有文本“向你的愿望列表中添加一些项目”的项目。。就像“比较部分”。。我该怎么做 我尝试编辑.phtml文件来完成此操作,但它不起作用。。我需要为此编辑任何xml布局文件吗?仅供参考,请不要声名狼藉 愿望列表类别在1.4.2之后已更改: * @deprecated after 1.4.2.0 * @see Mage_Wishlist_Block_Links::__construct *
* @deprecated after 1.4.2.0
* @see Mage_Wishlist_Block_Links::__construct
*
* @return array
*/
public function addWishlistLink()
{
return $this;
}
以下是您所需的功能(查看计数):
Magento 1.6.1.0
/app/code/core/Mage/Wishlist/Block/Customer/Sidebar.php
包含函数\u toHtml():
protected function _toHtml()
{
if (($this->getCustomWishlist() && $this->getItemCount()) || $this->hasWishlistItems()) {
return parent::_toHtml();
}
return '';
}
副本:
致:
在复制的文件中,将函数_toHtml()的内容替换为返回父项::_toHtml();:
protected function _toHtml()
{
if (($this->getCustomWishlist() && $this->getItemCount()) || $this->hasWishlistItems()) {
return parent::_toHtml();
}
return '';
}
/app/code/core/Mage/Wishlist/Block/Customer/Sidebar.php
/app/code/local/Mage/Wishlist/Block/Customer/Sidebar.php
protected function _toHtml()
{
return parent::_toHtml();
}