Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Additional Images Module


Parikesit

Recommended Posts

Actually, in looking again at my issue, I see that the problem is more likely to be the image resize function. If I right-click and view the images, here is what I see:

 

http://natrlobs.sc22.info/images/Sprucem.jpg <--Medium-sized image, correct size

 

http://natrlobs.sc22.info/images/products/silk-and-milk/IMG_0711m.jpg <--also medium image, improperly sized.

 

Can anyone tell me where I've gone wrong in my set-up to cause these resizes to be so far off? Thanks!!

Link to comment
Share on other sites

  • 1 month later...

Hello all,

 

I just installed this contribution on my test site and have a couple of problems.

 

1. All of my product_info main images are not showing up unless I add a second image. Once I add a second image as the "Thumb or Single Large Image" then the original image and the second image show up correctly. But I'd like to have all my images show up without doing this in case there is no alternate image needed.

 

2. when I add a second image to the "Products Info Image" instead of the "Thumb or Single Large Image" the image is just a shrunken version of the main image no matter what I choose.

 

Any idea on what could be causing this?

Link to comment
Share on other sites

  • 2 weeks later...

I have been using this contribution on my current site and think that its the best image contribution that there is.

 

As i am upgrading my site slowly to 2.3.1, i was wondering if anyone with more skills than me, is trying to get the funcionallity of this contribution to work with this new version. I am looking for something that will create thumbnails and automatically store them is a sensible place within the image directory.

REMEMBER BACKUP, BACKUP AND BACKUP

Link to comment
Share on other sites

  • 1 month later...

Hi everyone, this is a FANTASTIC image contribution! LOVE IT!

 

It's exactly what I need. I'm not sure if I'm not setting something properly or if it's not setup to do this. My product listing images are larger than most people display in the listing...they are 150x200. My problem is that on the product info page, that same "small image" setting is used for the thumbnails.

 

Is there a way to have a separate setting for the thumbnails size (I'm wanting 75x100) so that they can be much smaller on the product info page than the size on the product listing page?

 

Since this contribution says three size for images, I'm thinking it might be not having a setting correct.

 

Thanks in advance for any help :)

Edited by Dianna668
Link to comment
Share on other sites

  • 1 month later...

Hi, im having some trouble installing this module... Ive followed the steps and have tried this installation several times now each time with the same result.

Essentially i am able to get the options in the admin/back-end to show up correctly complete with the 3 upload boxes for the various images. My problem is after merging the files from teh installation package with those of which i already had (on the server), once i upload the new files to my shop i start getting errors on the front end (none on the back end)... specifically the following:

______________________

Warning: require(includes/classes/logger.php) [function.require]: failed to open stream: No such file or directory in /path_to/includes/application_top.php on line 76

 

Fatal error: require() [function.require]: Failed opening required 'includes/classes/logger.php' (include_path='.:/usr/local/lib/php:/usr/local/php5/lib/pear') in /path_to/includes/application_top.php on line 76

______________________

 

Im just not sure how to resolve this... I checked my original installation and i DID have a file called logger.php located exactly where it is being called.

 

Any ideas???

 

Im running OSC v 2.2rc2

 

Thank you in advance,

 

Iain

Edited by Jan Zonjee
Link to comment
Share on other sites

Hi, im having some trouble installing this module... Ive followed the steps and have tried this installation several times now each time with the same result.

Essentially i am able to get the options in the admin/back-end to show up correctly complete with the 3 upload boxes for the various images. My problem is after merging the files from teh installation package with those of which i already had (on the server), once i upload the new files to my shop i start getting errors on the front end (none on the back end)... specifically the following:

______________________

Warning: require(includes/classes/logger.php) [function.require]: failed to open stream: No such file or directory in /path_to/includes/application_top.php on line 76

 

Fatal error: require() [function.require]: Failed opening required 'includes/classes/logger.php' (include_path='.:/usr/local/lib/php:/usr/local/php5/lib/pear') in /path_to/includes/application_top.php on line 76

______________________

 

Im just not sure how to resolve this... I checked my original installation and i DID have a file called logger.php located exactly where it is being called.

 

Any ideas???

 

Im running OSC v 2.2rc2

 

Thank you in advance,

 

Iain

 

 

Bit of an update on my issue, or rather some clarification. I just wiped the store, installed a fresh copy of OSC 2.2rc2 and then before making any changes outside of general configuration (store name etc) i installed this module. Once again, everything in the backend is working fine and the module appears to have been installed correctly. Front end issues persist and am stuck with the same error as mentioned above.

 

As the installation guide is somewhat vague in regard to how to merge the files using windif what i did exactly is as follows:

 

Compared the files in the module against those on my server, merged the two and uploaded again to the server.

 

Did i do something wrong? Outside of the above, im not sure what else to do.

 

Thank you in advance for your help here!!

Edited by Jan Zonjee
Link to comment
Share on other sites

Ok, so i remerged everything starting from scratch... (Another fresh install as well).

 

This time there is no error on line 76 and the front end is loading, at least some what. The problem now is the layout of the store is a total mess and only gets worse when i click into one of the prepopulated test products...

 

www.citywideappliance.ca/e-store

 

Any ideas?

Link to comment
Share on other sites

  • 2 weeks later...

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)

Link to comment
Share on other sites

  • 2 weeks later...

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

Link to comment
Share on other sites

  • 1 month later...

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?

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...

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
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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)

 

  1. USU5 requires strict and correct use of the function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL').
  2. 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 = ' <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> ';

 

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>.');

Link to comment
Share on other sites

  • 2 weeks later...

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.

Link to comment
Share on other sites

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>'; ?>

Link to comment
Share on other sites

  • 3 months later...

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.

Link to comment
Share on other sites

  • 3 months later...
  • 1 month later...

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

Link to comment
Share on other sites

  • 1 year later...

Hello,

 

Its my 1st post and sorry for my english.

 

Iam new admin old shop with Additional Images. I have problem with generate thumbs. Look at products here: http://www.krasnal.sklep.pl/index.php?cPath=31_222 images have diffrents color. Just look at images and go in to product to check oryginal images. How to fix it?

 

iam use osCommerce Professional 1.03.02 [@@osc 2.2-MS2] and i dont know how to check version of additional images, but i think its so old.

 

 

Please, help me.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...