Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Additional Images Module


Parikesit

Recommended Posts

if you used other contributions or either it's just another version of what additional images has build on then you will have different code. It's not a problem, just add from // BOF to // EOF

 

In 2.2 rc2 works like a charm in that way!

I just had some problems with sql in phpmyadmin (products_image_med, products_image_pop, products_image_description). SQL commands and SQL import system gave me errors. What I did was to go under products table, check products_image and move on drop-down menus and option manually. This worked for me and I don't know why, after all looks the same command.

 

Great distribution! Best one I've used yet!

Link to comment
Share on other sites

Thanks for all your assistance...

 

Installation went pretty smoothly - appears however I may have broken the SEO-G contribution with the mod. Will tackle that later...

 

For now I have a couple of questions I hope someone can help me with...

1) Is there a site somewhere that has incorporated this mod that is using multiple thumbnail images that I can see for reference?

 

2) If I already have some product / images on the site - what's the best way to "fix" them so they take advantage of the mod? Should I delete those products and start over again with fresh images / and product descriptions?

 

3) What are the "normal" sizes used for small; medium and large images for a manual upload, and what sizes will the contribution "automatically" resize a large image down to for the small and medium sizes when uploaded?

 

Thanks again...

Gaver

diplomacy is the art of saying "nice doggie" - while you look for a rock.

Link to comment
Share on other sites

Thanks for all your assistance...

 

Installation went pretty smoothly - appears however I may have broken the SEO-G contribution with the mod. Will tackle that later...

 

For now I have a couple of questions I hope someone can help me with...

1) Is there a site somewhere that has incorporated this mod that is using multiple thumbnail images that I can see for reference?

 

2) If I already have some product / images on the site - what's the best way to "fix" them so they take advantage of the mod? Should I delete those products and start over again with fresh images / and product descriptions?

 

3) What are the "normal" sizes used for small; medium and large images for a manual upload, and what sizes will the contribution "automatically" resize a large image down to for the small and medium sizes when uploaded?

 

Thanks again...

 

1) see mine. http://www.coolmodels.gr/coolModels (I don't use pop up windows)

 

2) You can keep your existing pictures and generate thumb, medium and pop images or/and add more images. Product descriptions aren't touched at all.

 

3) I'm using "restrict image sizes" option for additional images contribution and takes the values from admin -> configuration -> images

 

hope that helped

Link to comment
Share on other sites

1) see mine. http://www.coolmodels.gr/coolModels (I don't use pop up windows)

 

2) You can keep your existing pictures and generate thumb, medium and pop images or/and add more images. Product descriptions aren't touched at all.

 

3) I'm using "restrict image sizes" option for additional images contribution and takes the values from admin -> configuration -> images

 

hope that helped

 

Wow... nice pilot ! :rolleyes:

 

I looked at your example - then I created a "mid-sized" image and placed it on the server using the add image routine in the admin panel. Now I have the correct mid sized image (lower file byte count) and it's correctly scaled (100px X 150px), but when I click on the details (or image) it takes me to the details page, and when I click on the image there I get a popup window that appears to contain 3 very large images and some wording "VIEW" (?) Two of the images are out of the view port of the popup window....

 

You can see it first hand by going here: http://www.authenticendlesssummer.com and clicking on the Blue Denim Hoodie in the first row, second column. Then on the resulting product info page click on the image again to see the pop-up problem.

 

So... anyone know what I managed to break?

Gaver

diplomacy is the art of saying "nice doggie" - while you look for a rock.

Link to comment
Share on other sites

1) Is there a site somewhere that has incorporated this mod that is using multiple thumbnail images that I can see for reference?

I'll PM you a few

 

2) If I already have some product / images on the site - what's the best way to "fix" them so they take advantage of the mod? Should I delete those products and start over again with fresh images / and product descriptions?

If you mean by "fix" to generate the thumbs, there is a utility included. You should find it in the Admin > Catalog menu. Use the upper utility to locate pre-existing products that have not had thumbs generated. The lower utility is for regenerating images after you FTP new ones to the site or if you change image sizes

 

3) What are the "normal" sizes used for small; medium and large images for a manual upload, and what sizes will the contribution "automatically" resize a large image down to for the small and medium sizes when uploaded?

you can specify any size. The docs should have basic info about where and how to size.

 

also be aware of this post relating to the resulting appearance of sized images.

Link to comment
Share on other sites

I'll PM you a few

 

 

If you mean by "fix" to generate the thumbs, there is a utility included. You should find it in the Admin > Catalog menu. Use the upper utility to locate pre-existing products that have not had thumbs generated. The lower utility is for regenerating images after you FTP new ones to the site or if you change image sizes

 

 

you can specify any size. The docs should have basic info about where and how to size.

 

also be aware of this post relating to the resulting appearance of sized images.

 

Thanks Todd,

 

I wish I had that tip regarding resizing about an hour ago...

 

I used the "utility" to generate images for all the products in one of my categorys and then noticed a very pixelated thumbnail was being used on the product_list and new_product pages...

 

So - I removed all the images and created new thumbs and mids from the large image and uploaded them again.

 

The problem I noted with the popup displaying multiple images went away after tweaking the admin panel some.

 

Thanks for the references - I'll go check them out next...

 

Another question for you - when I use one of the automated image generator routines - is it actually creating a smaller image and storing it somewhere or it is just generating them on the fly with each new http request?

 

Thanks again,

Gaver

diplomacy is the art of saying "nice doggie" - while you look for a rock.

Link to comment
Share on other sites

I just finished installing the contribution, but now I get a HTTP 404 file not found message when trying to log in to the admin. Is the files to compare updated to the latest version of OS commerce. Because I did not compare them, I just overwrote the files, because I have a completly new and unedited store installed.

Link to comment
Share on other sites

I just finished installing the contribution, but now I get a HTTP 404 file not found message when trying to log in to the admin. Is the files to compare updated to the latest version of OS commerce. Because I did not compare them, I just overwrote the files, because I have a completly new and unedited store installed.

really should do a little reading to TRY to answer it for yourself before jumping into a question. That's why it's a public forum.

 

The files are not based on the latest version. Step C. of the install doc lists the version it is based on and we discussed it on the last page of the topic. ;)

Link to comment
Share on other sites

Hello, this is only my second post - the forum is so helpful on this site.

 

I only wish to have 2 pics per product - 1 side and 1 front View.

 

I have: 1 sm (Small Pic) & 1XL pic for the side view - both are exactly the same file.

How do I upload only the sm pic and make Additional Images think that I've uploaded the XL pic too?

 

I also wish to do the same for the front view - except, in that case, I currently have to upload the same file 3 times.

 

Any assistance deeply appreciated.

 

==================

PS. Thank you for a fine Contribution.

Link to comment
Share on other sites

I've been running this contrib for a while in my store, and it's worked very well!

 

How could we change it so that it copies the additional images when duplicating a product.

 

The main image is field is copied in the db but the additional images aren't copied over.

 

I have a lot of products which have additional attributes like extra hard drive or what ever. With 7+ additional images to redo for every variation is quite cumbersome.

 

Anyone got any ideas?

 

I went through the changes made in the latest version but that isn't one of the added functionalities.

 

Michael

Link to comment
Share on other sites

Todd,

 

I tried to upload a new set of image files to one of the directories created by AI and I"m getting errors stating permission denied.

 

So.. I tried to chmod the values of the files and that was denied also...

 

Is there a way for me to delete files and upload replacements for them wihout having to utilize the admin panel and delete each one idividually for each product?

 

Sure hope so..

 

Regards,

Gaver

diplomacy is the art of saying "nice doggie" - while you look for a rock.

Link to comment
Share on other sites

Hi, i have used the contribution in the past. The new version 2.1.0 has given me quite a few issues, dont know if im getting old or what. I am using OSC ver 2.2-MS2.

 

My current problem here is that when i click the 'save' button to after browsing additional images nothing happens. No redirect no error, its like the button is stuck. I this is an issue in categories.php but could it be in the file im supposed to be redirected to?

 

I fixed a similar problem with the product info page, the 'preview' button at the bottom of the listing did the same thing until i removed the new 'added: onSubmit="return check_form(new_product);" ?>' portion on line 645.

 

These two problems are probably related so if someone can help i really appreciate otherwise i might just figure this out sooner. Thanks in advance.

Link to comment
Share on other sites

Got it to work, you have to remove the onsubmit command again with regards to new_images, dont know why that programmer had those lines in there, maybe something with newer version of oscommerce but there is no mention in his install file of which version the mod is for.

Link to comment
Share on other sites

Has anyone gotten lightbox js 2 to work with this. I had the lightbox working before adding the contribution.

 

Here is the section from contribution that needs to be modded. It is lines 213-217 in product_info that displays the images.

 

document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_ADD_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . (!empty($product_info['products_image_med'])?$product_info['products_image_med']:(!empty($product_info['products_image_pop'])?$product_info['products_image_pop']:(!empty($product_info['products_image'])?$product_info['products_image']:''))), addslashes($product_info['products_name']), (ADDIMAGES_RESTRICT_PARENT=='true'?DISPLAY_IMAGE_WIDTH:''), (ADDIMAGES_RESTRICT_PARENT=='true'?DISPLAY_IMAGE_HEIGHT:''), 'hspace="5" vspace="5"') . '<br>' . (!empty($product_info['products_image_description'])?$product_info['products_image_description']:TEXT_CLICK_TO_ENLARGE) . '</a>'; ?>');

//--></script>

<noscript>

<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . (!empty($product_info['products_image_pop'])?$product_info['products_image_pop']:$product_info['products_image'])) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . (!empty($product_info['products_image_med'])?$product_info['products_image_med']:(!empty($product_info['products_image_pop'])?$product_info['products_image_pop']:(!empty($product_info['products_image'])?$product_info['products_image']:''))), $product_info['products_name'], (ADDIMAGES_RESTRICT_PARENT=='true'?DISPLAY_IMAGE_WIDTH:''), (ADDIMAGES_RESTRICT_PARENT=='true'?DISPLAY_IMAGE_HEIGHT:''), 'hspace="5" vspace="5"') . '<br>' . (!empty($product_info['products_image_description'])?$product_info['products_image_description']:TEXT_CLICK_TO_ENLARGE) . '</a>'; ?>

</noscript><?php

 

its needs to be modded to fit the rel=lightbox tag, just i dont know how to do this and replace the popup box.

 

<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" rel="lightbox">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>

<noscript>

<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>

</noscript>

 

Taken from support thread for Lightbox http://www.oscommerce.com/forums/index.php?showtopic=217675

 

 

The lightbox support file in the contribution list doesnt work on the new versioin of ADD IMGS because there is no additional_images file in includes only in admin.

Link to comment
Share on other sites

Hello, this is only my second post - the forum is so helpful on this site.

 

I only wish to have 2 pics per product - 1 side and 1 front View.

 

I have: 1 sm (Small Pic) & 1XL pic for the side view - both are exactly the same file.

How do I upload only the sm pic and make Additional Images think that I've uploaded the XL pic too?

 

I also wish to do the same for the front view - except, in that case, I currently have to upload the same file 3 times.

 

Any assistance deeply appreciated.

 

==================

PS. Thank you for a fine Contribution.

 

If you set the contribution to automatically generate thumbs, then you only need to upload 1 image size per image. If you want the small and medium images the same size, set them as the same size in the Admin > Configuration > Images. Then you would upload the largest sized image for each. If you want one of the images to always be small, everything is the same, just upload the small image size and all sizes will be small.

Link to comment
Share on other sites

Todd,

 

I tried to upload a new set of image files to one of the directories created by AI and I"m getting errors stating permission denied.

 

So.. I tried to chmod the values of the files and that was denied also...

 

Is there a way for me to delete files and upload replacements for them wihout having to utilize the admin panel and delete each one idividually for each product?

 

Sure hope so..

 

Regards,

depends on your host, not all are setup to allow file manipulation from a php script. Here is some info relating to file ownership and PHP I wrote for another, a while ago.

 

The problem is not permissions, but file ownership. On some hosts the webserver runs under the unprivileged "nobody" user name. So files get created as being owned by that user. Some hosts also go one step further and don't allow other users access to files owned by someone else. If that is the case, the only way to access those files is through a web-based file manager that also runs as user nobody. cPanel has one that allows you to change permissinos. Maybe your host has something similar. When you FTP to your site files, you are FTPing as the user name of the FTP login (different user then "nobody").

 

You may be able to change the permissions of the files from 755 to 777 with a web based file manager. The other option is to ask your host to do it for you.

 

If you can change the permissions, find out if 777 permissions allows you to access the files via FTP. If not, that host is blocking access to files owned by other users and that host will be more trouble then it's worth. May also cause trouble with header tags controller. Find one on linux with cPanel and (preferably) SuExec installed. SuExec is something that protects the host from bad people and also makes sure the webserver is running as the user the account is installed on.

 

Just makes things more easily accessible by PHP code and FTP accounts by making the PHP web account run under the FTP account name instead of Nobody. SuExec did other things to protect the host and client from be hacked also, not sure if SuPHP does all the same. I haven't looked into it.

 

Just to be clear, SuExec (I think) is now called SuPHP. I just had a look at one of my servers' configurations, and sure enough, they don't call it SuExec anymore.

Link to comment
Share on other sites

Got it to work, you have to remove the onsubmit command again with regards to new_images, dont know why that programmer had those lines in there, maybe something with newer version of oscommerce but there is no mention in his install file of which version the mod is for.

 

the javascript and the onsubmit code fixes an issue with some servers that didin't allow the upload of the image to complete. It was this issue mentioned in the fixes:

+ Fixed issue where new products using the same image name failed to generate

the sized images leaving something like "/tmp/phptRbYPs" in the thumb image field.

 

If you don't experience that issue, that code will be unimportant to you. When working correctly, the javascript communicates to the server and checks for an existing image with the same name. then gives you a choice to replace or cancel. Also helps if you prevent accidentally replacing an existing product image with a new one.

Link to comment
Share on other sites

  • 2 weeks later...

This is a great contrib. I just got Additional Images Module v 2.1.0 installed on osc 2.2rc2a. It seems wroking all right, but "thumbnail menu with mouse-over display for product page and popup" did not work for me. I had the mouse-over the thumbnail menu image, but nothing happened. Not sure what is going on here.

 

Is that a configuration problem or installation problem or something else?

 

Thanks,

 

Jason

Link to comment
Share on other sites

Hi again.

 

After a while using additional images and testing with Firefox browser, I saw a very strange behavior with Internet Explorer (version 6 and above) when in some products where I've added more than one pictures, puts them out of the border on the right. On Firefox works fine!

 

example product info(working fine): http://www.coolmodels.gr/beltcprtf-p-31.html

 

example products info(not working): http://www.coolmodels.gr/extra330lkit-p-33.html

 

Also IE says I have syntax errors. I didn't found any but it says it's around there:

 

//--></script><noscript>

<a href="http://www.coolmodels.gr/images/products/913949961959960955940957945/extra_mainl.jpg" target="_blank"><img src="product_thumb.php?img=images/products/913949961959960955940957945/extra_mains.jpg&w=100&h=61" width="100" height="61" hspace="5" vspace="5" border="0" alt=""><br>Επιλέξτε για μεγέθυνση</a>

</noscript></td>

 

If anyone could help me??? I'm gonna officially open my business this week...

 

Thanks in advance.

Marios

Link to comment
Share on other sites

lets start with the mouse-overs. They are not working, I think, due to a configuration problem. Image sizes aren't showing in the javascript. The path to your images that AI is looking for is a combination of things in your /includes/configure.php and your image name.

show me your defines for

DIR_FS_CATALOG

DIR_WS_IMAGES

AND the image path saved in one of the two products you posted (Admin -> Catalog -> Edit Product).

 

 

for the alignment problem, it one of those oddities of IE. try removing the following segment of the line from your product_info.php that is between <!-- // BOF: Additional Images --><!-- // EOF: Additional Images -->

 align="<?php echo ADDIMAGES_TABLE_ALIGNMENT; ?>"

we can fix an alignment problem later if that helps.

Link to comment
Share on other sites

Hi again.

 

After a while using additional images and testing with Firefox browser, I saw a very strange behavior with Internet Explorer (version 6 and above) when in some products where I've added more than one pictures, puts them out of the border on the right. On Firefox works fine!

 

example product info(working fine): http://www.coolmodels.gr/beltcprtf-p-31.html

 

example products info(not working): http://www.coolmodels.gr/extra330lkit-p-33.html

 

Also IE says I have syntax errors. I didn't found any but it says it's around there:

 

 

 

If anyone could help me??? I'm gonna officially open my business this week...

 

Thanks in advance.

Marios

 

My problems are now solved!

"Paypal Logo" infobox contribution caused that problem and when I removed it everything worked fine!

Dunno why but I'm sure it wasn't Additional images bug.

 

Thanks again for the great Contribution and sorry If I placed my posts in wrong place. I didn't got used to that new style of the forum yet but I will.

Link to comment
Share on other sites

:blink:

 

Surfalot or Kymation

 

I noticed that Kymation has posted "More Pics 2.01" in the "Additional Images" contribution. I believe this is an update to More Pics rather than Additional Images - correct?

 

Question: The package "More Pics 2.01" by Kymation seems to be very similar to "Additional Images v2.1.0" by Surfalot. What are the relavent differences now? The More Pics contribution was not origionally a separate database table.

 

Compliments to both programmers.

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...