<?php
//@*--

require_once "Mage/Catalog/controllers/ProductController.php";

class Theme_Ajax_Catalog_ProductController extends Mage_Catalog_ProductController {

    public function viewAction() {
        $params = $this->getRequest()->getParams();

        parent::viewAction();

        if (array_key_exists("ajax", $params) && $params["ajax"]) {
            $this->getResponse()->setBody('');
            $this->loadLayout();
            $layout = $this->getLayout();
            $layout->getBlock('root')->setTemplate('page/ajax.phtml');
            $layout->getBlock('product.info')->unsetChild('info_tabs');
            $this->renderLayout();
        }
    }

}

//--*@