views:

79

answers:

0

I have a template file under the 'page' directory. This template has been assigned to be a category's 'Page Layout' through the backend. In this template I have a configurable product object.

The following pulls in the view, but all it has in it is the product's name and short description.

$prod = /* get product object here */;

$layout = Mage::getSingleton('core/layout');
$productBlock = $layout
    ->createBlock("catalog/product_view",'',array("product_id" => $prod->getId()));
$layout->getBlock("content")->setChild("product.swim",$productBlock);
$update = $layout->getUpdate();
$update->addHandle('catalog_product_view');
$update->addHandle('PRODUCT_TYPE_'.$prod->getTypeId());
$update->addHandle('PRODUCT_'.$prod->getId());
$productBlock->setTemplate('catalog/product/view.phtml');
echo $productBlock->renderView();

How do I display the configurable product view (which should look identical to the normal configurable product view page) for that product within my template, without reloading the page?

Thanks