Jump to content
Sign in to follow this  
Parikesit

[Contribution] Additional Images Module

Recommended Posts

you either missed changes in catalog\admin\includes\filenames.php or it didn't get uploaded for some reason.

 

 

It was true, it was a mistake. But know it said:

Warning: require_once(languages/espanol/additional_images_configure.php) [function.require-once]: failed to open stream: No such file or directory in /home/glamypassi/domains/glamypassion.com/public_html/admin/includes/additional_images_configure.php on line 27

 

Fatal error: require_once() [function.require]: Failed opening required 'languages/espanol/additional_images_configure.php' (include_path='.:/usr/local/lib/php') in /home/glamypassi/domains/glamypassion.com/public_html/admin/includes/additional_images_configure.php on line 27

 

 

any ideas?

Share this post


Link to post
Share on other sites

In this case, you didn't install the english language file changes to the language you are using in your admin. Whenever you install a contribution, it is up to you to make sure all language files that are included have been installed in each of the languages you use in your shop.

/admin/includes/languages/english/ <-copy AI files to other languages

/admin/includes/languages/english.php <-also add changes to other language files

Share this post


Link to post
Share on other sites
In this case, you didn't install the english language file changes to the language you are using in your admin. Whenever you install a contribution, it is up to you to make sure all language files that are included have been installed in each of the languages you use in your shop.

/admin/includes/languages/english/ <-copy AI files to other languages

/admin/includes/languages/english.php <-also add changes to other language files

 

 

Thank you!!

Share this post


Link to post
Share on other sites

Hi,

 

I'm struggling to get this module working the way I require. Basically I need the 'small' thumbnails to have a width of 150px, with the height been calculated in proportion.

 

In the Images configuration, I have the MAX WIDTH set to 150 and the MAX HEIGHT blank. Yet when I generate a thumbnail, it seems to be using 150px as the height and calculating the width in proportion?

 

For images that are wider than they are tall e.g. 800x500px, the thumbnail is generated at 150px width. But for tall thin images, the height is generated at 150px rather than the width.

 

Anyone have any advice?

 

Thank you.

Share this post


Link to post
Share on other sites
Hi,

 

I'm struggling to get this module working the way I require. Basically I need the 'small' thumbnails to have a width of 150px, with the height been calculated in proportion.

 

In the Images configuration, I have the MAX WIDTH set to 150 and the MAX HEIGHT blank. Yet when I generate a thumbnail, it seems to be using 150px as the height and calculating the width in proportion?

 

For images that are wider than they are tall e.g. 800x500px, the thumbnail is generated at 150px width. But for tall thin images, the height is generated at 150px rather than the width.

 

Anyone have any advice?

 

Thank you.

 

That is how it is coded. If the one of the width or height is blank, AI will use the non-blank value for both and proportionally size the image to fit.

 

It really make the shop look crappy with images that fit within 150x150 and other images that don't. I know it's not always possible, but the best look for the shop is to use all images with a reasonably same aspect ratio.

 

if you wish, you can remove that functionality in /admin/includes/classes/alterimage.php

 

		if (empty($maxheight)) { $maxheight = (!empty($maxwidth) ? $maxwidth : $this->src_height); }
	if (empty($maxwidth)) { $maxwidth = (!empty($maxheight) ? $maxheight : $this->src_width); }

Share this post


Link to post
Share on other sites

the alternate option is to use a very large value for the height so that AI will not shrink that dimension.

Edited by surfalot

Share this post


Link to post
Share on other sites

Thank you both for your help.

 

I chose to edit the code. It seems to be working the way I require now.

 

The images that the client uses vary in ratio. Although, the images belonging to the same category tend to be of the same ratio, so it doesn't look too bad.

 

Thank you again.

Share this post


Link to post
Share on other sites
Thank you in advance to anyone who can change popup_add_image.php from Additional Images V2.1 to enable the additional images to open with lightbox

Regards

Steve

 

Found a solution:

 

In includes/classes/display_images.php:

 

replace:

 

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

 

with

 

  <script language="javascript"><!--
			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>

 

 

In product_info.php use

 

<script language="javascript"><!--
document.write('<?php echo '<a href="images/' . $product_info['products_image'] . '"target="_blank" rel="lightbox[group]" title="' . $product_info['products_name'] . '">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');
//--></script>

 

The

 rel="lightbox[group]"

differs. All images will now show in the lightbox-popup (image 1 of........etc)

Share this post


Link to post
Share on other sites

Hi guys,

I am really new to osCommerce. I have bought a template from Template Monster, installed osCommerce and so far so good.

 

I then attempted to install the Additional Images module.

 

But when i attempt to make changes to products i get problems. I noticed that in the Files To Compare part of the installation, my product_info.php file seemed very different from the one in the download. I assume that this is very different because i am using a template from Template Monster??

 

I have used Drupal in past and had assumed that osCommerce modules would be as easy to install (ie. download and click install) but i guess i was naive.

 

Is it possible to install the Additional Images module onto a osCommerce template?

 

 

Many thanks in advance,

Sean

Share this post


Link to post
Share on other sites

certainly it is possible. You would need to be a little more astute with PHP. Unfortunately osCommerce has not had the same kind of focused development that a drupal or wordpress application has. So yes, most the contributions are "modifications" rather then actual modules. there are some notable exceptions such as the better shipping and payment modules and my specials module.

 

Unfortunately the "templates" out there are not templates at all, but again, modifications. Many of the templates you will find with template monster are serious hacks of the code and adding some contributions can be a chore.

 

The easiest way that I have found to merge files is to use Beyond Compare software. It makes it real easy to visualize the place the code is suppose to go. With my contributions, ALL the changes you need to make is between the "// BOF Additional Images" and the "// EOF Additional Images" tags within the files. Hope that helps.

Edited by surfalot

Share this post


Link to post
Share on other sites

Thanks Todd - really appreciate the info.

 

I was using WinDiff to look for differences and manually picking out the line with BOF and EOF, which seemed ok for the most part, until i got to product_info.php.

 

The Template Monster product_info.php seems to be more CSS based, with DIVs etc, whereas the product_info.php in the download has more table references, like TD, TR etc. I tried to make changes to the file where i thought the changes should go but it was confusing due to the differences and the fact that i'm a PHP novice.

 

I am now getting this error when i try to Edit a product:

 

Fatal error: Cannot instantiate non-existent class: upload_quiet in /homepages/32/d127390759/htdocs/essencshop/admin/includes/functions/additional_images.php on line 224

 

Is this related to product_info.php or does this mean i've messed up on one of the other manual updates?

Share this post


Link to post
Share on other sites
I am now getting this error when i try to Edit a product:

 

Fatal error: Cannot instantiate non-existent class: upload_quiet in /homepages/32/d127390759/htdocs/essencshop/admin/includes/functions/additional_images.php on line 224

sounds to me like you missed the changes to this file (or they didn't upload)

catalog/admin/includes/classes/upload.php

Share this post


Link to post
Share on other sites
Thanks Todd - really appreciate the info.

 

I was using WinDiff to look for differences and manually picking out the line with BOF and EOF, which seemed ok for the most part, until i got to product_info.php.

 

The Template Monster product_info.php seems to be more CSS based, with DIVs etc, whereas the product_info.php in the download has more table references, like TD, TR etc. I tried to make changes to the file where i thought the changes should go but it was confusing due to the differences and the fact that i'm a PHP novice.

 

I am now getting this error when i try to Edit a product:

 

Fatal error: Cannot instantiate non-existent class: upload_quiet in /homepages/32/d127390759/htdocs/essencshop/admin/includes/functions/additional_images.php on line 224

 

Is this related to product_info.php or does this mean i've messed up on one of the other manual updates?

 

Thanks Todd - you were totally right - had missed a function.

Really appreciate your help.

 

I am still having a problem with displaying the products correctly (i'm now getting "BOF: Additional Images" etc appearing_:

http://s127390785.websitehome.co.uk/essenc...;products_id=80

 

Is this the product_info.php file?

If so, is there anything i should look for? I'm hoping that the template's file can actually be modified to work with your great addon.

Share this post


Link to post
Share on other sites
Thanks Todd - you were totally right - had missed a function.

Really appreciate your help.

 

I am still having a problem with displaying the products correctly (i'm now getting "BOF: Additional Images" etc appearing_:

http://s127390785.websitehome.co.uk/essenc...;products_id=80

 

Is this the product_info.php file?

If so, is there anything i should look for? I'm hoping that the template's file can actually be modified to work with your great addon.

this section of code that you are seeing on the page is missplaced. this is php code and needs to be placed in an area within the php code. you currently have it in an html area. php code areas start with <?php and end with ?>

// BOF: Additional Images
if (ADDIMAGES_TABLE_LOCATION=='above' && ADDIMAGES_SHOW_ON_PRODUCT_INFO=='true' && ADDIMAGES_MENU_LOCATION == 'popup') {
  echo $additional_images->altgroupoutput();
} else if (ADDIMAGES_TABLE._LOCATION=='sides' && ADDIMAGES_SHOW_ON_PRODUCT_INFO=='true' && ADDIMAGES_MENU_LOCATION == 'popup') {
  echo $additional_images->groupoutput();
}
// EOF: Additional Images

Share this post


Link to post
Share on other sites

Hi,

 

I just installed this great contribution and am having a bit of trouble with the images. I was able to add 2 extra images to a product, and they show fine on the product page (as thumbnails). See them here: http://www.sacred-jewelry.com/yogajewelry/...klace-p-28.html

 

Then I realized that all my products are showing this BIG image on the product pages, instead of the thumbnails. I added another image to another product, and it shows both pictures really BIG on the page. What am I doing wrong?

 

I set up the configuration so that the image sizes would be restricted, but it's not happening. :(

 

Also, is there a way to make this work with Lightbox?

 

My configuration for Additional Images:

 

Automatically create 3 image set true

Background color

Pre-fill upload dir w/ Category names true

Pre-fill starting with this sub-dir products

Use image size restrictions true

Product Info: Show Additional Images true

Product Info: Product Image Behavior popup

Product Info: Group parent with sub-images true

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 4

Popup: Show Thumbnail Menu true

Thumb Menu: Show parent image true

Thumb Menu: Use image size restrictions true

Thumb Menu: Table alignment right

Thumb Menu: Table location sides

Thumb Menu: Number of columns 1

Thumb Menu: Number of rows

 

Thanks!


I repeat myself when under stress, I repeat myself when under stress, I repeat myself...

 

--King Crimson (“Discipline”)

Share this post


Link to post
Share on other sites

One more thing... When I tried to erase one of the extra pictures, it didn't erase it, it's still there.

 

Please help!

Edited by jailaxmi

I repeat myself when under stress, I repeat myself when under stress, I repeat myself...

 

--King Crimson (“Discipline”)

Share this post


Link to post
Share on other sites
One more thing... When I tried to erase one of the extra pictures, it didn't erase it, it's still there.

 

Please help!

 

from the look of the site, it looks like you solved the problems.

Share this post


Link to post
Share on other sites

Hi, can't wait to be able to use this contribution.

 

Having an issue - I get this error...

 

 

Warning: require(includes/functions/additional_images.php) [function.require]: failed to open stream: No such file or directory in xxx/www/admin/categories.php on line 17

 

Warning: require(includes/functions/additional_images.php) [function.require]: failed to open stream: No such file or directory in xxx/www/admin/categories.php on line 17

 

Fatal error: require() [function.require]: Failed opening required 'includes/functions/additional_images.php' (include_path='.:/---:/clientdata/php/lib') in /xxx/admin/categories.php on line 17

 

 

 

Which I know means it's trying to find additional_images.php in the Catalog->Functions folder. Except there isn't one. Am I missing a file? Or do I need to change something in admin/categories.php?

Edited by jashelea

Share this post


Link to post
Share on other sites

You missed part of the error message. the script you are running is categories.php, that is in the admin folder.

 

so the file that is missing in your site is in /admin/includes/functions/. You will find that in the contribution package in the /1_files_to_upload/ folder.

Share this post


Link to post
Share on other sites
You missed part of the error message. the script you are running is categories.php, that is in the admin folder.

 

so the file that is missing in your site is in /admin/includes/functions/. You will find that in the contribution package in the /1_files_to_upload/ folder.

 

:blush: well thats embarrassing! Can you tell I'm new at this? lol

 

 

I'm having another issue but I don't know if its AI related... I'm trying to create a category and upload a category image, but I keep getting that frustrating box with the red cross. Did this addon change anything to do with that?

Share this post


Link to post
Share on other sites

*SIGH*

 

Another issue with this addon... I can't edit any products.

 

 

 

1146 - Table 'xxx.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 = '29'

 

 

 

The table does exist. I have this:

 

// BOF: Additional Images 
 define('TABLE_ADDITIONAL_IMAGES', 'additional_images'); //additional images
 // EOF: Additional Images

 

In my admin/includes/database_tables.php

 

and this:
 // BOF: Additional Images
 define('TABLE_ADDITIONAL_IMAGES', 'additional_images'); //additional Images
 // EOF: Additional Images

 

in my includes/database_files.php

 

 

 

 

And this is my Additional Images Configuration Utility

 

Checking Configuration Status

 

Your database is up to date.

 

 

Configuration Group "Additional Images" exists.

Checking for items...

Configuration Key "ADDITIONAL_IMAGES_AUTO_CREATE" exists.

Configuration Key "ADDITIONAL_IMAGES_BACKGROUND_COLOR" exists.

Configuration Key "ADDIMAGES_PREFILL_UPLOAD_DIRECTORY" exists.

Configuration Key "ADDIMAGES_PREFILL_INITIAL" exists.

Configuration Key "ADDIMAGES_RESTRICT_IMAGE_SIZE" exists.

Configuration Key "ADDIMAGES_SHOW_ON_PRODUCT_INFO" exists.

Configuration Key "ADDIMAGES_MENU_LOCATION" exists.

Configuration Key "ADDIMAGES_GROUP_WITH_PARENT" exists.

Configuration Key "ADDIMAGES_RESTRICT_PARENT" exists.

Configuration Key "ADDIMAGES_TABLE_ALIGNMENT" exists.

Configuration Key "ADDIMAGES_TABLE_LOCATION" exists.

Configuration Key "ADDIMAGES_NUMBER_OF_COLS" exists.

Configuration Key "ADDIMAGES_NUMBER_OF_ROWS" exists.

Configuration Key "ADDIMAGES_POPUP_SHOW_ON_POPUP" exists.

Configuration Key "ADDIMAGES_POPUP_GROUP_WITH_PARENT" exists.

Configuration Key "ADDIMAGES_POPUP_RESTRICT_IMAGE_SIZE" exists.

Configuration Key "ADDIMAGES_POPUP_TABLE_ALIGNMENT" exists.

Configuration Key "ADDIMAGES_POPUP_TABLE_LOCATION" exists.

Configuration Key "ADDIMAGES_POPUP_NUMBER_OF_COLS" exists.

Configuration Key "ADDIMAGES_POPUP_NUMBER_OF_ROWS" exists.

 

Configuration Group "Images" exists.

Checking for items...

Configuration Key "DISPLAY_IMAGE_WIDTH" exists.

Configuration Key "DISPLAY_IMAGE_HEIGHT" exists.

Configuration Key "POPUP_IMAGE_WIDTH" exists.

Configuration Key "POPUP_IMAGE_HEIGHT" exists.

 

Checking for Tables...

Table "additional_images" found.

 

Checking for Columns...

Column "products_image_med" found in Table "products".

Column "products_image_pop" found in Table "products".

Column "products_image_description" found in Table "products".

Column "thumb_images" found in Table "additional_images".

 

 

HELP! I can't edit any products. This addon is doing my head in.

 

 

 

 

I also get this error:

 

Additional Images Thumbnail Utility

 

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

 

select count(*) as total from products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id left join products_description pd on p.products_id = pd.products_id and pd.language_id = '1' join TABLE_ADDITIONAL_IMAGES ai on p.products_id = ai.products_id

 

[TEP STOP]

 

... when in Additional Images - Display All Images.

 

 

And this error:

 

Additional Images Thumbnail Utility

 

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

 

select count(*) as total from products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id left join products_description pd on p.products_id = pd.products_id and pd.language_id = '1' join TABLE_ADDITIONAL_IMAGES ai on p.products_id = ai.products_id where (ai.thumb_images IS NULL or ai.medium_images IS NULL or ai.popup_images IS NULL) and not (ai.thumb_images IS NULL and ai.medium_images IS NULL or ai.popup_images IS NULL)

 

[TEP STOP]

 

 

 

...when trying to display unprocessed product images.

Share this post


Link to post
Share on other sites
:blush: well thats embarrassing! Can you tell I'm new at this? lol

 

 

I'm having another issue but I don't know if its AI related... I'm trying to create a category and upload a category image, but I keep getting that frustrating box with the red cross. Did this addon change anything to do with that?

 

there was a bug in some versions of oscommerce that when saving the category info, and you had an existing image that was not being changed in the save, the category image will get blanked. But this contribution doesn't do anything to the category image.

 

having said that, if you didn't merge the files, but instead just copied over files from a newer version of oscommerce it can cause problems. In the same respect, if you merged changes that were not within the clearly marked and designated merge areas, you may have merged in something undesirable.

Share this post


Link to post
Share on other sites
*SIGH*

 

Another issue with this addon... I can't edit any products.

 

 

...when trying to display unprocessed product images.

 

make sure you have successfully uploaded those database_tables.php files.

Share this post


Link to post
Share on other sites

hello

 

I have installed the great contribution on my OSCOMMERCE.

 

but a little problem appears:

 

when I have to add a new product, in the Admin -> Categories / Products-> new product

There have only the "Thumb or Single Large Image:" option,

and have no both of "Product Info Image(Optional)" and "Popup Image(Optional)" options

 

 

how to make the two options appears while I have to add a new product.

 

thanks a lot.

 

JUN

Share this post


Link to post
Share on other sites
Additional Images Module (Version 1.0)

http://www.oscommerce.com/community/contributions,1032

 

Features:

- A real image module

- 'Unlimited' additional images for each product

- Popup image for each additionals

- Add/Delete additional images from Admin panel

- 3 sizes image

 

Send your comment to this forum

 

 

Enjoy,

Parikesit

 

:D

 

 

Hello to all

 

when i'm going to add categories in admin , i look this

 

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

1054 - Unknown column 'c.categories_featured' in 'field list'

 

select c.categories_id, cd.categories_name, c.categories_image, c.parent_id, c.sort_order, c.date_added, c.last_modified, c.categories_featured, c.categories_featured_until from categories c, categories_description cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id = '1' order by c.sort_order, cd.categories_name

 

[TEP STOP]

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

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  

×