本文整理汇总了PHP中Mage_Core_Block_Template::_toHtml方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Core_Block_Template::_toHtml方法的具体用法?PHP Mage_Core_Block_Template::_toHtml怎么用?PHP Mage_Core_Block_Template::_toHtml使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Core_Block_Template
的用法示例。
在下文中一共展示了Mage_Core_Block_Template::_toHtml方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _toHtml
/**
* Generate and return the ShareThis JS
*
* @return string
*/
protected function _toHtml()
{
$helper = Mage::helper('wp_addon_addthis');
if ($helper->isActiveOnPage()) {
$config = array('data_track_clickback' => (bool) $helper->getOption('addthis_append_data'), 'ui_atversion' => $helper->getVersion(), 'ui_header_background' => $helper->getOption('addthis_header_background'), 'ui_header_color' => $helper->getOption('addthis_header_color'), 'ui_cobrand' => $helper->getOption('addthis_brand'), 'ui_508_compliant' => (bool) $helper->getOption('addthis_508'), 'data_track_addressbar' => (bool) $helper->getOption('data_track_addressbar'), 'data_track_textcopy' => (bool) $helper->getOption('addthis_copytracking2'));
if ($helper->getOption('data_ga_property')) {
$config['data_ga_property'] = $helper->getOption('data_ga_property');
$config['data_ga_social'] = true;
}
if ($helper->getOption('addthis_language') == '2') {
$config['ui_language'] = $helper->getOption('addthis_language');
}
$share = array();
if ($helper->getOption('addthis_twitter_template')) {
$share['passthrough']['twitter']['via'] = $this->_getFirstTwitterUsername($helper->getOption('addthis_twitter_template'));
}
if ($helper->getOption('addthis_bitly_login') && $helper->getOption('addthis_bitly_key')) {
$share['url_transforms']['shorten']['twitter'] = 'bitly';
$share['shorteners']['bitly']['login'] = $helper->getOption('addthis_bitly_login');
$share['shorteners']['bitly']['apiKey'] = $helper->getOption('addthis_bitly_key');
}
return implode('', array('<script type="text/javascript">var addthis_product = \'wpp-3.1\';', $this->_mergeArrayJson($config, $helper->getOption('addthis_config_json'), "var addthis_config = '%s';"), sprintf("var addthis_options = '%s';", $helper->getOption('addthis_options')), $this->_mergeArrayJson($share, $helper->getOption('addthis_share_json'), "if (typeof(addthis_share) == \"undefined\"){ addthis_share = '%s';}"), '</script>', sprintf('<script type="text/javascript" src="//s7.addthis.com/js/%s/addthis_widget.js#pubid=%s"></script>', $helper->getVersion(), $this->getPublisherId())));
}
return parent::_toHtml();
}
示例2: _toHtml
protected function _toHtml()
{
if (!$this->_canShow()) {
return '';
}
return parent::_toHtml();
}
示例3: _toHtml
protected function _toHtml()
{
if (!(bool) Mage::getStoreConfig('specialproducts/general/active')) {
return '';
}
return parent::_toHtml();
}
示例4: _toHtml
/**
* Render block HTML
*
* @return string
*/
protected function _toHtml()
{
if (!$this->getCanUseToken()) {
return '';
}
return parent::_toHtml();
}
示例5: _toHtml
protected function _toHtml()
{
if (!Mage::getStoreConfig('ves_base/general_setting/show')) {
return;
}
return parent::_toHtml();
}
示例6: _toHtml
public function _toHtml()
{
if (Mage::getStoreConfigFlag('payment/paypaluk_express/active') && Mage::getSingleton('checkout/session')->getQuote()->validateMinimumAmount()) {
return parent::_toHtml();
}
return '';
}
示例7: _toHtml
protected function _toHtml()
{
if ($this->getTestimonials()) {
return parent::_toHtml();
}
return '';
}
示例8: _toHtml
/**
* Render HTML for the page type if the module is enabled for the current
* store.
*
* @return string
*/
protected function _toHtml()
{
if (!Mage::helper('nosto_tagging')->isModuleEnabled() || !Mage::helper('nosto_tagging/account')->existsAndIsConnected()) {
return '';
}
return parent::_toHtml();
}
示例9: _toHtml
protected function _toHtml()
{
if (!$this->helper('inchoo_piwik')->isModuleOutputEnabled()) {
return '';
}
return parent::_toHtml();
}
示例10: _toHtml
public function _toHtml()
{
if (!(bool) Mage::getStoreConfig('manufacturer/general/enable')) {
return '';
}
return parent::_toHtml();
}
示例11: _toHtml
protected function _toHtml()
{
if (!Mage::getStoreConfig('catalog/aitcg/aitcg_use_social_networks_sharing')) {
return '';
}
return parent::_toHtml();
}
示例12: _toHtml
protected function _toHtml()
{
/*if ($toolbar = $this->getChild('toolbar')) {
$toolbar->setCollection($this->getValuesCollection());
}*/
return parent::_toHtml();
}
示例13: _toHtml
protected function _toHtml()
{
if (!$this->helper('bestseller')->getIsActive()) {
return '';
}
return parent::_toHtml();
}
示例14: _toHtml
/**
* Render block
*
* @return string
*/
protected function _toHtml()
{
if (Mage::helper('enterprise_wishlist')->isMultipleEnabled()) {
return parent::_toHtml();
}
return '';
}
示例15: _toHtml
public function _toHtml()
{
if (!Mage::getSingleton('helpdesk/config')->getSatisfactionIsActive()) {
return '';
}
return parent::_toHtml();
}