Post
by spitos » Wed Nov 07, 2012 7:23 pm
uksitebuilder wrote:Sorry for the delay on this guys
edit: catalog/controller/product/category.php
Find:
Code: Select all
foreach ($results as $result) {
if ($result['image']) {
Replace with:
Code: Select all
foreach ($results as $result) {
if($product_total == 1){
$this->redirect($this->url->link('product/product', 'product_id='.$result['product_id']));
}
if ($result['image']) {
When I applied this and the redirect was used, the breadcrumb trail was lost so I made a change to the redirect line to keep the breadcrumb trail on the product page.
Find:
Code: Select all
foreach ($results as $result) {
if ($result['image']) {
Replace with:
Code: Select all
foreach ($results as $result) {
if($product_total == 1){
$this->redirect($this->url->link('product/product', 'path=' . $this->request->get['path'] . '&product_id=' . $result['product_id']));
}
if ($result['image']) {

Google Analytics Expert - Advanced e-commerce tracking, Product & options reporting, transaction/conversion reporting, Google Adwords conversion & profit reporting, goal & funnel reporting, event tracking, site search tracking, multi-store compatibility, EU Cookie Law compliance and works with any theme or checkout! Easy vqmod install. Get it here