More information:
This is the code that pulls in the attribute images in tpl_product_info_display.php
PHP Code:
<?php
if ($options_attributes_image[$i] != '') {
?>
<tr>
<td colspan="2"><table class="products-attributes-images">
<tr> <?php echo $options_attributes_image[$i]; ?> </tr>
</table></td>
</tr>
And this is the code that pulls in the main image:
PHP Code:
if (zen_not_null($products_image)) {
require(DIR_WS_MODULES . 'pages/' . $current_page_base . '/main_template_vars_images.php');
} else {
echo ' ';
}
?>
So I initially tried copying the main_template_vars_image file and replacing all products_image with attributes_image to see what happened and then used a require statement in tpl_product_info_display to reference it. However I got an error unsurprisingly - ereg_replace(): REG_EMPTY
So I am stuck.
if this isn't the way to go then can I amend the main_template_vars_attributes script:
PHP Code:
case '3':
$tmp_attributes_image_row++;
// if ($tmp_attributes_image_row > PRODUCTS_IMAGES_ATTRIBUTES_PER_ROW) {
if ($tmp_attributes_image_row > $products_options_names->fields['products_options_images_per_row']) {
$tmp_attributes_image .= '</tr><tr>';
$tmp_attributes_image_row = 1;
}
if ($products_options->fields['attributes_image'] != '') {
$tmp_attributes_image .= '<td class="smallText" align="center" valign="top">' . zen_draw_radio_field('id[' . $products_options_names->fields['products_options_id'] . ']',
$products_options_value_id, $selected_attribute) . zen_image(DIR_WS_IMAGES . $products_options->fields['attributes_image']) . (PRODUCT_IMAGES_ATTRIBUTES_NAMES == '1' ? '<br />' . $products_options->fields['products_options_values_name'] : '') . $products_options_details_noname . '</td>';
} else {
$tmp_attributes_image .= '<td class="smallText" align="center" valign="top">' . zen_draw_radio_field('id[' . $products_options_names->fields['products_options_id'] . ']',
$products_options_value_id, $selected_attribute) . '<br />' . $products_options->fields['products_options_values_name'] . $products_options_details_noname . '</td>';
}
break;
without having a require statement to create a popup? Help would be very much appreciated.