Does anybody know how to include the main/default product image in the set of thumbnails? I've tried playing around with the code for the main image in the foreach loop but it always displays it full size... help!
Last edited by TheMasterBrewer on Wed Oct 26, 2011 9:39 pm, edited 1 time in total.
I've solved this issue. In the product controller (catalog/controller/product/product.php) I added the following code around line 207:
This is pretty much a clone of the previous two if statements; the first of which creates the enlarged version of the main image ('popup'), the second of which creates the default version of the main image ('image'). This new code creates a third version of the image, the same size as the thumbnails, and calls it "mainthumb". Then I called the 'mainthumb' image (the same way the product template calls the default image) just before the foreach loop on the product page where it displays all the thumbnails. Hey presto!
Code: Select all
if ($product_info['image']) {
$this->data['mainthumb'] = $this->model_tool_image->resize($product_info['image'], $this->config->get('config_image_additional_width'), $this->config->get('config_image_additional_height'));
} else {
$this->data['mainthumb'] = '';
}
Great! thanks. I made it into a vQmod here: http://forum.opencart.com/viewtopic.php?f=131&t=47303
Who is online
Users browsing this forum: No registered users and 13 guests