Exemplo n.º 1
0
 /**
  * Checks if we are "allowed" to replace the block template of specified
  * block.
  *
  * This is done by reading the system config values for the extension. We
  * do this check to make it possible for the store owner to not replace
  * the templates, in case he needs to do it in his theme. Then he is also
  * responsible for adding the required SizeMe CSS classes in the template.
  *
  * @param Mage_Core_Block_Template $block the block to check.
  *
  * @return boolean true if allowed, false otherwise.
  */
 public function canReplaceBlockTemplate(Mage_Core_Block_Template $block)
 {
     switch ($block->getData('type')) {
         case 'catalog/product_view_type_configurable':
             return (bool) Mage::getStoreConfig(self::XML_PATH_TEMPLATE_SETTINGS_REPLACE_PRODUCT_VIEW_TYPE_CONFIGURABLE_TEMPLATE);
         default:
             return false;
     }
 }