hi, I was wondering whether you could advise me how you make the options as images work in your product_info.php.
here is my QT Pro code in product_info.php
//++++ QT Pro: Begin Changed code
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td class="smallText">
<?php
//++++ QT Pro: End Changed Code
?>
<table border="0" cellspacing="0" cellpadding="2" align="right">
<tr>
<td align="right" class="smallText">
<?php
$small_image = $product_info['products_image'];
$popup_image = $product_info['products_image_lrg'];
if ($popup_image == '')
$popup_image = $small_image;
echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $popup_image) . '" target="_blank" rel="lightbox[' . $product_info['products_name'] . ']" title="' . $product_info['products_name'] . '">' . tep_image(DIR_WS_IMAGES . $small_image, $product_info['products_name'], ULT_THUMB_IMAGE_WIDTH, ULT_THUMB_IMAGE_HEIGHT, 'hspace="1" vspace="1"') . '<br/>' . tep_image_button('image_enlarge.gif', TEXT_CLICK_TO_ENLARGE) . '</a>';
?>
</td>
</tr>
</table>
<?php
}
?>
<p><?php echo stripslashes($product_info['products_description']); ?></p>
<?php
//++++ QT Pro: Begin Changed code
if (tep_not_null($product_info['products_image'])) {
?>
</td>
</tr>
</table>
<?php
}
<?php
//Options as Images. This whole php clause needs to be added
if (OPTIONS_AS_IMAGES_ENABLED == 'true') include ('options_images.php');
?>
//++++ QT Pro: End Changed Code
$products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'");
$products_attributes = tep_db_fetch_array($products_attributes_query);
if ($products_attributes['total'] > 0) {
//++++ QT Pro: Begin Changed code
$products_id=(preg_match("/^\d{1,10}(\{\d{1,10}\}\d{1,10})*$/",$HTTP_GET_VARS['products_id']) ? $HTTP_GET_VARS['products_id'] : (int)$HTTP_GET_VARS['products_id']);
require(DIR_WS_CLASSES . 'pad_' . PRODINFO_ATTRIBUTE_PLUGIN . '.php');
$class = 'pad_' . PRODINFO_ATTRIBUTE_PLUGIN;
$pad = new $class($products_id);
echo $pad->draw();
//++++ QT Pro: End Changed Code
}
?>
</td>
</tr>
I install this contribution. everything is working except the product_info.php. I will be quite happy even it only shows the option images without the select function.
thanks very much,
Iris