Skip to content

Instantly share code, notes, and snippets.

@apedicdev
Created September 10, 2015 09:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save apedicdev/38cbc00e85af67d980e5 to your computer and use it in GitHub Desktop.
Save apedicdev/38cbc00e85af67d980e5 to your computer and use it in GitHub Desktop.
Replace default price template in product view
class Store_Core_Block_Catalog_Product_View_Type_Simple extends Mage_Catalog_Block_Product_View_Type_Simple{
protected $_priceBlockDefaultTemplate = 'catalog/product/matched-price.phtml';
protected function _getPriceBlockTemplate($productTypeId)
{
if (isset($this->_priceBlockTypes[$productTypeId])) {
if ($this->_priceBlockTypes[$productTypeId]['template'] != '') {
return $this->_priceBlockTypes[$productTypeId]['template'];
}
}
return $this->_priceBlockDefaultTemplate;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment