I have a requirement to load a product page which contains only the product description in much the same way that the information pages are loaded from the agree links (Colorbox).
I have looked over the controller files and have identified the section of code that I would need to add in order to generate this page. See below.
Code: Select all
$this->load->model('catalog/product');
if (isset($this->request->get['product_id'])) {
$product_id = (int)$this->request->get['product_id'];
} else {
$product_id = 0;
}
$product_info = $this->model_catalog_product->getProduct($product_id);
if ($product_info) {
$output = '<html dir="ltr" lang="en">' . "\n";
$output .= '<head>' . "\n";
$output .= ' <title>' . $product_info['name'] . '</title>' . "\n";
$output .= ' <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">' . "\n";
$output .= ' <meta name="robots" content="noindex">' . "\n";
$output .= '</head>' . "\n";
$output .= '<body>' . "\n";
$output .= ' <h1>' . $product_info['name'] . '</h1>' . "\n";
$output .= html_entity_decode($product_info['description'], ENT_QUOTES, 'UTF-8') . "\n";
$output .= ' </body>' . "\n";
$output .= '</html>' . "\n";
$this->response->setOutput($output);
}
I assume that I would need to wrap the code with an if variable, maybe something like... if (isset($this->request->get['quickview'])) {.
Unfortunately I am not able to get this to work. I am using vQmod but I am unsure where in the product controller file this needs to go and also which code would need to be added in order to call this code when the URL parameter (?quickview) is detected.
Any help would be immensely appreciated!