Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Additional Images Module


Parikesit

Recommended Posts

if it bombs only when the uploaded image is very large, it may be a memory limitation issue with the host. Not sure what could cause the problem of turning an image blue when the image is smaller then the defined size limit. I'm not experiencing either issue on my php5 test site.

 

Well, it bombs but the file is copied to the server to the products folder :|

Link to comment
Share on other sites

Well, it bombs but the file is copied to the server to the products folder :|

 

I'm sorry to hear that, must be a problem with the host. I can't diagnose an internal server error. That would be up to your host if you can't help yourself.

Link to comment
Share on other sites

Problem: Pop up image not being displayed when selected from product_info.php, instead the homep page is being shown in a reduced size window. This may have started after URL Search Engine Safe is enabled.

 

Example

 

java script:popupWindow('http://www.infantstart.com/popup_add_image.php/imagesID/5&products_id=120&cPath=37')

 

This would fix it, haven't located code yet to diagnose issue

 

java script:popupWindow('http://www.infantstart.com/popup_add_image.php?imagesID=5&products_id=120&cPath=37')

 

Did someone else come across this problem yet and I missed it in the board?

 

Thanks!

Edited by bbaez
Link to comment
Share on other sites

Problem: Pop up image not being displayed when selected from product_info.php, instead the homep page is being shown in a reduced size window. This may have started after URL Search Engine Safe is enabled.

 

Example

 

java script:popupWindow('http://www.infantstart.com/popup_add_image.php/imagesID/5&products_id=120&cPath=37')

 

This would fix it, haven't located code yet to diagnose issue

 

java script:popupWindow('http://www.infantstart.com/popup_add_image.php?imagesID=5&products_id=120&cPath=37')

 

Did someone else come across this problem yet and I missed it in the board?

 

Thanks!

this isn't the only contribution that does not support the (experimental) SE safe urls. you would be better off using Ultimate SEO URLs contributions. (which doesn't mess up the GET data in the URL)

Link to comment
Share on other sites

I downloaded Additional Images v2.0.0 and have uploaded the new files and compared the origional files, I attempted to run additional_images_configure.php but it does nothing. My web browser screen stays empty, can anyone be of assistance?

 

Don't know if this is already answered, but here is a possible solution (I had the same problem):

 

Set your admin language to ENGLISH. If you use another language in admin, the config tool won't show up, because there are no language files for it in different languages.

 

I made the experience that in 80% der cases if you get a blank page in oscommerce, it's something with language files.

Link to comment
Share on other sites

You are welcome! :-)

Thanks for the cool contribution!

 

 

I installed this contribution. It was a bit difficult, because I have many other contribs installed, but now it works somehow. Not exactly, how it supposed to, but I can live with it.

 

Now I have the problem that if I auto upload 3 images (I really get 4 images, but that's not the problem, I just don't understand why), on the rewiev page i get a popup picture from a 2kb very small pic.

 

Popup doesn't work for me on the product info page (probably because I messed around with the code to fit the other contribs), so I use the "one big and 3 thumb" solution on the product info.

 

Now my question is, what determines, which pictures is used in popup windows?

 

The second question is, how can I remove the links from the thumbnails' description on product info page? They are useless without popup window.

 

Thanks for reply in advance!

 

--------------------

 

When my popup comes up it has a HTTP 404 error inside of it (and no pic). Any ideas? I have STS installed...

 

Never mind...I figured it out. ;)

 

 

You could write, how you figured out, maybe other people have the same problem. It's a bit selfish to tell "i figured out" and leave :-P

Edited by Hunnenkoenig
Link to comment
Share on other sites

Now my question is, what determines, which pictures is used in popup windows?

 

The second question is, how can I remove the links from the thumbnails' description on product info page? They are useless without popup window.

 

Thanks for reply in advance!

 

The standard osCommerce picture (the original database location of osCommerce) will contain the thumbnail image. If you have other contributions that show a popup in other areas, the popup needs to show the products_image_pop field from the products database. That will be the large image for each product's base image.

 

there's a couple ways to remove the link. You can put a space in the image description for each product. You can change the default "click here" text in the shop's language files to empty quotes. should be in /catalog/includes/languages/[YOURLANGUAGE]/product_info.php. Or if you want to remove it from the code, it is the end of line 121 of catalog/includes/classes/displayimages.php

Link to comment
Share on other sites

Thanks for reply! I solved the problem.

 

Now I have another problem:

 

Hello Guys !

 

I am stuck with this contribution.

 

Problem: I've installed everything correctly, but images does not show on product info page at all, although I can find them created in my images directory.The only picture is shown is one which I upload when create a product. Also, when I add additional image in admin panel, it shows me that the product has 2 images, but only in admin.

What can be the solution? Server is fully compatible with all requirements for contribution and OSCMAX.

 

I really appreciate your help,

Thanks.

 

I have this same issue. The funny thing is, It worked fine until I deleted all oscommerce items which came with the initial install and tried to set up my own products.

 

Now I don't get an image on info page at all. Not even the originally uploaded image.

Edited by Hunnenkoenig
Link to comment
Share on other sites

the only advice I can offer is to go through the product_info.php install again. I'm not privy to your modification, so that is the best I can do with the information provided.

Link to comment
Share on other sites

the only advice I can offer is to go through the product_info.php install again. I'm not privy to your modification, so that is the best I can do with the information provided.

 

 

I solved the problem by reinstalling the whole thing from backup and make the modification again.

 

Now it works. Thanks!

Link to comment
Share on other sites

make sure you have added lines 72-82 of the products_info.php file in the contribution package.

 

Thanks, Surfalot.

 

I checked the product_info.php, and did see lines 72-82 were there. I added an "alert" function there, and tried to see if this "showImage" function would be called when roll-over the images.

 

It appeared that this function did not get called becasue I did not see the alert box popup. See below:

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

<?php // BOF: Additional Images ?>

<script language="javascript"><!--

function showImage(img,width,height) {

alert("I am an alert box!!")

 

if (document.getElementById("mainimage")) {

document.getElementById("mainimage").src = img;

document.getElementById("mainimage").height = height;

document.getElementById("mainimage").width = width;

}

}

//--></script>

<?php // EOF: Additional Images ?>

 

</head>

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">

<!-- header //-->

 

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

 

No idea. what else places I can check? I really want to get this great contrib work on my site.

 

Thanks again,

 

Jason

Link to comment
Share on other sites

Thanks, Surfalot.

 

I checked the product_info.php, and did see lines 72-82 were there. I added an "alert" function there, and tried to see if this "showImage" function would be called when roll-over the images.

 

It appeared that this function did not get called becasue I did not see the alert box popup. See below:

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

<?php // BOF: Additional Images ?>

<script language="javascript"></script>

<?php // EOF: Additional Images ?>

 

</head>

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">

 

 

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

 

No idea. what else places I can check? I really want to get this great contrib work on my site.

 

Thanks again,

 

Jason

 

This was from a month ago!

 

look at the page with firefox browser. Select Tools -> Error Console from firefox menu. Clear and reload the page. Any other script errors on the page?

 

look at the source of the page and look for the showImage function call in the images. is it there?

Link to comment
Share on other sites

Hi!

 

I have some problem with Additional Images Module. On my product info page I want to show the orginal image size but now it show the small thumbnail image created with the module. In the settings in admin under configuration->images I have left the Display Image Width and Display Image Height field blank. What can be wrong?

Link to comment
Share on other sites

Hi!

 

I have some problem with Additional Images Module. On my product info page I want to show the orginal image size but now it show the small thumbnail image created with the module. In the settings in admin under configuration->images I have left the Display Image Width and Display Image Height field blank. What can be wrong?

did you know you have to regenerate the image sizes after changing the image sizes in the configuration -> Images? That is under Catalog > Additional Images. If you leave the display W&H blank when regenerating the images, it should end up being the same size as the popup size.

what are the settings for AI in the configuration -> Additional Images?

Edited by surfalot
Link to comment
Share on other sites

  • 2 weeks later...

Hello,

 

 

I've tried to install this addon twice tonight and keep getting an error. I have installed it successfully before.

Here's the error I'm getting.

 

On http://site.com/admin/additional_images_configure.php:

 

Warning: require(includes/additional_images_configure.php) [function.require]: failed to open stream: No such file or directory in /home/site/public_html/admin/additional_images_configure.php on line 28

 

which says (additional_images_configure.php):

 

require(DIR_WS_INCLUDES . basename(__FILE__));

 

I'm also seeing this error on the http://site.com/admin/ page:

 

Fatal error: Call to undefined function tep_hide_session_id() in /home/site/public_html/admin/index.php on line 54

 

which says (/home/site/public_html/admin/index.php):

 

<td class="pageHeading" align="right"><?php echo tep_draw_form('adminlanguage', FILENAME_DEFAULT, '', 'get') . tep_draw_pull_down_menu('language', $languages_array, $languages_selected, 'onChange="this.form.submit();"') . tep_hide_session_id() . '</form>'; ?></td>

 

Thanks for the assist.

Edited by 720Time
Link to comment
Share on other sites

Hello,

 

 

I've tried to install this addon twice tonight and keep getting an error. I have installed it successfully before.

Here's the error I'm getting.

 

On http://site.com/admin/additional_images_configure.php:

 

Warning: require(includes/additional_images_configure.php) [function.require]: failed to open stream: No such file or directory in /home/site/public_html/admin/additional_images_configure.php on line 28

 

which says (additional_images_configure.php):

 

require(DIR_WS_INCLUDES . basename(__FILE__));

 

I'm also seeing this error on the http://site.com/admin/ page:

 

Fatal error: Call to undefined function tep_hide_session_id() in /home/site/public_html/admin/index.php on line 54

 

which says (/home/site/public_html/admin/index.php):

 

<td class="pageHeading" align="right"><?php echo tep_draw_form('adminlanguage', FILENAME_DEFAULT, '', 'get') . tep_draw_pull_down_menu('language', $languages_array, $languages_selected, 'onChange="this.form.submit();"') . tep_hide_session_id() . '</form>'; ?></td>

 

Thanks for the assist.

 

on the first error, it is most likely because you haven't uploaded all the necessary files. catalog/admin/includes/additional_images_configure.php is the one I think it is missing, but may be more

 

The next error tells me you are installing it on an older osCommerce shop. you will need the following function in your admin/includes/functions/html_output.php (from osC RC2a)

 

////
// Hide form elements
 function tep_hide_session_id() {
$string = '';

if (defined('SID') && tep_not_null(SID)) {
  $string = tep_draw_hidden_field(tep_session_name(), tep_session_id());
}

return $string;
 }

Link to comment
Share on other sites

I am finding that when I have over 64 characters for my thumbnail image address, the image becomes broken, but if I keep it at 64 or under then I'm fine, counting after images/.

 

for example:

img src="images/products/wallpaper/modern-wallpaper/marcel-wanders-wallpaper/181" but it should be

img src="images/products/wallpaper/modern-wallpaper/marcel-wanders-wallpaper/18126_sm.jpg"

 

 

for some reason it is getting cut off and I'm receiving a broken image for my over 64 thumbnails.

 

Can anyone please help? I'd like to be able to have longer names without the broken links, thanks.

Link to comment
Share on other sites

Ok, thanks.

 

I switched hosts last month, and since they have osCommerce/Fantastico, I figured it would be less of a hassle to just use the facilities provided.

 

I'm using 2.2 Release Candidate 2a

Edited by 720Time
Link to comment
Share on other sites

I am finding that when I have over 64 characters for my thumbnail image address, the image becomes broken, but if I keep it at 64 or under then I'm fine, counting after images/.

 

for example:

img src="images/products/wallpaper/modern-wallpaper/marcel-wanders-wallpaper/181" but it should be

img src="images/products/wallpaper/modern-wallpaper/marcel-wanders-wallpaper/18126_sm.jpg"

 

 

for some reason it is getting cut off and I'm receiving a broken image for my over 64 thumbnails.

 

Can anyone please help? I'd like to be able to have longer names without the broken links, thanks.

Did you see the following in the B1 database install instructions? If you are not upgrading from a previous AI install, it should be all that is necessary to fix this.

--

You may also wish to run the following in your SQL tool, such as phpMyAdmin (provided by

your host). It is not necessary for normal operation, but some have experienced extra

long image names because of the image organization included with this contribution. some

image names may be cut-off because there isn't enough room in the products_image field

of the default shop products table.

 

-- change products_image length to 255.

ALTER TABLE `products` CHANGE `products_image` `products_image` VARCHAR( 255 ) NULL DEFAULT NULL;

--

Edited by surfalot
Link to comment
Share on other sites

I think the problem is carry-over (in the database) from my old host.

 

I thought I extracted and backed up only the inventory related stuff.

 

Using phpadmin can I still do this, wipe the slate clean, and restore the inventory only?

Link to comment
Share on other sites

My original backup seems to be the source of the problem, so I exported, administrators, categories, products, tax, etc. Just the core stuff.

 

Hopefully this will resolve things for me. Thanks for your time.

Link to comment
Share on other sites

My original backup seems to be the source of the problem, so I exported, administrators, categories, products, tax, etc. Just the core stuff.

 

Hopefully this will resolve things for me. Thanks for your time.

 

don't forget, if your database backup is previous to the additional images install, you need to setup the Additional Images database stuff again.

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