Jump to content
Sign in to follow this  
Parikesit

[Contribution] Additional Images Module

Recommended Posts

Check to see if "define('FILENAME_LOGIN', 'login.php');" is in the INCLUDES/FILENAMES.PHP file.

 

Also: check in your admin/includes/languages/english.php

 

there should be a line there that says

CODE

define('BOX_CONFIGURATION_ADMINISTRATORS', 'Administrators');

 

If it is not there, add it in around about line 59, and under the line that says

CODE

define('BOX_HEADING_CONFIGURATION', 'Configuration');

 

Just a note: I found this info by doing a google search of the errors you posted. Of course I had to take out any parts that were specific to your site, but sometimes you get lucky by doing that and get your answers.

 

Hope this helps!

Share this post


Link to post
Share on other sites
I don't know how you all are getting this to work. I have tried 3 times on a frest install and getting this error

 

Fatal error: Call to undefined function tep_hide_session_id() in /home/withlove/public_html/catalog3/admin/index.php on line 54 on admin page under adminstaror tab that is now says"BOX_CONFIGURATION_ADMINISTRATORS"

 

when I click on additional images tab now page shows this error: The requested URL /catalog3/admin/FILENAME_LOGIN was not found on this server.

 

I really need this install. We have 2 pictures for each product and we need the popup for each.

 

 

I followed the instructions just as were included in v2.0.1. new install of osc rc2a. running php 5.2.5 register globals on.

 

Would appreciate any advice. Spent way too much time on this to get no where. Thanks!

are you using a compare program at all? or are you just replacing files?

 

the reason I ask that is the first error you mention is in the file admin/includes/functions/html_output.php. the "Call to undefined function tep_hide_session_id()" error. If you simply replaced that file from the contribution package, it would cause that error since tep_hide_session_id() has been added to that file in the newest version of osCommerce RC2a

Edited by surfalot

Share this post


Link to post
Share on other sites

Hi,

 

I am still trying to install this one. Getting there, but still need help. I do not see anywhere on the product edit page where you add the images. This screen does not seem to be changed at all. I believe I have changed and added all files, but obviously have missed something here.

 

Can you tell me what I should be checking?

 

Thanks!

Share this post


Link to post
Share on other sites
Hi,

 

I am still trying to install this one. Getting there, but still need help. I do not see anywhere on the product edit page where you add the images. This screen does not seem to be changed at all. I believe I have changed and added all files, but obviously have missed something here.

 

Can you tell me what I should be checking?

 

Thanks!

there should be a new blue background area on the product edit page where the image upload field is. Should have 3 fields (for 3 sizes) for the main image, plus a image description field. All additional images are entered from the category/product list page, on the right side of the page where the product summary is shown. Search the admin/categories.php of the contrib package file for "Additional Images" to make sure you have included all the sections. all additions are marked.

Share this post


Link to post
Share on other sites
there should be a new blue background area on the product edit page where the image upload field is. Should have 3 fields (for 3 sizes) for the main image, plus a image description field. All additional images are entered from the category/product list page, on the right side of the page where the product summary is shown. Search the admin/categories.php of the contrib package file for "Additional Images" to make sure you have included all the sections. all additions are marked.

 

Thanks surfalot, you have been a big help. I could have sworn that I had changed that one out. Anyway, I have the options now available in my product edit page. My last obstacle is the product_info.php file. I have so many contributions installed before this one, I am having quite a time even using the file compare program to get them to meld. I think I am close, but yet so far. I am not real good with this php coding stuff, so I feel like a hacker. When I upload the product_info.php file I have modified with your coding with my previous file, I lose the image and the price goes to $0.00. It is probably some little dot or semi colon thing somewhere. I haven't been able to figure it out yet. I am so anxious to see this contrib in action! Anyway, any further ideas for me would be Oh so appreciated or if you could take a look at my file and tell if you see what is wrong, that would be awesome.

 

Thanks again for all your help!

Share this post


Link to post
Share on other sites

I thought I would add that when I upload the product_info.php file that comes with the contrib, it appears to work as in the pop up image is big again and the product page has all the information, but then when you click to add to cart, it goes to the shopping cart yet the item has not actually been entered into the cart. I am going over the product_info.php file again comparing my old version which works as far as functioning through the shopping cart, but not the extra image updates in place and the file from the contrib. If anyone has any suggestions they would be much appreciated.

Share this post


Link to post
Share on other sites
I thought I would add that when I upload the product_info.php file that comes with the contrib, it appears to work as in the pop up image is big again and the product page has all the information, but then when you click to add to cart, it goes to the shopping cart yet the item has not actually been entered into the cart. I am going over the product_info.php file again comparing my old version which works as far as functioning through the shopping cart, but not the extra image updates in place and the file from the contrib. If anyone has any suggestions they would be much appreciated.

 

Update on my situation: I think I got it!!! I needed to incorporate the quantity coding properly. Of course it was just a matter of this php code stuff which I have to guess at unless directly told what to put in. Anyway, I wanted to say I think I am there before I waisted anyone's time trying to help me any more. Now to go and hopefully see how this contrib actually works!

Share this post


Link to post
Share on other sites

Just installed this contribution on RC2a along side STS and Header Tags. All of the admin functions seem to work properly other than 'no file uploaded' errors for empty image boxes.

 

The problem I'm having is when I click enlarge image and expect lightbox to take over the screen. Instead lightbox loads the image about 1000px down on the page.

 

Anyone know what would cause this?

 

Thank You!

Share this post


Link to post
Share on other sites
hi,

your contribution in general is working great for me.

 

However when I turn on my caches I lose the pop up image. All the additional images are coming up, it is just when I click to enlarge I get the pop-up window with no image.

 

when I have caches off, everything is working fine. Can you possibly help.

 

thanks.

did you clear your cache before turning it on?

Share this post


Link to post
Share on other sites

Thank you!! I did want to display the rollover menu below the product description, but I decided I like how it works now with the popup. Thanks for your help!

Share this post


Link to post
Share on other sites

I have a problem. When I click on the enlarge link, if the product does not have more than the original image, it does not get larger than 100px in height (i believe its 100px, could be more or less). It also moves window to the center so that the top left corner is in the center of the screen forcing some of the image off the screen to the right. If the product does have more than 1 image, it will open up ok, but still pushed over to the right. DOes anyone know how I can fix this? not too keen with javascript and php when theyre mixed.

here is my javascript from the popup_add_image.php file. I haven't edited it.

<script language="javascript"><!--
var i=0;
function resize() {
 if (window.navigator.userAgent.indexOf('MSIE 6.0') != -1 && window.navigator.userAgent.indexOf('SV1') != -1) { 
	   i=23; //IE 6.x on Windows XP SP2
 } else if (window.navigator.userAgent.indexOf('MSIE 6.0') != -1) { 
	   i=50; //IE 6.x somewhere else
 } else if (window.navigator.userAgent.indexOf('MSIE 7.0') != -1) { 
	   i=0;  //IE 7.x 
 } else if (window.navigator.userAgent.indexOf('Firefox') != -1 && window.navigator.userAgent.indexOf("Windows") != -1) { 
	   i=38; //Firefox on Windows
 } else if (window.navigator.userAgent.indexOf('Mozilla') != -1 && window.navigator.userAgent.indexOf("Windows") != -1 && window.navigator.userAgent.indexOf("MSIE") == -1) { 
	   i=45; //Mozilla on Windows, but not IE7	
 } else if (window.opera && document.childNodes) {
	   i=50; //Opera 7+
 } else if (navigator.vendor == 'KDE' && window.navigator.userAgent.indexOf("Konqueror") != -1) {
		 i=-4; //Konqueror- this works ok with small images but not so great with large ones
	   //if you tweak it make sure i remains negative
 } else { 
	   i=0; //All other browsers
 }

 imgWidth = <?php echo $imagemenu->maximagewidth; ?>+<?php echo $extra_window_width; ?>;
 imgHeight = <?php echo $imagemenu->maximageheight; ?>+<?php echo $extra_window_height; ?>-i;
 var width = screen.width;
 var height = screen.height;
 var leftpos = width / 2 - imgWidth / 2;
 var toppos = height / 2 - imgHeight / 2;
 window.moveTo(leftpos, toppos);

 if (document.getElementById("mainimage")) window.resizeTo(<?php echo (!empty($imagemenu->maximagewidth)?$imagemenu->maximagewidth:'document.getElementById("mainimage").width'); ?>+<?php echo $extra_window_width; ?>, <?php echo (!empty($imagemenu->maximageheight)?$imagemenu->maximageheight:'document.getElementById("mainimage").height'); ?>+<?php echo $extra_window_height; ?>-i);
 self.focus();
}
function popupWindow(url) {
 window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res
izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,le
ft=150');
}
function showImage(img,width,height) {
 if (document.getElementById("mainimage")) {
document.getElementById("mainimage").src = img;
document.getElementById("mainimage").height = height;
document.getElementById("mainimage").width = width;
 }
}
//--></script>

Thanks in advance

Share this post


Link to post
Share on other sites
I have a problem. When I click on the enlarge link, if the product does not have more than the original image, it does not get larger than 100px in height (i believe its 100px, could be more or less). It also moves window to the center so that the top left corner is in the center of the screen forcing some of the image off the screen to the right. If the product does have more than 1 image, it will open up ok, but still pushed over to the right. DOes anyone know how I can fix this? not too keen with javascript and php when theyre mixed.

here is my javascript from the popup_add_image.php file. I haven't edited it.

you really haven't given me much to go on (settings, link, etc.) I know the code, I wrote it. It works in most cases, my bet is you haven't installed it correctly or you have a bad setting in your configure.php file preventing the code from accessing the image file store.

Share this post


Link to post
Share on other sites
you really haven't given me much to go on (settings, link, etc.) I know the code, I wrote it. It works in most cases, my bet is you haven't installed it correctly or you have a bad setting in your configure.php file preventing the code from accessing the image file store.

hmm...ok, it seemed like it installed correctly, there were no issues other than the fact that i had to fix something in the configure.php file which i doubt had anything to do with the contribution because i had that issue once before.

here are my settings:

 

Automatically create 3 image set false

Background color ffffff

Pre-fill upload dir w/ Category names false

Pre-fill starting with this sub-dir

Use image size restrictions true

Product Info: Show Additional Images true

Product Info: Product Image Behavior popup

Product Info: Group parent with sub-images false

Product Info: Restrict parent image size true

Product Info: Table alignment right

Product Info: Table location sides

Product Info: Number of columns 1

Product Info: Number of rows 3

Popup: Show Thumbnail Menu true

Thumb Menu: Show parent image true

Thumb Menu: Use image size restrictions true

Thumb Menu: Table alignment left

Thumb Menu: Table location sides

Thumb Menu: Number of columns 1

Thumb Menu: Number of rows 3

 

i will pm you the link to the site.

 

thanks

Share this post


Link to post
Share on other sites
hmm...ok, it seemed like it installed correctly, there were no issues other than the fact that i had to fix something in the configure.php file which i doubt had anything to do with the contribution because i had that issue once before.

here are my settings:

 

Automatically create 3 image set false

Background color ffffff

Pre-fill upload dir w/ Category names false

Pre-fill starting with this sub-dir

Use image size restrictions true

Product Info: Show Additional Images true

Product Info: Product Image Behavior popup

Product Info: Group parent with sub-images false

Product Info: Restrict parent image size true

Product Info: Table alignment right

Product Info: Table location sides

Product Info: Number of columns 1

Product Info: Number of rows 3

Popup: Show Thumbnail Menu true

Thumb Menu: Show parent image true

Thumb Menu: Use image size restrictions true

Thumb Menu: Table alignment left

Thumb Menu: Table location sides

Thumb Menu: Number of columns 1

Thumb Menu: Number of rows 3

 

i will pm you the link to the site.

 

thanks

when I view the source of the popup, it looks modified to me.

your problems reside in the image resizing mod you have installed with additional images mod. that will mess everything up with the resizing of the popup since Additional Images code will not be able to check the actual size of images and make the appropriate settings.

Edited by surfalot

Share this post


Link to post
Share on other sites
when I view the source of the popup, it looks modified to me.

your problems reside in the image resizing mod you have installed with additional images mod. that will mess everything up with the resizing of the popup since Additional Images code will not be able to check the actual size of images and make the appropriate settings.

Im sorry but I don't understand. Which file are you referring too? I had the image resize mod in there before the additional images mod. i can't uninstall the previous mod of the image resize because i did that a long time ago...i don't remember how I did it and didn't make notes (stupid me)...The popup window (popup_add_image.php) was not modified, all I did was change the background color to white.

Share this post


Link to post
Share on other sites
Im sorry but I don't understand. Which file are you referring too? I had the image resize mod in there before the additional images mod. i can't uninstall the previous mod of the image resize because i did that a long time ago...i don't remember how I did it and didn't make notes (stupid me)...The popup window (popup_add_image.php) was not modified, all I did was change the background color to white.

AI will not work correctly with that auto-image-sizer installed.

you can try to restore the tep_image() function to its original code for your version of osCommerce. It might help.

\catalog\includes\functions\html_output.php

Edited by surfalot

Share this post


Link to post
Share on other sites
AI will not work correctly with that auto-image-sizer installed.

you can try to restore the tep_image() function to its original code for your version of osCommerce. It might help.

\catalog\includes\functions\html_output.php

Ok, I'll have to give that a try. Does the additional images mod have an auto resizer? or will I have to resize them myself using photoshop?

Share this post


Link to post
Share on other sites
Ok, I'll have to give that a try. Does the additional images mod have an auto resizer? or will I have to resize them myself using photoshop?

so you downloaded and installed the contrib without even reading the abstract in the docs?

 

from the abstract:

This contribution allows you to add an unlimited number of additional images

to each product. It allows you to upload and add to each image 3 sizes. You

may create each yourself for maximum flexibility or start by uploading one

large image and have this contribution automatically fill in the smaller two

sizes. The smallest size is displayed on the product list pages. The medium

size image is displayed on the Product Info page. The large image is reserved

for the popup.

 

Image thumbnailing is supported with JPEG, PNG-8bit, PNG-24bit, and GIF image

types. Transparency is supported with the PNG and GIF formats. PHP GD 2.0 and

PHP 4.3.2 and better are required for processing images. You may use this

contribution without the image processing if your host does not meet the

requirements.

Edited by surfalot

Share this post


Link to post
Share on other sites
so you downloaded and installed the contrib without even reading the abstract in the docs?

 

from the abstract:

This contribution allows you to add an unlimited number of additional images

to each product. It allows you to upload and add to each image 3 sizes. You

may create each yourself for maximum flexibility or start by uploading one

large image and have this contribution automatically fill in the smaller two

sizes. The smallest size is displayed on the product list pages. The medium

size image is displayed on the Product Info page. The large image is reserved

for the popup.

 

Image thumbnailing is supported with JPEG, PNG-8bit, PNG-24bit, and GIF image

types. Transparency is supported with the PNG and GIF formats. PHP GD 2.0 and

PHP 4.3.2 and better are required for processing images. You may use this

contribution without the image processing if your host does not meet the

requirements.

dude dont get defensive o:) I did read that, but what I meant was (if im not understanding, please forgive me) will it make it proportional and clear or will it make it grainy like the regular oscommerce does with the images when you upload the one large image. it doesn't matter to be either way, i just wanted to know so i dont go resizing the images for clarity when they can automatically be resized with clarity.

Share this post


Link to post
Share on other sites
dude dont get defensive o:) I did read that, but what I meant was (if im not understanding, please forgive me) will it make it proportional and clear or will it make it grainy like the regular oscommerce does with the images when you upload the one large image. it doesn't matter to be either way, i just wanted to know so i dont go resizing the images for clarity when they can automatically be resized with clarity.

does proportional resize using PHP GD functions like the other thumbnailing contribs. If that isn't clean enough you may create them ahead and upload in the correct product fields.

Share this post


Link to post
Share on other sites
does proportional resize using PHP GD functions like the other thumbnailing contribs. If that isn't clean enough you may create them ahead and upload in the correct product fields.

:-\ see, i didnt know thats what PHP GD meant LoL...so i guess i should look for the mod i installed for the auto thumbnailer.

Share this post


Link to post
Share on other sites
AI will not work correctly with that auto-image-sizer installed.

you can try to restore the tep_image() function to its original code for your version of osCommerce. It might help.

\catalog\includes\functions\html_output.php

i tried this but its not helping...any other suggestions? :'(

Share this post


Link to post
Share on other sites
i tried this but its not helping...any other suggestions? :'(

popup_add_image.php still looks modified. your thumbnailing mod is still overriding the tep_image()'s normal functionality.

Share this post


Link to post
Share on other sites

I seem to have encountered a problem with the additional images contrib. When I upload an additional image I get both the warning and succes bar displayed (green and pink bars in admin). Sometimes, it doesn't upload the requested image, but instead it just places the primairy image as an additional one. Further more, when I delete the image it says it's deleted correcltly but the image is still there. It's only actually deleted when I go trough the process twice.

I don't know if this is a database issue or not. I didn't have this problem when I first installed it. But after trying to install a condition agreement contrib wich required inserting sql queries into the configuration table. That contribution is now deleted and the the database was restored from a backup sql file I made before installing it. Only other thing I did was modify categories.php, by using the tip for bypassing preview page when adding a new product.

Hmmm, I'm at a loss here, would some one PLEASE help point in the direction to fix this.

The development of my store's functionality is almost finished accept for implementing a few other things and now this?!? <_<

 

Any help would be greatly appreciated!! :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×