Jump to content
Sign in to follow this  
Parikesit

[Contribution] Additional Images Module

Recommended Posts

Hello,

 

Ok i'm in trouble!

 

I installed the mod, no error, everything is well described so it went great.

 

no error when i add image or delete images.

images are in the folder

images are in the database, and gone when i delete

 

BUT NO IMAGES ARE DISPLAYED

 

What do I miss? where did i messed up?

 

Thank you for your help!

Share this post


Link to post
Share on other sites

It sound like you miss the "global_osc1.

 

Please check again, maybe you miss something when adding/pasting the changes to categories.php.

 

 

.... then i get this error

 

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

 

insert into TABLE_ADDITIONAL_IMAGES (products_id, images_description, medium_images, popup_images) values ('105', '', '', '')

 

[TEP STOP]

 

Any help in this matter would be greatly appreciated.

Share this post


Link to post
Share on other sites

Hi All,

 

For a while I have leave this contribution also the discussion regarding to my other works. Now I have several days to spent and I plan to update or upgrade this contribution.

 

I hope the new version can be download next week.

Share this post


Link to post
Share on other sites

tbh the installation was a doddle where i get a little confused is as to what php scripts to edit/change and what to change in them. As the instructions for editing the php files is very vauge.

Share this post


Link to post
Share on other sites

Is there a way to make it work with the Attribute sorter and Copier with weight by Linda?I think both contributions are very handy and helpful but i can't make them work togheter,the admin of the multiple images disappear when installing the Attribute addon.I know the Shoppe contribution is out but it's a "full" and big package with lots of features i want to avoid for my personal needs,

Thx everyone

Freeman :oops:


Advice on forum are Free, Email or Pm to fix your site is work...which I charge for :)

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

Share this post


Link to post
Share on other sites

I have recently purchase OSC-Nuke and so far I really like it but it is really lacking in the imaging department. I found this thread and I'm wondering if this contribution would work with OSC-Nuke.

Share this post


Link to post
Share on other sites

Nice contribution. I installed it and it seemed to be working smoothly until I was messing around with payment modules (of all things). When I went to disable credit card payments and hit the update button, I got the following error:

Warning: Cannot modify header information - headers already sent by (output started at /sites/cborgman/public_html/perfectpregnancykit/catalog/admin/includes/functions/general.php:1315) in /sites/cborgman/public_html/perfectpregnancykit/catalog/admin/includes/functions/general.php on line 18
It appears as though this is related to the change in general.php from this contribution because when I restore the file from my backup, the error goes away. Every time I try to reapply the change to general.php, the error message comes back.

Share this post


Link to post
Share on other sites

Hi there,

 

Great contribution, though it cause me big trouble during installation. I fixed it all, and now it's running perfectly!

 

I miss the possibility to see the additional pictures in the admin view, I only get the main picture. Is it my installation that lacks this or is it the contribution?

 

If it is the contribution, this would be my request for a new version.

Share this post


Link to post
Share on other sites
Hi there,

 

Great contribution, though it cause me big trouble during installation. I fixed it all, and now it's running perfectly!

 

I miss the possibility to see the additional pictures in the admin view, I only get the main picture. Is it my installation that lacks this or is it the contribution?

 

If it is the contribution, this would be my request for a new version.

Share this post


Link to post
Share on other sites

I know this forum has been dead for awhile, but I installed this contribution along with many many others and now this one is suddently giving me trouble when trying to add an additional image, the error messages i get are:

 

Warning: copy(/home/ttoomey/plaksmacker.com/catalog/images/imprint_available.jpg): failed to open stream: Permission denied in /home/ttoomey/plaksmacker.com/catalog/ctadmin/categories.php on line 295

 

Warning: Cannot modify header information - headers already sent by (output started at /home/ttoomey/plaksmacker.com/catalog/ctadmin/categories.php:295) in /home/ttoomey/plaksmacker.com/catalog/ctadmin/includes/functions/general.php on line 18

 

 

on line 18 of the general.php all it has is:

 

header('Location: ' . $url);

 

and as far as I can see there are no spaces or anything causing the header to go off on line 295, here is what is around line 295 on the categories page:

 

      case 'add_images':

       $additional_images_id = tep_db_prepare_input($HTTP_POST_VARS['additional_images_id']);

       $back_page = $HTTP_GET_VARS['pID'];

       

       $sql_data_array = array('products_id' => tep_db_prepare_input($HTTP_POST_VARS['products_id']),

                               'images_description' => tep_db_prepare_input($HTTP_POST_VARS['images_description']),

                               'medium_images' => (($HTTP_POST_VARS['medium_images'] == 'none') ? '' : tep_db_prepare_input($HTTP_POST_VARS['medium_images'])),

                               'popup_images' => (($HTTP_POST_VARS['popup_images'] == 'none') ? '' : tep_db_prepare_input($HTTP_POST_VARS['popup_images'])));

       

       tep_db_perform(TABLE_ADDITIONAL_IMAGES, $sql_data_array);     

       $additional_images_id = tep_db_insert_id();

       

       if ( ($medium_images != 'none') && ($medium_images != '') ) {

         tep_db_query("update " . TABLE_ADDITIONAL_IMAGES . " set medium_images = '" . $medium_images_name . "' where additional_images_id = '" . tep_db_input($additional_images_id) . "'");

         $image_location = DIR_FS_CATALOG_IMAGES . $medium_images_name;

         copy($medium_images, $image_location);

       }

       

       if ( ($popup_images != 'none') && ($popup_images != '') ) {

         tep_db_query("update " . TABLE_ADDITIONAL_IMAGES . " set popup_images = '" . $popup_images_name . "' where additional_images_id = '" . tep_db_input($additional_images_id) . "'");

         $image_location = DIR_FS_CATALOG_IMAGES . $popup_images_name;

         copy($popup_images, $image_location);

       } else {

         tep_db_query("update " . TABLE_ADDITIONAL_IMAGES . " set popup_images = '" . $medium_images_name . "' where additional_images_id = '" . tep_db_input($additional_images_id) . "'");        

       }

       

       tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath));

       break;

     case 'del_images':

       $additional_images_id = tep_db_prepare_input($HTTP_GET_VARS['pID']);

       

       if ( ($HTTP_POST_VARS['products_id']) && (is_array($HTTP_POST_VARS['additional_images_id'])) ) {

         $product_id = tep_db_prepare_input($HTTP_POST_VARS['products_id']);

         $additional_images_id = $HTTP_POST_VARS['additional_images_id'];



         for ($i=0; $i<sizeof($additional_images_id); $i++) {

           tep_db_query("delete from " . TABLE_ADDITIONAL_IMAGES . " where additional_images_id = '" . tep_db_input($additional_images_id[$i]) . "'");

         }

       }

       //tep_db_query("delete from " . TABLE_ADDITIONAL_IMAGES . " where additional_images_id = '" . $HTTP_POST_VARS['additional_images_id'] . "'");

       tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products_id));

       break;

 

copy($popup_images, $image_location);

 

that is line 295 and that is copied directly from the contribution file. Does anyone know what would cause this error message?


Assault

If you want to find it you'll have to google "Assault T-Shirts" because posting my damn url in my signature is against the forum rules.

T-Shirts with an edge

Powered by OSCommerce + about 20 different custom addons and some Wordpress

Share this post


Link to post
Share on other sites

well shit, sure enough as soon as I type all that out I figure out what the problem is, that img already existed causing that error.

 

:)


Assault

If you want to find it you'll have to google "Assault T-Shirts" because posting my damn url in my signature is against the forum rules.

T-Shirts with an edge

Powered by OSCommerce + about 20 different custom addons and some Wordpress

Share this post


Link to post
Share on other sites

:( after installing additional images, you will notice that when you click on more than one image, the popup does not pop up.

 

so to make it behave like the default single image popup , i.e. pop up when you click the image do this :

 

catalog/popup_add_image.php

 

search for this : beginning around line 26 :

 

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

var i=0;

function resize() {

if (navigator.appName == 'Netscape') i=40;

if (document.images[0]) window.resizeTo(document.images[0].width +30, document.images[0].height+60-i);

}

//--></script>

 

 

and replace with this :

 

 

 

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

var i=0;

function resize() {

if (navigator.appName == 'Netscape') i=40;

if (document.images[0]) window.resizeTo(document.images[0].width +30, document.images[0].height+60-i);

self.focus();

}

//--></script>

 

 

the difference is - self.focus(); - which tells the pop to - pop up !

 

 

and that should fix it ! :)

Share this post


Link to post
Share on other sites

Has anyone had any success with 2.2 and this contribution. I am looking at a box with little dot in it where the main image is and there are not any additional images. Not really what the contribution suggests.

 

I did notice something in the code that has me concerned. In the popup_image.php file it calls for editing

 

$products_values['products_image']

 

However, in the 2.2 release it lists

 

$products['products_image']

 

I did remove the _values and still nothing.

 

Well....bummer, so how can one get this to work?


Never pet a burning dog.

Share this post


Link to post
Share on other sites

hallo, after installing "additional images 1b (the last release) in oscommerce milestone 2.2ms2 when i click on "catalog" this error message appear and i can't insert or modify articles:

 

Fatal error: Call to undefined function: tep_array_merge() in /usr/www/htdocs/theurlofmysite.uu/catalog/admin/categories.php on line 711

 

Please help!

 

 

Thanks :(

Share this post


Link to post
Share on other sites

this is great... i got it installed and it runs very smoothly...

 

i did run into this error on the popup_add_image.php

 

remove_current_page()

 

then i saw this command in popup_add_image.php

 

$navigation->remove_current_page();

 

and i comment it out and it works...

 

can anyone tell me if this function is relevant?

 

thanx in advance

 

justin

Share this post


Link to post
Share on other sites

I got this working on 2.2ms2 with a few changes to the contribution (noted below).

 

admin/categories.php

2. change si($additional to sizeof($additional

3. change tep_db_query("de from...to tep_db_query("delete

4. I had to change permissions on the images file (you may not have to). Change perms as follows (UNIX)

chmod 644 button_images_*.gif

 

catalog/popup_image.php

$products_values should be $products (see below)

should be...

<?php echo tep_image(DIR_WS_IMAGES . $products['products_image'], $products['products_name'], POPUP_IMAGE_WID

TH, POPUP_IMAGE_HEIGHT); ?>


-Fred

Share this post


Link to post
Share on other sites

I have just started to install this hack, and I am at a loss. First, none of the images downloaded in the zip file, so I am working blind there.

 

In the directions for editing the catalog/product_info.php file is this:

 

2. Add the following lines (see the example!):

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

<tr>

<td>

<?php require(DIR_WS_MODULES . FILENAME_ADDITIONAL_IMAGES); ?>

</td>

</tr>

 

There is no example! Can someone tell me where to add this code?

 

Thanks

Cindyd

Share this post


Link to post
Share on other sites
There is no example!  Can someone tell me where to add this code?

 

That means you are supposed to compare it with the product_info.php that is in the same folder as product_info_changes. Use the search function.

 

With me it's working fine.

Make sure you add a comment to every change you make.

 

Cheers

Manfred

Share this post


Link to post
Share on other sites

Thanks to fredfillah, I was able to correct some bugs for my MS2 version. But. It still doesn't work at my webshop. There are two problems:

 

1. The pictures I had allready attatched to products appear twice now. The upper one is a bit rescaled. Should I delete the image that is attatched to the product before installing this contribution?

 

2. I can't add images. There are no errors, but if I push the 'add image' button, the 'Image description', 'new image' and 'popup image' form comes up, but if I enter the information and click 'save' nothing happens and I just am redirected to the normal Categories / Products page. Also no green bar appears at the top with 'image uploaded' or so, although I don't know if to expect this.

 

Could somebody help me? Thank you very much.

Share this post


Link to post
Share on other sites

I installed it already and it works great, thanks for your great contribution.

 

I just have a problem while attempting to delete and image from Admin, the error shows like this:

 

Fatal error: Call to undefined function: si() in /home/tecnofil/public_html/wham/admin/categories.php on line 318

 

Can you help me out here please. I'm a newbie in all this

 

Thanks

 

Ed

Share this post


Link to post
Share on other sites

Never mind - I found it too

 

it was a typo in the code

(I just copied and pasted it...)

 

si() should be: sizeof()

 

and the mysql query has typo's too... It should read:

 

tep_db_query("delete from " . TABLE_ADDITIONAL_IMAGES . " where additional_images_id = '" . tep_db_input($additional_images_id[$i]) . "'");

 

not: tep_db_query("te ...

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  

×