/** * 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(); }
protected function _toHtml() { if (!$this->_canShow()) { return ''; } return parent::_toHtml(); }
protected function _toHtml() { if (!(bool) Mage::getStoreConfig('specialproducts/general/active')) { return ''; } return parent::_toHtml(); }
/** * Render block HTML * * @return string */ protected function _toHtml() { if (!$this->getCanUseToken()) { return ''; } return parent::_toHtml(); }
protected function _toHtml() { if (!Mage::getStoreConfig('ves_base/general_setting/show')) { return; } return parent::_toHtml(); }
public function _toHtml() { if (Mage::getStoreConfigFlag('payment/paypaluk_express/active') && Mage::getSingleton('checkout/session')->getQuote()->validateMinimumAmount()) { return parent::_toHtml(); } return ''; }
protected function _toHtml() { if ($this->getTestimonials()) { return parent::_toHtml(); } return ''; }
/** * 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(); }
protected function _toHtml() { if (!$this->helper('inchoo_piwik')->isModuleOutputEnabled()) { return ''; } return parent::_toHtml(); }
public function _toHtml() { if (!(bool) Mage::getStoreConfig('manufacturer/general/enable')) { return ''; } return parent::_toHtml(); }
protected function _toHtml() { if (!Mage::getStoreConfig('catalog/aitcg/aitcg_use_social_networks_sharing')) { return ''; } return parent::_toHtml(); }
protected function _toHtml() { /*if ($toolbar = $this->getChild('toolbar')) { $toolbar->setCollection($this->getValuesCollection()); }*/ return parent::_toHtml(); }
protected function _toHtml() { if (!$this->helper('bestseller')->getIsActive()) { return ''; } return parent::_toHtml(); }
/** * Render block * * @return string */ protected function _toHtml() { if (Mage::helper('enterprise_wishlist')->isMultipleEnabled()) { return parent::_toHtml(); } return ''; }
public function _toHtml() { if (!Mage::getSingleton('helpdesk/config')->getSatisfactionIsActive()) { return ''; } return parent::_toHtml(); }
protected function _toHtml() { $localeCode = Mage::app()->getLocale()->getLocaleCode(); // get days names $days = Zend_Locale_Data::getList($localeCode, 'days'); $this->assign('days', array('wide' => Zend_Json::encode(array_values($days['format']['wide'])), 'abbreviated' => Zend_Json::encode(array_values($days['format']['abbreviated'])))); // get months names $months = Zend_Locale_Data::getList($localeCode, 'months'); $this->assign('months', array('wide' => Zend_Json::encode(array_values($months['format']['wide'])), 'abbreviated' => Zend_Json::encode(array_values($months['format']['abbreviated'])))); // get "today" and "week" words $this->assign('today', Zend_Json::encode(Zend_Locale_Data::getContent($localeCode, 'relative', 0))); $this->assign('week', Zend_Json::encode(Zend_Locale_Data::getContent($localeCode, 'field', 'week'))); // get "am" & "pm" words $this->assign('am', Zend_Json::encode(Zend_Locale_Data::getContent($localeCode, 'am'))); $this->assign('pm', Zend_Json::encode(Zend_Locale_Data::getContent($localeCode, 'pm'))); // get first day of week and weekend days $this->assign('firstDay', (int) Mage::getStoreConfig('general/locale/firstday')); $this->assign('weekendDays', Zend_Json::encode((string) Mage::getStoreConfig('general/locale/weekend'))); // define default format and tooltip format $this->assign('defaultFormat', Zend_Json::encode(Mage::app()->getLocale()->getDateStrFormat(Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM))); $this->assign('toolTipFormat', Zend_Json::encode(Mage::app()->getLocale()->getDateStrFormat(Mage_Core_Model_Locale::FORMAT_TYPE_LONG))); // get days and months for en_US locale - calendar will parse exactly in this locale $days = Zend_Locale_Data::getList('en_US', 'days'); $months = Zend_Locale_Data::getList('en_US', 'months'); $enUS = new stdClass(); $enUS->m = new stdClass(); $enUS->m->wide = array_values($months['format']['wide']); $enUS->m->abbr = array_values($months['format']['abbreviated']); $this->assign('enUS', Zend_Json::encode($enUS)); return parent::_toHtml(); }
protected function _toHtml() { if (Mage::helper('sales/reorder')->isAllow() && Mage::getSingleton('customer/session')->isLoggedIn()) { return parent::_toHtml(); } return ''; }
protected function _toHtml() { if (!$this->helper('developertoolbar')->isEnabledForCurrentIp()) { return ''; } return parent::_toHtml(); }
protected function _toHtml() { if (!Mage::helper('downloads')->isEnabled()) { return ''; } return parent::_toHtml(); }
protected function _toHtml() { if (count($this->getTags()) > 0) { return parent::_toHtml(); } return ''; }
/** * Convert block to html sting. * Checks is possible to show newsletter checkbox * * @return string */ protected function _toHtml() { if (!$this->helper('fi_checkout')->isVisibleNewsletter() || Mage::helper('fi_checkout')->isCustomerSubscribed()) { return ''; } return parent::_toHtml(); }
protected function _toHtml() { if (!$this->getModuleHelper()->isEnabled()) { return ''; } return parent::_toHtml(); }
protected function _toHtml() { if (!$this->isEnabled()) { return ''; } return parent::_toHtml(); }
/** * {@inheritdoc} */ protected function _toHtml() { $this->setChild('xml', $this->getLayout()->createBlock('realtimedespatch/adminhtml_exports_view_accordion')); $this->getChild('xml')->setExport($this->getExport()); $this->getChild('lines')->setExport($this->getExport())->setReferenceLabel($this->getReferenceLabel()); return parent::_toHtml(); }
protected function _toHtml() { if (is_link(dirname(Mage::getModuleDir('', 'PostcodeNl_Api'))) && !Mage::getStoreConfig('dev/template/allow_symlink')) { throw new Mage_Core_Exception('Postcode.nl API Development: Symlinks not enabled! (set at Admin->System->Configuration->Advanced->Developer->Template Settings)'); } return parent::_toHtml(); }
/** * Render GA tracking scripts * * @return string */ protected function _toHtml() { if (!Mage::helper('enterprise_googleanalyticsuniversal')->isTagManagerAvailable()) { return ''; } return parent::_toHtml(); }
protected function _toHtml() { if ($this->_collection->getSize() > 0) { return parent::_toHtml(); } return ''; }
public function _toHtml() { if (!Mage::helper('checkout')->isMultishippingCheckoutAvailable()) { return ''; } return parent::_toHtml(); }
protected function _toHtml() { if ($this->getOrders()->getSize() > 0) { return parent::_toHtml(); } return ''; }
/** * Produces links widgetname html * * @return string */ protected function _toHtml() { $html = ''; $couponcode = $this->getData('couponcode'); $this->assign('couponcode', $couponcode); return parent::_toHtml(); }