Jump to content



Latest News: (loading..)

* * * * * 2 votes

[Contribution] Additional Images Module


  • Please log in to reply
1473 replies to this topic

#1461   itscoldoutside

itscoldoutside
  • Members
  • 12 posts
  • Real Name:tim
  • Gender:Male
  • Location:Canada

Posted 13 April 2011 - 09:52 PM

Got it installed... Though it took me 7 times (fresh installs) to get it done. Slow process to make sure nothing is being overwritten.

While everything appears to be functioning, i have this one issue which i am not sure where to find the solution to.

Additional image popups do not load anythign when clicked (also, the additional image is the FULL image size merely scaled... the original product image is resized properly with a small file size etc), the lightbox presents itself and just 'loads'. Under closer examination, the url to the image for which is to be included in the pop up is as follows:

http://www.thecitywidestore.ca/images/

As you can see, the 'click to expand' link is pointing to the image folder itself.

Any ideas????

What did i miss?

Thank you!

(Please help)

#1462   musashi79uk

musashi79uk
  • Members
  • 35 posts
  • Real Name:Carl Fox

Posted 28 April 2011 - 12:09 PM

I have installed the Additional Images Module.
I have installed Easy Populate to get my products into the database. In the CSV file, I have specified the product image and the additional images.
I can process the product images fine but cannot process the additional images. When I click to show unprocessed images, the additional images do not show up for me to process. This results in the product info pages displaying the correct size main image but all the additional images are full size due to them not being processed. The only way to get round it is to go to each product that has an additional image, delete the additional image and then re-upload it and process it at the same time. This wouldn't be too much trouble for a dozen or so images but I have over 800 products with additional images.

Is there a simpler way to process the additional images rather than doing them one by one?

Thanks

Carl

#1463   Oza

Oza
  • Members
  • 84 posts
  • Real Name:Dorota K
  • Gender:Female

Posted 20 June 2011 - 02:28 PM

I've installed the contribution and it's working great except when I'm trying to post a link to a product page on facebook, it desn't display the product image. Instead it shows random image from the home page. Any ideas?

#1464   Denkster

Denkster
  • Members
  • 64 posts
  • Real Name:Eveline Bernard

Posted 29 June 2011 - 10:50 PM

Hi
It seems Additional Images conflicts with Ultimate Search Engine Optimized Urls  (USU5)
Does anyone out there know if there is a solution?

Please..

Eveline

#1465   Rubin Remus

Rubin Remus
  • Members
  • 142 posts
  • Real Name:Rubin Remus
  • Gender:Male

Posted 21 July 2011 - 08:43 AM

Is there a way to set the minimum accepted length for the filepath for the field "Thumb or Single Large Image"?

The thumbnail images aren't loading on the catalog, although the others that are uploaded do fine. That field only tries to load 102 characters of the URL, and not the rest.

Any ideas?

Thanks!

***EDIT***

Sorted, just had to change the field length in PhpMyAdmin. Should have thought of that earlier...

Edited by Rubin Remus, 21 July 2011 - 08:54 AM.


#1466   Rubin Remus

Rubin Remus
  • Members
  • 142 posts
  • Real Name:Rubin Remus
  • Gender:Male

Posted 21 July 2011 - 08:46 AM

View PostDenkster, on 29 June 2011 - 10:50 PM, said:

Hi
It seems Additional Images conflicts with Ultimate Search Engine Optimized Urls  (USU5)
Does anyone out there know if there is a solution?

Please..

Eveline

I haven't noticed a conflict really. You just need to be logical when you're making code changes. Can you explain the problem a little more?

#1467   Rubin Remus

Rubin Remus
  • Members
  • 142 posts
  • Real Name:Rubin Remus
  • Gender:Male

Posted 21 July 2011 - 01:22 PM

I've got the watermark working, but is there an option to turn it off, or at least make it smaller, in the product info page. I only really need it shown in the lightbox...?

Edited by Rubin Remus, 21 July 2011 - 01:32 PM.


#1468   dstebo

dstebo
  • Members
  • 91 posts
  • Real Name:dstebo

Posted 25 July 2011 - 03:13 PM

Additional images open at the site of the main image, like tabbed browsing images internal style that site.

#1469   Denkster

Denkster
  • Members
  • 64 posts
  • Real Name:Eveline Bernard

Posted 25 July 2011 - 10:08 PM

View PostRubin Remus, on 21 July 2011 - 08:46 AM, said:

I haven't noticed a conflict really. You just need to be logical when you're making code changes. Can you explain the problem a little more?
Sorry for delay in answering.
I was not watching this forum, while searching for the cause and a solution myself.


Please correct me if I'm wrong, here are my thoughts.



The problem I found
with USU5 in combination with image add-ons was that USU5 did not redirect correctly after putting a product in the shopping cart.

The cause of the problem seemed to be:

(I'm not sure if the cause was Additional Images only or Product Cycle Slideshow too)

  • USU5 requires strict and correct use of the function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL').
  • Linking to a page directly (without tep_href_link), or with a different function, is not allowed when using USU5.

The parameters in the page URL must be inside the brackets. Parameters cannot be added outside tep_href_link(), or USU5 will redirect to an unintended location.
This goes for the front end of the shop; AFAIK USU does not change the admin.



In at least one link of an image application I found link-URL parameters outside the function brackets (type 1 error).

I found an error of the first type, in line 150 of displayimages.php
				document.write(\'<a href="' . (!$this->onpagemenu ? 'javascript:popupWindow(\\\'' : '') . tep_href_link( $this->linkurl, ($item==0&&$this->groupwithparent=='true'?'pID='.$products_id:'imagesID='.$addimages_images[$item]['id'])) . (!empty($_GET['products_id']) ? '&products_id='.$_GET['products_id'] : '') . (!empty($_GET['cPath']) ? '&cPath='.$_GET['cPath'] : '') . (!$this->onpagemenu ? '\\\')' : '') . '"' . $t_menu_mouseover . '>' . tep_image(DIR_WS_IMAGES . $addimages_images[$item]['image'], addslashes($addimages_images[$item]['desc']), (ADDIMAGES_RESTRICT_PARENT=='false'&&$item==0&&$this->groupwithparent=='true'?'':$addimages_image_width), (ADDIMAGES_RESTRICT_PARENT=='false'&&$item==0&&$this->groupwithparent=='true'?'':$addimages_image_height), 'hspace="5" vspace="5"') . '<br>' . (!empty($addimages_images[$item]['desc'])?addslashes($addimages_images[$item]['desc']):TEXT_CLICK_TO_ENLARGE) . '</a>\');

In that line, these URL parameters (if !empty) are outside the brackets op tep_href_link():
'&products_id='.$_GET['products_id'] .'&cPath='.$_GET['cPath']



I found an  error of the 2nd type (link notusing tep_href_link) in line 407 of additional_images.php
					$lc_text = '&nbsp;<a href="javascript:popupWindow(\'additional_images_popup.php?'.(!empty($listing['additional_images_id'])?'additional_images_id='.$listing['additional_images_id']:'products_id='.$listing['products_id']).'\')">' . ($_GET['show_images'] == 'y' ? tep_image(DIR_WS_CATALOG . DIR_WS_IMAGES . (!empty($listing['products_image']) ? $listing['products_image'] : (!empty($listing['products_image_med']) ? $listing['products_image_med'] : (!empty($listing['products_image_pop']) ? $listing['products_image_pop'] : '' ) ) ), $listing['products_name'], (ADDIMAGES_RESTRICT_IMAGE_SIZE=='true'?SMALL_IMAGE_WIDTH:''), (ADDIMAGES_RESTRICT_IMAGE_SIZE=='true'?SMALL_IMAGE_HEIGHT:'')) : '') . '</a>&nbsp;';

And in line 142 of displayimages.php
				document.write(\'<a href="images/' . $addimages_images[$item]['popimage'] . '"target="_blank" rel="lightbox[group]" title="' . addslashes(htmlspecialchars($addimages_images[$item]['desc'])) .'"' . $t_menu_mouseover . '>' . tep_image(DIR_WS_IMAGES . $addimages_images[$item]['image'], addslashes(htmlspecialchars($addimages_images[$item]['desc'])), (ADDIMAGES_RESTRICT_PARENT=='false'&&$item==0&&$this->groupwithparent=='true'?'':$addimages_image_width), (ADDIMAGES_RESTRICT_PARENT=='false'&&$item==0&&$this->groupwithparent=='true'?'':$addimages_image_height), 'hspace="5" vspace="5"') . '<br>' . (!empty($addimages_images[$item]['desc'])?addslashes($addimages_images[$item]['desc']):TEXT_CLICK_TO_ENLARGE). '</a>\');

And in line 35 of categories.php
define('TEXT_PRODUCT_MORE_INFORMATION', 'For more information, please visit this products <a href="http://%s" target="blank"><u>webpage</u></a>.');


#1470   nlbailey

nlbailey
  • Members
  • 2 posts
  • Real Name:Nick Bailey

Posted 06 August 2011 - 08:11 PM

Ok, I installed the newest version of the module today and used the posted instructions as well. Everything seems to be working okay except for one thing. That one thing is that if I create a new product and select an image to use and hit preview the images upload correctly and it previews fine, but once I insert it says "Image does not Exist". After confirming that the images uploaded correctly I checked the SQL Database and found that the entry for the path of the image was blank. Any idea what I missed during install? Additional images upload fine and work great.

#1471   dstebo

dstebo
  • Members
  • 91 posts
  • Real Name:dstebo

Posted 09 August 2011 - 08:07 PM

http://www.dynamicdrive.com/dynamicindex4/thumbnail2.htm

I put in oscommerce rc2, the image is appearing more great is to leave the 400px resolution:
I put so it does not work <div id="loadarea" style="width: 400px" align="left"></div>

product_info.php
<table border="0" cellspacing="0" cellpadding="2" align="center">
						  <tr> 
							<td align="center" id="loadarea" class="smallText"> 
							  <?php
 if ($product_info['products_image_med']!='') {
  $new_image = $product_info['products_image_med'];
  $image_width = MEDIUM_IMAGE_WIDTH;
  $image_height = MEDIUM_IMAGE_HEIGHT;
 } else {
  $new_image = $product_info['products_image'];
  $image_width = SMALL_IMAGE_WIDTH;
  $image_height = SMALL_IMAGE_HEIGHT;
 }
?>
							  <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']).'"rel="opacity:70; opacity-reverse:true; zoom-fade:true; zoom-fade-in-speed:800; zoom-fade-out-speed:400; zoom-width:420px; zoom-height: 420px; zoom-position:center; thumb-change:mouseover; drag-mode:false; always-show-zoom:false "class="MagicZoom">' .tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], 420, 420, 'hspace="0" vspace="0"') . '</a>'; ?><br> 
							  <?php echo tep_image(DIR_WS_IMAGES . 'detalhes.gif', HEADER_DETALHES); ?></td>
						  </tr>
						</table>

additional_images.php
<?php echo '<a class="magicborder" href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image_sm_1'])  . '"rel="enlargeimage::click" rev="loadarea"">' . tep_image(DIR_WS_IMAGES . $product_info['products_image_sm_1'], $product_info['products_name'], ULT_THUMB_IMAGE_WIDTH, ULT_THUMB_IMAGE_HEIGHT, 'hspace="1" vspace="1"') . '</a>'; ?>


#1472   NimaP

NimaP
  • Members
  • 142 posts
  • Real Name:wdwad
  • Gender:Male

Posted 23 November 2011 - 06:19 PM

I installed this contribute and it works great except that when i upload the images in the admin and come back the field is blank. If i don't browse my computer and select the images again, the additional images will be lost. Everytime i update a product, I have to browse my hard drive and find those image paths.

any help would be greatly appreciated.

#1473   Oza

Oza
  • Members
  • 84 posts
  • Real Name:Dorota K
  • Gender:Female

Posted 16 March 2012 - 10:47 AM

Hi there, does anyone know why the images are not showing when you link on facebook? any ideas how to fix it ????

#1474   14steve14

14steve14

    STORE OWNER NOT CODER

  • Members
  • 3,080 posts
  • Real Name:Steve
  • Gender:Male
  • Location:Dorset UK

Posted 27 April 2012 - 04:14 PM

If anyone is using this add on with php5.3 i hade to make a few changes to the admin/includes/function/alterimage.php to get it to work.

The first was to change

function IsHexColor($HexColorString) {
		return eregi('^[0-9A-F]{6}$', $HexColorString);
	}

to

function IsHexColor($HexColorString) {
		return preg_match('#^[0-9A-F]{6}$#i', $HexColorString);
	}

The second was to change

function gd_version($fullstring=false) {
		static $cache_gd_version = array();
		if (empty($cache_gd_version)) {
			$gd_info = gd_info();
			if (eregi('bundled \((.+)\)$', $gd_info['GD Version'], $matches)) {
				$cache_gd_version[1] = $gd_info['GD Version'];  // e.g. "bundled (2.0.15 compatible)"
				$cache_gd_version[0] = (float) $matches[1];	 // e.g. "2.0" (not "bundled (2.0.15 compatible)")
			} else {
				$cache_gd_version[1] = $gd_info['GD Version'];					   // e.g. "1.6.2 or higher"
				$cache_gd_version[0] = (float) substr($gd_info['GD Version'], 0, 3); // e.g. "1.6" (not "1.6.2 or higher")
			}
		}
		return $cache_gd_version[intval($fullstring)];
	}

to

static function gd_version($fullstring=false) {
  static $cache_gd_version = array();
  if (empty($cache_gd_version)) {
   $gd_info = gd_info();
   if (preg_match('#bundled \((.+)\)$#i', $gd_info['GD Version'], $matches)) {
	$cache_gd_version[1] = $gd_info['GD Version'];  // e.g. "bundled (2.0.15 compatible)"
	$cache_gd_version[0] = (float) $matches[1];	 // e.g. "2.0" (not "bundled (2.0.15 compatible)")
   } else {
	$cache_gd_version[1] = $gd_info['GD Version'];					   // e.g. "1.6.2 or higher"
	$cache_gd_version[0] = (float) substr($gd_info['GD Version'], 0, 3); // e.g. "1.6" (not "1.6.2 or higher")
   }
  }
  return $cache_gd_version[intval($fullstring)];
}

REMEMBER BACKUP, BACKUP AND BACKUP
I am not a coder, so dont bother sending PMs asking for help as you wont get any.  

OSC has a steep learning curve, but in general the program does work.  If it doesnt work, the chances are it is something you have done.