/** * Hide totals block if there are no totals. * Otherwise it will output an empty block. * * @return string */ protected function _toHtml() { $html = ''; if (!$this->showBlock) { $html = $this->_getHideBlock(self::MODE_TOTALS_HIDE)->toHtml(); } return $html . parent::_toHtml(); }