Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Additional Images Module


Parikesit

Recommended Posts

once more great contrie but i have still problems - now when i set

Configuration --> Additional Images : Product Info: Product Image Behavior to "product info"

i have no images displayed in the product_info.php - why ?

 

this is my thrid install of this contrie - this function "product info" already functioned in last install - but not now???

 

still have the problem with

Catalog --> Additional Images Thumbnail Utility - how does this works?

when i go to "Unprocessed Product Images" and klick by new images "Process" i still become an blank site

but no phperror or something

 

i have php 5 with all i need for this contrie.

 

thnx.s

Link to comment
Share on other sites

I have installed the contribution properly. It is working great.

Thanks a lot for such a needed peace of code.

Ash,

I think you may get something if you try to look in to your catalog/includes/application_top.php file and find the follwing line:

#catalog/includes/application_top.php

define('FILENAME_POPUP_ADD_IMAGE', 'popup_add_image.php');

needs to be

define('FILENAME_POPUP_IMAGE_ADD', 'popup_add_image.php');

please note, one says IMAGE_ADD, the other ADD_IMAGE.

good luck!

thanks again for the contribution.

 

 

I have a multiple language website. How do I modify it to work with the other languages, specifically Russian?

 

Thank you, :-"

 

Anya

Link to comment
Share on other sites

hi,

 

i have a problem, i just transfered my site from one domain to another, and i have adjusted all my config files accordinaly, but for some reason the additional images will not work, i can add pictures fine and they show up in the product listing, but when i click to enlarge the picture it just opens a popup window and directs it back to the websites home page.

 

an example can be seen here. http://www.stevegrace1.com/product_info.ph...products_id/115

 

please any help would be greatly appreciated.

Link to comment
Share on other sites

Can someone please help me.

 

I have successfully installed the contribution but when I enable "Use Search-Engine Safe URLs" as I always have, the popup does not work . Without this enabled the url for the popup is "catalog/popup_add_image.php?pID=310" and works. When I turn this function back on it becomes "catalog/popup_add_image.php/pID/310" and does not display the large image. Is there a small modification to make to the code to allow it to display the large image? this is a great contribution that works great but I have always had search engine safe URL's and get a lot of traffic through the internal pages of the website and need to keep this option on.

 

I am happy to make a Paypal donation to someone that can advise me on getting this working.

Link to comment
Share on other sites

Hi Everyone,

 

I am looking for a contribution which enable to add more than 1 picture gives me a choice of pictures to add min 1 max 4 .

There are two contributions but I need sugestion which one is better.

 

UltraPics - MS2 Image Addon Pack!

 

or

Additional Images Module

 

or if someone advise me for any other better.

 

Thanks

zee

Link to comment
Share on other sites

hi,

 

i have a problem, i just transfered my site from one domain to another, and i have adjusted all my config files accordinaly, but for some reason the additional images will not work, i can add pictures fine and they show up in the product listing, but when i click to enlarge the picture it just opens a popup window and directs it back to the websites home page.

 

an example can be seen here. http://www.stevegrace1.com/product_info.ph...products_id/115

 

please any help would be greatly appreciated.

don't see what you are talking about.

Link to comment
Share on other sites

I have a multiple language website. How do I modify it to work with the other languages, specifically Russian?

 

Thank you, :-"

 

Anya

 

you need to be more specific about the problem you are having. How does languages have anything to do with images?

Link to comment
Share on other sites

Can someone please help me.

 

I have successfully installed the contribution but when I enable "Use Search-Engine Safe URLs" as I always have, the popup does not work . Without this enabled the url for the popup is "catalog/popup_add_image.php?pID=310" and works. When I turn this function back on it becomes "catalog/popup_add_image.php/pID/310" and does not display the large image. Is there a small modification to make to the code to allow it to display the large image? this is a great contribution that works great but I have always had search engine safe URL's and get a lot of traffic through the internal pages of the website and need to keep this option on.

I am happy to make a Paypal donation to someone that can advise me on getting this working.

 

like those "still in development" items? :-" I would recommend using the SEO URLs contribution. AI works fine with that, does about the same thing, and has added benefits.

Edited by surfalot
Link to comment
Share on other sites

Hi,

 

well without any strugle I installed this contribution.

every thing is fine.

There is one file issue I need some advise on

 

includes/classes/boxes.php

I have sts module installed, when I leave this file as it is every thing works fine but when i meake changes it coms up with this warning

 

Parse error: syntax error, unexpected T_CLASS, expecting T_FUNCTION in C:\Program Files\xampp\htdocs\includes\classes\boxes.php on line 290

 

But when I leave includes/classes/boxes.php unchanged. nothing wrong happen means no error, and page works fine.

 

please advise me where and what should I edit in this file.

thanks and regards

zee

 

after doing a little searching, it appears that the change you are refering to is a leftover from the 1.1.5 version, and is no longer necessary.

Link to comment
Share on other sites

cannot see images in product_info.php

 

Hi there

Just installed the contribution and all works well in the admin section. However, none of the images are being displayed in the catalog product_info.php:

http://intangible.andrewbryson.com.au/cata...?products_id=28

 

This is pretty much a fresh install of osC, though I added a prefix to the MySQL table names and had to adjust the script in the additional_images_configure.php file.

 

I've tried searching through this forum for an answer, but is a little difficult to search for a specific problem like this.

 

Any help would be most appreciated!

 

Thanks,

Awbrys

Link to comment
Share on other sites

like those "still in development" items? :-" I would recommend using the SEO URLs contribution. AI works fine with that, does about the same thing, and has added benefits.

 

The problem I have there is that we have a lot of traffic coming into our website on the via urls such as http://www.ps-tools.com/catalog/product_in...roducts_id/1664.

 

How far away are you from completing the coding? My manager has authorised payment to get this working on our website, but unfortunately its a bit beyond me. Would you be interested? or know someone that is? I really like the script as it will free up my time of creating 3 images for each product (sm,med,lrg) as I do now, but also add additional images rather than html code it into the product. I have looked everywhere and this seems to be the best script for image handling that there is.

Link to comment
Share on other sites

The problem I have there is that we have a lot of traffic coming into our website on the via urls such as http://www.ps-tools.com/catalog/product_in...roducts_id/1664.

 

How far away are you from completing the coding? My manager has authorised payment to get this working on our website, but unfortunately its a bit beyond me. Would you be interested? or know someone that is? I really like the script as it will free up my time of creating 3 images for each product (sm,med,lrg) as I do now, but also add additional images rather than html code it into the product. I have looked everywhere and this seems to be the best script for image handling that there is.

you must have done some other patches to get that working. I can't get a stock shop to work fully with search engine safe urls enabled, plus I get an error at the bottom of very page.

ths issue appears to be with the handling in the application_top.php.

find

// set the HTTP GET parameters manually if search_engine_friendly_urls is enabled
 if (SEARCH_ENGINE_FRIENDLY_URLS == 'true') {
   if (strlen(getenv('PATH_INFO')) > 1) {
     $GET_array = array();
     $PHP_SELF = str_replace(getenv('PATH_INFO'), '', $PHP_SELF);
     $vars = explode('/', substr(getenv('PATH_INFO'), 1));
     for ($i=0, $n=sizeof($vars); $i<$n; $i++) {
       if (strpos($vars[$i], '[]')) {
         $GET_array[substr($vars[$i], 0, -2)][] = $vars[$i+1];
       } else {
         $HTTP_GET_VARS[$vars[$i]] = $vars[$i+1];
       }
       $i++;
     }

     if (sizeof($GET_array) > 0) {
       while (list($key, $value) = each($GET_array)) {
         $HTTP_GET_VARS[$key] = $value;
       }
     }
   }
 }

replace with

// set the HTTP GET parameters manually if search_engine_friendly_urls is enabled
 if (SEARCH_ENGINE_FRIENDLY_URLS == 'true') {
   if (strlen(getenv('PATH_INFO')) > 1) {
     $GET_array = array();
     $PHP_SELF = str_replace(getenv('PATH_INFO'), '', $PHP_SELF);
     $vars = explode('/', substr(getenv('PATH_INFO'), 1));
     for ($i=0, $n=sizeof($vars); $i<$n; $i++) {
       if (strpos($vars[$i], '[]')) {
         $GET_array[substr($vars[$i], 0, -2)][] = $vars[$i+1];
       } else {
         $HTTP_GET_VARS[$vars[$i]] = $vars[$i+1];
         $_GET[$vars[$i]] = $vars[$i+1];
       }
       $i++;
     }

     if (sizeof($GET_array) > 0) {
       while (list($key, $value) = each($GET_array)) {
         $HTTP_GET_VARS[$key] = $value;
	  $_GET[$key] = $value;
       }
     }
   }
 }

this may actually fix future issues with other contributions also. donation isn't necessary.

Link to comment
Share on other sites

do you guys know any solution to use the Tep_image function in a javascript call ?

i ve got to use tep_image because mine is customised to do diffrent operation on image before showing it

 

 <td align="center" class="smallText">
  <?php 
		   echo  "<a href=\"java script:popupWindow('" . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id'] . 'ℑ=3')  . "')\">" . tep_image(DIR_WS_IMAGES . $product_info['products_image_xl_1'], addslashes($product_info['products_name']),ADD_IMAGE_WIDTH, ADD_IMAGE_HEIGHT, "hspace='1' vspace='1'". " onMouseOut=\"java script:window.document.prodimg.src='" . DIR_WS_IMAGES . $product_info['products_image'] . "'\" onMouseOver=\"java script:window.document.prodimg.src='" . DIR_WS_IMAGES . $product_info['products_image_xl_1'] . "'\"") . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>';
		   ?>
		  </td>

 

 

this is this portion that i need to change in a way to use tep_image:

 

onMouseOut=\"java script:window.document.prodimg.src='" . DIR_WS_IMAGES . $product_info['products_image'] . "'\"

 

many thanks to the ones you got a solution :thumbsup:

MS2

Link to comment
Share on other sites

you must have done some other patches to get that working. I can't get a stock shop to work fully with search engine safe urls enabled, plus I get an error at the bottom of very page.

ths issue appears to be with the handling in the application_top.php.

find

// set the HTTP GET parameters manually if search_engine_friendly_urls is enabled
 if (SEARCH_ENGINE_FRIENDLY_URLS == 'true') {
   if (strlen(getenv('PATH_INFO')) > 1) {
     $GET_array = array();
     $PHP_SELF = str_replace(getenv('PATH_INFO'), '', $PHP_SELF);
     $vars = explode('/', substr(getenv('PATH_INFO'), 1));
     for ($i=0, $n=sizeof($vars); $i<$n; $i++) {
       if (strpos($vars[$i], '[]')) {
         $GET_array[substr($vars[$i], 0, -2)][] = $vars[$i+1];
       } else {
         $HTTP_GET_VARS[$vars[$i]] = $vars[$i+1];
       }
       $i++;
     }

     if (sizeof($GET_array) > 0) {
       while (list($key, $value) = each($GET_array)) {
         $HTTP_GET_VARS[$key] = $value;
       }
     }
   }
 }

replace with

// set the HTTP GET parameters manually if search_engine_friendly_urls is enabled
 if (SEARCH_ENGINE_FRIENDLY_URLS == 'true') {
   if (strlen(getenv('PATH_INFO')) > 1) {
     $GET_array = array();
     $PHP_SELF = str_replace(getenv('PATH_INFO'), '', $PHP_SELF);
     $vars = explode('/', substr(getenv('PATH_INFO'), 1));
     for ($i=0, $n=sizeof($vars); $i<$n; $i++) {
       if (strpos($vars[$i], '[]')) {
         $GET_array[substr($vars[$i], 0, -2)][] = $vars[$i+1];
       } else {
         $HTTP_GET_VARS[$vars[$i]] = $vars[$i+1];
         $_GET[$vars[$i]] = $vars[$i+1];
       }
       $i++;
     }

     if (sizeof($GET_array) > 0) {
       while (list($key, $value) = each($GET_array)) {
         $HTTP_GET_VARS[$key] = $value;
	  $_GET[$key] = $value;
       }
     }
   }
 }

this may actually fix future issues with other contributions also. donation isn't necessary.

 

Thank you so much. I have now got it all working. Not sure what patch as been working on the site for a couple of years. If you would like to look at any of the code that I am using let me know. :thumbsup:

Link to comment
Share on other sites

do you guys know any solution to use the Tep_image function in a javascript call ?

i ve got to use tep_image because mine is customised to do diffrent operation on image before showing it

 

 <td align="center" class="smallText">
	<?php 
			 echo  "<a href=\"java script:popupWindow('" . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id'] . 'ℑ=3')  . "')\">" . tep_image(DIR_WS_IMAGES . $product_info['products_image_xl_1'], addslashes($product_info['products_name']),ADD_IMAGE_WIDTH, ADD_IMAGE_HEIGHT, "hspace='1' vspace='1'". " onMouseOut=\"java script:window.document.prodimg.src='" . DIR_WS_IMAGES . $product_info['products_image'] . "'\" onMouseOver=\"java script:window.document.prodimg.src='" . DIR_WS_IMAGES . $product_info['products_image_xl_1'] . "'\"") . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>';
			 ?>
			</td>

 

 

this is this portion that i need to change in a way to use tep_image:

 

onMouseOut=\"java script:window.document.prodimg.src='" . DIR_WS_IMAGES . $product_info['products_image'] . "'\"

 

many thanks to the ones you got a solution :thumbsup:

there is no way to do that. the tep_image() function creates the entire IMG html tag. So simply substituting the tep_image() function for an image name in the middle of another tep_image() function would cause multiple embedded IMG tags.

 

You will have to incorporate the changes in your tep_image() function to this part of the AI code.

 

I designed AI, in part, to avoid making changes to the tep_image() function. Since relying on the changes to the tep_image() function as a catchall for all image processing creates headaches elsewhere when working with advanced javascript affects. Other contributions should do the same.

Edited by surfalot
Link to comment
Share on other sites

there is no way to do that. the tep_image() function creates the entire IMG html tag. So simply substituting the tep_image() function for an image name in the middle of another tep_image() function would cause multiple embedded IMG tags.

 

if the tep_image give a full link , then there is certainly a way to create a copy of this function that doesnt add all the url or path for this image,

as i told you in private image , im trying to use your contribution + some work done by image magic for various advanced reason, i hope that you don't think it s too much off topic

MS2

Link to comment
Share on other sites

Resolve: tep_catname_to_dir error

 

For everyone getting error: Call to undefined function: tep_catname_to_dir()

 

You must add following line to admin/includes/functions/general.php:

 

if ( !function_exists(tep_catname_to_dir) ) {
 function tep_catname_to_dir($catname) {
   return strtolower(str_replace(' ','-',preg_replace("/[^a-zA-Z0-9\s]/", "", $catname)));
 }
}

Link to comment
Share on other sites

i woud like to optimize the image size

 

now my image settings are:

 

Small Image Width = 100

Small Image Height = 100

 

thats okay for product listting images and the rest of images in the catalog

 

but how can i cange just the size of additional images thumbs to 60x60px

 

thnx.s

Link to comment
Share on other sites

In Configuration - Images

 

Small Image size is your Product Listing images.

 

Display Image size is your Product Info images

 

And obviously Popup Image size is the size of the large images displayed in your popup window

 

You cant just set the additional images unless you add some new code and database tables to define the aditional image thumbs.

 

i woud like to optimize the image size

 

now my image settings are:

 

Small Image Width = 100

Small Image Height = 100

 

thats okay for product listting images and the rest of images in the catalog

 

but how can i cange just the size of additional images thumbs to 60x60px

 

thnx.s

Link to comment
Share on other sites

Im having a little trouble with mine..

 

The contribution creates the folders in the images folder based on the category names etc under where the product is but instead of putting the images in there it just dumps them into the images folder root. Anyone know ehy it creates the corect folders but dosnt put the images in there?

 

Also when creating the images it dosn't resize my popup image, it just uses the origional image. Even though in my configuration - additional images in admin I have the following:

Automatically create 3 image set true

Use image size restrictions true

 

An in configuration - Images in admin I have the following:

Calculate Image Size true

Popup Image Width 300

Popup Image Height 300

 

Anyone know the reason behind my two problems.. ??

 

Any help would be much appreciated.

 

Cheers

Link to comment
Share on other sites

I just install additional images module v2.0.0 and have a problem with "Additional Images Thumbnail Utility". When i push "process" button, it's write:

Warning: imagecolortransparent(): supplied argument is not a valid Image resource in z:\home\localhost\www\admin\includes\classes\alterimage.php on line 465

Warning: imagegif(): supplied argument is not a valid Image resource in z:\home\localhost\www\admin\includes\classes\alterimage.php on line 389

Warning: chmod() [function.chmod]: No such file or directory in z:\home\localhost\www\admin\includes\classes\alterimage.php on line 392

Warning: Cannot modify header information - headers already sent by (output started at z:\home\localhost\www\admin\includes\classes\alterimage.php:465) in z:\home\localhost\www\admin\includes\functions\general.php on line 22

 

I set

var $debug = true;        // only fill messages array if debugging

in admin\includes\classes\alterimage.php line:98 and get :

Ошибка msg: starting create_srcImageResource() file: z:\home\localhost\www\admin\includes\classes\alterimage.php line: 216
msg: starting imageOutput() file: z:\home\localhost\www\admin\includes\classes\alterimage.php line: 373
msg: starting ApplyBackground() file: z:\home\localhost\www\admin\includes\classes\alterimage.php line: 415
msg: starting AlphaChannelFlatten() file: z:\home\localhost\www\admin\includes\classes\alterimage.php line: 445
msg: skipping AlphaChannelFlatten() because ($this->type_text == "gif") and ImageColorTransparent returned "" file: z:\home\localhost\www\admin\includes\classes\alterimage.php line: 520
Ошибка msg: starting create_srcImageResource() file: z:\home\localhost\www\admin\includes\classes\alterimage.php line: 216
msg: starting create_outImageResource() file: z:\home\localhost\www\admin\includes\classes\alterimage.php line: 244
msg: starting imageResizeNCopy() file: z:\home\localhost\www\admin\includes\classes\alterimage.php line: 274
msg: starting imageOutput() file: z:\home\localhost\www\admin\includes\classes\alterimage.php line: 373
msg: starting ApplyBackground() file: z:\home\localhost\www\admin\includes\classes\alterimage.php line: 415
msg: starting AlphaChannelFlatten() file: z:\home\localhost\www\admin\includes\classes\alterimage.php line: 445
msg: AlphaChannelFlatten() set image to 255+1 colors with transparency for GIF output file: admin\includes\classes\alterimage.php line: 510

 

First of all, i think about gd version, but php_info() and var_dump($this->gd_version()) in alterimage constructor show me 2. After that i try to add image by "add image" button in categories and successfully do it...

 

 

What it can be????

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