Skip to content

Instantly share code, notes, and snippets.

@ryaan-anthony
Created August 19, 2013 23:01
Show Gist options
  • Select an option

  • Save ryaan-anthony/6275205 to your computer and use it in GitHub Desktop.

Select an option

Save ryaan-anthony/6275205 to your computer and use it in GitHub Desktop.
<?php
class MB_Dynamicconfigurable_Block_Catalog_Product_View extends Mage_Catalog_Block_Product_View
{
function _prepareLayout()
{
parent::_prepareLayout();
$product = $this->getProduct();
if (("product.info" == $this->getNameInLayout()) && $product->isConfigurable() && $product->getIsDynamic())
{
echo "Set template dynamicconfigurable/catalog/product/view.phtml<br />";
$this->setTemplate("dynamicconfigurable/catalog/product/view.phtml");
$this->setChild('editor', $this->getLayout()->createBlock('dynamicconfigurable/catalog_product_view_editor', 'dynamicconfigurable.editor'));
}
return $this;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment