PDA

View Full Version : [Images] disabling product info image



tinboye
04-23-2011, 11:21 AM
Im looking to disable the large image on the product info page.
I found where to disable the Image Zoomer on product info page within the mopics.

im using the product attribute pictures module, which shows its own large image. So i do not need both

i know it would either involve editing the product_info template file, but was hoping i might just be able to disable the pic via admin area.


thanks

ridexbuilder
04-23-2011, 01:14 PM
Nope. Just delete all images_big, if not too difficult. :shock:
Alternatively, remove all references to slimbox/lightbox - you should know where by now, if already been messing about with the aforementioned contribution.

tinboye
04-24-2011, 12:27 PM
i deleted all the big images and then all it shows is a default image of a camera. i have this set to false as well
"Replace missing product images with default image"

ridexbuilder
04-24-2011, 12:55 PM
So, you delete all of this:


<!-- Image Big Starts -->
<td class="productinfo_imagebig" width="<?php echo PRODUCT_IMAGE_WIDTH; ?>">
<?php
//Set imagezoomer on/off switches image size from big to products
if (IMAGEZOOMER == 'true') {
$imagezoom = ' class="imagezoomer"';
$image_show = DYNAMIC_MOPICS_BIGIMAGES_DIR;
} else {
$imagezoom = '';
$image_show = DYNAMIC_MOPICS_PRODUCTS_DIR;
}
$image_lg = mopics_get_imagebase($product_info['products_image'], DIR_WS_IMAGES . DYNAMIC_MOPICS_BIGIMAGES_DIR);
if ($lg_image_ext = mopics_file_exists($image_lg, DYNAMIC_MOPICS_BIG_IMAGE_TYPES)) {
$image_size = @getimagesize($image_lg . '.' . $lg_image_ext);

//BOF SLIMBOX
$lightlarge = $image_lg . "." . $lg_image_ext;
?>
<script type="text/javascript"><!--
document.write('<?php echo '<a href="' . tep_href_link($lightlarge) . '" target="_blank"' . $imagezoom . ' id="image_big" rel="lightbox[group]" title="'.addslashes($product_info['products_name']).'" >' . tep_image(DIR_WS_IMAGES . $image_show . $product_info['products_image'], addslashes($product_info['products_name']), PRODUCT_IMAGE_WIDTH, PRODUCT_IMAGE_HEIGHT, 'hspace="0" vspace="0"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '<\/a>'; ?>');
//-->
</script>
<noscript>
<?php echo '<a href="' . tep_href_link($lightlarge) . '" target="_blank" rel="lightbox[group]" title="'.addslashes($product_info['products_name']).'" >' . tep_image(DIR_WS_IMAGES . DYNAMIC_MOPICS_PRODUCTS_DIR . $product_info['products_image'], addslashes($product_info['products_name']), PRODUCT_IMAGE_WIDTH, PRODUCT_IMAGE_HEIGHT, 'hspace="0" vspace="0"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>
<?php
} else {
if (mopics_file_exists(DIR_WS_IMAGES . DYNAMIC_MOPICS_PRODUCTS_DIR . $product_info['products_image'])) {
echo tep_image(DIR_WS_IMAGES . DYNAMIC_MOPICS_PRODUCTS_DIR . $product_info['products_image'], stripslashes($product_info['products_name']), PRODUCT_IMAGE_WIDTH, PRODUCT_IMAGE_HEIGHT);
} else {
echo tep_image(DIR_WS_ICONS . 'default_lg.png', TEXT_MISSING_IMAGE, PRODUCT_IMAGE_WIDTH, PRODUCT_IMAGE_HEIGHT);
}
}
?>
</td>
<!-- Image Big Ends -->
</tr>
<tr>
<td colspan="3"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<!-- Thumbnails Starts -->
<td width="300">
<center>
<?php
//// BEGIN: Added for Dynamic MoPics v3.000
if (is_file(DIR_WS_IMAGES . DYNAMIC_MOPICS_THUMBS_DIR . $product_info['products_image']) && DIR_WS_IMAGES . DYNAMIC_MOPICS_THUMBS_DIR . $product_info['products_image'] != "pixel_trans.gif"){
include(DIR_WS_MODULES . 'dynamic_mopics.php');
}
//// END: Added for Dynamic MoPics v3.000
?>
</center>
</td>
<!-- Thumbnails Ends -->

and replace with something like..


<td class="productImage">
<?php
if (mopics_file_exists(DIR_WS_IMAGES . DYNAMIC_MOPICS_PRODUCTS_DIR . $product_info['products_image'])) {
echo tep_image(DIR_WS_IMAGES . DYNAMIC_MOPICS_PRODUCTS_DIR . $product_info['products_image'], stripslashes($product_info['products_name']), PRODUCT_IMAGE_WIDTH, PRODUCT_IMAGE_HEIGHT);
} else {
echo tep_image(DIR_WS_ICONS . 'default_lg.png', TEXT_MISSING_IMAGE, PRODUCT_IMAGE_WIDTH, PRODUCT_IMAGE_HEIGHT);
}
?>
</td>

No guarantees, as you're undoing all the hard work done by both PGM and m'self.

EJ

tinboye
07-24-2011, 07:22 AM
I understand im undoing your code, i do appreciate all the hard work you guys put into the script. However Im using PAPs (Product Attribute Pictures) which generates its own image. So there is no need for 2 images. Thanks Justin

pgmarshall
07-24-2011, 10:10 AM
As EJ says ... on the product_info page ... thumbs are displayed as extra product images, product images are used if available however if there is a large image then it will use the large image which powers the javascript zoomer and the popup link.

I am surprised you have got PAP to work with osCmax v2.5 ... I couldn't make it play nice with QTPro ...

Regards,

tinboye
07-24-2011, 03:04 PM
the only issue i have now is when i place the paps code into the template, inplace of where the large image would appear, it seems to break the whole table. being that the paps is encoded, im having nick take a look at it.
Nick has been great help making it work with oscmax 2.5.