I made that quick mod into a vQmod in case anyone wants to try it. It's very useful if for example you want to write a javascript to make the additional images replace the main product image when you click them (you'd also have to edit the "rel" attribute if you want to use fancybox gallery functionality and not repeat the main image twice).
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<modification>
<id>Include main product image in thumbnail list</id>
<version>1.0.0</version>
<vqmver>2.1.5</vqmver>
<author>Ampeter</author>
<!--Modification by TheMasterBrewer: http://forum.opencart.com/viewtopic.php?f=21&t=44275-->
<file name="catalog/controller/product/product.php">
<operation>
<search position="before"><![CDATA[
$this->data['images'] = array();
]]></search>
<add><![CDATA[
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'] = '';
}
]]></add>
</operation>
</file>
<!--Change "default" in the path for your template folder name if you are using a custom template-->
<file name="catalog/view/theme/default/template/product/product.tpl">
<operation>
<search position="after" offset="3"><![CDATA[
<div class="image-additional">
]]></search>
<add><![CDATA[
<a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="fancybox" rel="fancybox"><img src="<?php echo $mainthumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" /></a>
]]></add>
</operation>
</file>
</modification>
PS: tested in 1.5.1.3