Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Additional Images Module


Parikesit

Recommended Posts

I'm hoping someone will be able to read this and know exactly what is happening and give me a little direction.

 

My problem is on the product info page with the pop-up routine. The image I want in my pop-up is correct but the window size does not resize to fit the image. It doesn't seem to be picking up the image dimensions, it stays at a width of 100 and height of 100. I have this site running on my local PC and everything runs great but when I upload everything to the host, I run into the window sizing problem. I have gone thru everything, the code, the admin settings, the scripts etc. and everything is the same. I hope this rings a bell with someone.

 

One thing I should mention is ... my local PC is Windows XP but I don't know if that would be a problem or not since everything else is working properly on the PC and the Host.

 

Thanks

Link to comment
Share on other sites

My problem is on the product info page with the pop-up routine. The image I want in my pop-up is correct but the window size does not resize to fit the image. It doesn't seem to be picking up the image dimensions, it stays at a width of 100 and height of 100.

 

The display class can't find your images. Commonly folks have either an extra slash or a missing slash in their includes/configure.php configuration file.

 

Additional Images uses this combination from that file to find your image store: DIR_FS_CATALOG + DIR_WS_IMAGES

 

combined should be something like /home/mysite/public_html/catalog/images/ on a cPanel server. Yours may differ of course.

Link to comment
Share on other sites

The display class can't find your images. Commonly folks have either an extra slash or a missing slash in their includes/configure.php configuration file.

 

Additional Images uses this combination from that file to find your image store: DIR_FS_CATALOG + DIR_WS_IMAGES

 

combined should be something like /home/mysite/public_html/catalog/images/ on a cPanel server. Yours may differ of course.

I think my configure.php is correct. It seems to be a browser specific problem.... When I open the pop-up in IE7, after the image loads the window resizes like it should. When I use the AOL browser, it stays at the 100 X 100 size. I wonder if I need some kind of check for AOL?

Thanks

Link to comment
Share on other sites

I think my configure.php is correct. It seems to be a browser specific problem.... When I open the pop-up in IE7, after the image loads the window resizes like it should. When I use the AOL browser, it stays at the 100 X 100 size. I wonder if I need some kind of check for AOL?

Thanks

 

maybe you have javascript turned off. I didn't know AOL still had a browser. Is it a rebranded browser?

Link to comment
Share on other sites

maybe you have javascript turned off. I didn't know AOL still had a browser. Is it a rebranded browser?

I don't know if it's actually an AOL browser anymore but I do know that they filter a lot of stuff before it hits the user screen. Apparently there is a known problem similar to what I am seeing with image sizes according to Java. Here is the link in case anybody else is interested:

 

http://www.java.com/en/download/help/aol.xml

 

I'll just keep tinkering and if I get it to do what I want I'll post it.

 

Thanks again for all your help!!

Mike

Link to comment
Share on other sites

  • 3 weeks later...

Hi Surfalot,

 

Just for the record: I had to put my old files up cause I struggled with updating this older version I'm running in order to get the javascript mouseover function working in my shop.

I'm going to install osc on my computer which of course will enable me to work on this without having to shut down any pages in my live shop.

Thanks for all the help, I really appreciate it!

Link to comment
Share on other sites

  • 3 weeks later...

HI JSR,

 

Greta Module you got ! I managed to installed it after a few trial and error..

 

However, the product price would not get displayed in the catalog or goes into the shopping cart.

 

Can check it out here: http://www.gardenofsenses.com.my/catalog/index.php

 

Please advice and thanks in advance of your help !

 

Regards,

Shaw

Link to comment
Share on other sites

HI JSR,

 

Greta Module you got ! I managed to installed it after a few trial and error..

 

However, the product price would not get displayed in the catalog or goes into the shopping cart.

 

Can check it out here: http://www.gardenofsenses.com.my/catalog/index.php

 

Please advice and thanks in advance of your help !

 

Regards,

Shaw

 

well, actually, its my contribution. :o

 

I'm not sure how the price could get messed up with the installation of this contribution. Did you merge the files or copy and replace?

 

the best advice I can offer at this point is to restore the /includes/application_top.php and the products_info.php and try the merge again.

Link to comment
Share on other sites

well, actually, its my contribution. :o

 

I'm not sure how the price could get messed up with the installation of this contribution. Did you merge the files or copy and replace?

 

the best advice I can offer at this point is to restore the /includes/application_top.php and the products_info.php and try the merge again.

 

 

Hi Surfalot,

 

I did the file replacement from /2_files_to_compare/ from Section "C. FILES MODIFICATION (EDIT)" from install readme.txt.

 

and

 

I have modified the files as requested from D. More FILES MODIFICATION (Search and Replace)....

 

Hmmm.. still can't get the price up,,, even the default DVD section also no price......

 

Perhaps I shall do everything again.....?

 

Regards,

Shaw

Link to comment
Share on other sites

Hi Surfalot,

 

I did the file replacement from /2_files_to_compare/ from Section "C. FILES MODIFICATION (EDIT)" from install readme.txt.

 

and

 

I have modified the files as requested from D. More FILES MODIFICATION (Search and Replace)....

 

Hmmm.. still can't get the price up,,, even the default DVD section also no price......

 

Perhaps I shall do everything again.....?

 

Regards,

Shaw

 

Hi, it is me again,

 

I digged into the sql file,, found that the price listing is there,, just the script refuse to show up the price.....any idea?

 

Regards,

Shaw

Link to comment
Share on other sites

Hi, it is me again,

 

I digged into the sql file,, found that the price listing is there,, just the script refuse to show up the price.....any idea?

 

Regards,

Shaw

 

I guess I have to point you back to the same best advice I gave above.

 

the best advice I can offer at this point is to restore the /includes/application_top.php and the products_info.php and try the merge again.

 

You removed something that shouldn't have been. Also, I see you said you replaced the files AND merged. the instructions says to do either, not both. If you have replaced files, did you make sure none of them where altered previously?

Link to comment
Share on other sites

hihi! first sorry for not contributing more, i'm mostly a gamer on another forum, so havn't had much time to be here and just started trying oscommerce...

 

so i installed this thing by uploading everything in the package.

 

then i ran the configure and got this:

Picture1-1.png

 

but then i went back into add new product and i still have this:

 

Picture1.png

 

i looked through the thread from page 1 to page 22... then i got bored... skipped to 40 to 56 and i couldn't really find anything that helped. please point me in the right direction. thank you sooo soo much!

Edited by darkxkiller
Link to comment
Share on other sites

so i installed this thing by uploading everything in the package.

my guess would be that categories.php didn't get uploaded. you should double check to make sure all the files from both the new files and compare folders were correctly uploaded.

 

That product edit page will only show the field for the main product image. the additional images are found in the summary area of the product lists in the admin.

Link to comment
Share on other sites

my guess would be that categories.php didn't get uploaded. you should double check to make sure all the files from both the new files and compare folders were correctly uploaded.

 

That product edit page will only show the field for the main product image. the additional images are found in the summary area of the product lists in the admin.

 

alright thanks i did that and everything, and it shows the 3 images thing with the icons right now. but whenever i press preview before adding the product, it shows a blank page... and when i go into a folder within my catalog, i get this message:

 

1146 - Table 'danzhe1_hi.TABLE_ADDITIONAL_IMAGES' doesn't exist

 

SELECT additional_images_id, medium_images, popup_images, thumb_images, images_description FROM TABLE_ADDITIONAL_IMAGES where products_id = '53'

 

danzhe1_hi is mysql,and i'm pretty sure table_additional_images is there...

 

how am i supposed to fix this error? I searched through the forum, people posted about editing product_info.php; if u did that, how did you do it exactly? Thank you very much! and sorry to be a hassle

Edited by darkxkiller
Link to comment
Share on other sites

alright thanks i did that and everything, and it shows the 3 images thing with the icons right now. but whenever i press preview before adding the product, it shows a blank page... and when i go into a folder within my catalog, i get this message:

 

1146 - Table 'danzhe1_hi.TABLE_ADDITIONAL_IMAGES' doesn't exist

 

SELECT additional_images_id, medium_images, popup_images, thumb_images, images_description FROM TABLE_ADDITIONAL_IMAGES where products_id = '53'

 

danzhe1_hi is mysql,and i'm pretty sure table_additional_images is there...

 

how am i supposed to fix this error? I searched through the forum, people posted about editing product_info.php; if u did that, how did you do it exactly? Thank you very much! and sorry to be a hassle

This time you are missing the changes to the /catalog/includes/database_tables.php and/or /catalog/admin/includes/database_tables.php

 

you should go through all the AI files and make sure each one has been correctly uploaded.

 

also make sure you have run the database setup wizard as the install directions asks.

Edited by surfalot
Link to comment
Share on other sites

the item and item description is off to to the right side :/

 

i tried going into product.info and changed alignment to left from center... and it didn't do anything.

 

http://omgitsdk.freehostia.com/catalog/pro...r7bfaqbi75fkri2

 

looks like you have a table structure problem. Might try restoring and trying the merge again. Make sure the table structure is nested correctly when you are finished.

Link to comment
Share on other sites

Hello people. I succeed to get Additional images and lightbox effect together. Because I guess that many will be interested in this, here is the way I did.

 

The solution comes from steve_tester's post 1019 and Job's post 1036, so all thanks goes to them. I didn't invented anything new, its all based on this 2 previous posts of this forum.

 

I'm just reposting to have it all at one place

 

1) I'm using AI version 2.1.0 on a RC2A installation

2) I installed the "Fancy lightbox popup" contribution

3) In file product_info.php i did following

 

before

} else {
?><script language="javascript"><!--
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
}

after

} else { // added lightbox 18 7 09
?>

			<script language="javascript"><!--
document.write('<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image_pop']) . '"target="_blank" rel="lightbox[group]"  title="'. $product_info['products_name'].'" >' . 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" rel="lightbox[group]" title="'.$product_info['products_name'].'">' . 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
}

 

4) In file includes/classes/displayimages.php i did following

 

before

d

ocument.write(\'<a href="' . (!$this->onpagemenu ? 'java script: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>\');
			//--></script><noscript>
			  <a href="' . tep_href_link(DIR_WS_IMAGES . $addimages_images[$item]['popimage']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $addimages_images[$item]['image'], $addimages_images[$item]['desc'], $addimages_image_width, $addimages_image_height, 'hspace="5" vspace="5"') . '<br>' . (!empty($addimages_images[$item]['desc'])?$addimages_images[$item]['desc']:TEXT_CLICK_TO_ENLARGE) . '</a>
			  </noscript></td>'."\n";

 

after

document.write(\'<a href="images/' . $addimages_images[$item]['image'] . '"target="_blank" rel="lightbox[group]" title="' . addslashes($addimages_images[$item]['desc']) .'">' . 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"'). '</a>\');
			//--></script><noscript>
			  <a href="' . tep_href_link(DIR_WS_IMAGES . $addimages_images[$item]['popimage']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $addimages_images[$item]['image'], $addimages_images[$item]['desc'], $addimages_image_width, $addimages_image_height, 'hspace="5" vspace="5"') . '<br>' . (!empty($addimages_images[$item]['desc'])?$addimages_images[$item]['desc']:TEXT_CLICK_TO_ENLARGE) . '</a>
			  </noscript></td>'."\n";

 

 

You can see the result here

 

But there is still one issue:

 

If somebody clicks on the first product image, he is getting a lightbox pop up in the big size (for me 400x400). When clicking on "next" or when clicking on one of the additional images the lightbox popup displays the medium image (for me 200x200) that is on the product info page.

 

I guess hat something is going on with the "grouping" of the images or I don't know. I'll keep playing around (i need to say that my php level is somewhere around 0) and will post if I find someting.

 

It would be great if somebody could help to work this out, I think many people here are interested

Edited by multimixer
Link to comment
Share on other sites

But there is still one issue:

 

If somebody clicks on the first product image, he is getting a lightbox pop up in the big size (for me 400x400). When clicking on "next" or when clicking on one of the additional images the lightbox popup displays the medium image (for me 200x200) that is on the product info page.

 

Ok people, issue solved

 

In file includes/classes/displayimages.php do NOT follow what stated above, but do following:

 

original lines

$this->groupout .= '
		  <td align="center" class="smallText"><script language="javascript"><!--
			document.write(\'<a href="' . (!$this->onpagemenu ? 'java script: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>\');
			//--></script><noscript>
			  <a href="' . tep_href_link(DIR_WS_IMAGES . $addimages_images[$item]['popimage']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $addimages_images[$item]['image'], $addimages_images[$item]['desc'], $addimages_image_width, $addimages_image_height, 'hspace="5" vspace="5"') . '<br>' . (!empty($addimages_images[$item]['desc'])?$addimages_images[$item]['desc']:TEXT_CLICK_TO_ENLARGE) . '</a>
			  </noscript></td>'."\n";

 

new lines

// lightbox modification 18 7 09
	  $this->groupout .= ' 
		  <td align="center" class="smallText"><script language="javascript"><!-- 
			document.write(\'<a href="images/' . $addimages_images[$item]['popimage'] . '"target="_blank" rel="lightbox[group]" title="' . addslashes($addimages_images[$item]['desc']) .'">' . 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"'). '</a>\');
			//--></script><noscript>
			  <a href="' . tep_href_link(DIR_WS_IMAGES . $addimages_images[$item]['popimage']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $addimages_images[$item]['image'], $addimages_images[$item]['desc'], $addimages_image_width, $addimages_image_height, 'hspace="5" vspace="5"') . '<br>' . (!empty($addimages_images[$item]['desc'])?$addimages_images[$item]['desc']:TEXT_CLICK_TO_ENLARGE) . '</a>
			  </noscript></td>'."\n";

 

The point was to link to the "popimage" instead of "image"

 

So, everything is perfect now, AI work very well wit lightbox effect and I'm very happy about. It's very easy to do, I mean If I succeed to do, then each one who is just a step above 0 in his php level will do it in seconds.

 

I hope this posts here help somebody

Link to comment
Share on other sites

  • 2 weeks later...

Hello, I have the same ploblem like darkxxkiller, can you help us with the tables? I don't know anything about programation, and I need the image in the middle, I cand send you my template, if you need it . I don't know how I can change the image, :( please help me!

Link to comment
Share on other sites

Hello, I have the same ploblem like darkxxkiller, can you help us with the tables? I don't know anything about programation, and I need the image in the middle, I cand send you my template, if you need it . I don't know how I can change the image, :( please help me!

I can only offer advice. The actual work is up to you. If you are using a template site, this will be more difficult since the comparison files are based the the standard osCommerce source.

Link to comment
Share on other sites

Hello people

 

I just uploaded a new version of lightbox for additional images. All listing and display option of AI remain untuched. You can switch light box on or off from your admin panel.

 

You can find it here ---> lightbox for additional images

 

An other version for sts users (like me) that will include Additional images into the content pages of sts and lightbox ofcourse will follow soon, I'm just doing some last polishing to the tags. If you use sts be patient for 1 day or 2.

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