Jump to content
Sign in to follow this  
Parikesit

[Contribution] Additional Images Module

Recommended Posts

Yes, it's correct, I think it's the My SQL setting problem, could you please give me some details on that? I'm not too familiar with it, but if you could provide m step to step on how to set it how, I reallly appreciate it.

Thank you again!

 

 

Ok, finishing editing.. this is the error I'm getting:

 

1054 - Unknown column 'products_id' in 'field list'

 

SELECT additional_images_id, products_id, images_description, medium_images, popup_images FROM additional_images WHERE products_id = '20'

 

[TEP STOP]

 

Thanks if anyone could help!

 

Please check this in catalog/includes/application_top.php:

 

//filename

   define('FILENAME_ADDITIONAL_IMAGES', 'additional_images.php');

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

   

//table    

   define('TABLE_ADDITIONAL_IMAGES', 'additional_images');

 

Do you have write the modification rightly?

 

 

zaenal

Share this post


Link to post
Share on other sites
i will try to do the gallery thing next weekend.. i will keep the community updated..  

 

cheers

emiliano

 

Emiliano, if you do to the gallery, try to do it like the link I have posted, it is very nice, simple do to from what is already in this beautiful contribution.

 

Salvo

 

PS: Once the gallery is ready, a box can be build called Gallery show..

creating a script that takes information from from the table additional images just like the link given by me above..

Share this post


Link to post
Share on other sites

I would not think the page load would be that bad. Seems to be the best solution available since programming would be handled from server side. Javascript solutions and flash would require something from client-side to work. And that would be a no-no.


"Use no way as way, have no limitation as limitation." - Bruce Lee

Share this post


Link to post
Share on other sites

ok we have the extra images instaled and working

one day working fine next day we then cant add main image to the product but the extra images is working fine if we then add an extra image it comes up as main image did we miss something please help

 

by the way cool add in make the site we are working on very cleen

 

yours thetrecker

Share this post


Link to post
Share on other sites

hi.. i think that the gallery is an easy thing to do.. in fact it is..

 

about the gallery you post.. is really nice, but why you want to show again the product description? i think that is really necesary a second table call aditional_images_description...

with a relation to adiotional_images multi language support it?s a must (image_description in aditional_iamges table it?s not the best solution)

 

so with this new table you could add a small amount of text to show next to the image..

 

i have a question.. should the gallery be in a popup? just asking..

 

cheers

emiliano

 

ps: the contribution worked great with newsdesk...


patagonia, argentina

Share this post


Link to post
Share on other sites
i have a question.. should the gallery be in a popup? just asking..

 

cheers

emiliano

 

ps: the contribution worked great with newsdesk...

 

Yes, I think that it should be popup because it one has lets say 4 additinal images, to swap them around is faster on the popup

 

Salvo

Share this post


Link to post
Share on other sites

I have those two problem?(I try to fix them but .... so help me. Thanks)

 

1.Admin part: Why I don't have medium part

1.gif

 

2.error part when I try to add images. Error as below

Warning: open_basedir restriction in effect. File is in wrong directory in /admin/categories.php on line 295

 

Warning: open_basedir restriction in effect. File is in wrong directory in /admin/categories.php on line 301

 

Warning: Cannot add header information - headers already sent by (output started at /admin/categories.php:295) in /admin/includes/functions/general.php on line 26

Share this post


Link to post
Share on other sites

Im getting the following error when i try to add new images

 

1064 - You have an error in your SQL syntax near ' )' at line 1

 

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

 

[TEP STOP]

 

im not quite sure what it could be and I dont know where to start looking. Any help will be much appriciated

Share this post


Link to post
Share on other sites
I have those two problem?(I try to fix them but .... so help me. Thanks)

 

1.Admin part: Why I don't have medium part

 

medium = display image

small = list image

popup = big image

Share this post


Link to post
Share on other sites

hm, it seems i still have some problems to get this sweet thingie working..

 

I?m using MS1 with quite some mods innit.

1.) image_check-v1.2

2.) image_chomod

3.) image_timestamp (Pics cannot be overwritten)

4.) thumbs3 (automatic thumbnail generation)

 

It doesnt give me any error. It just won?t display any picture in admin though, but it DOES display all neccessary fields etc to insert/delete a picture.

 

Does anyone know any reason why this might not work? Hints of any kind? I would really desperately need to get it working for our site...

 

Footnote: Just one thing i really didnt understand within the installation instructions:

 

In product_info_changes =>

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

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

     <tr>

       <td>

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

       </td>

     </tr>

 

Which example? Where do i have to add this?! Anyway, this does not have to do with the admin problem, so i?d like to get this fixed first.


phanthomas

counter:attack media solutions gmbh

Share this post


Link to post
Share on other sites
In product_info_changes =>
2. Add the following lines (see the example!):

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

<tr>

<td>

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

</td>

</tr>

 

Which example? Where do i have to add this?! Anyway, this does not have to do with the admin problem, so i?d like to get this fixed first.

 

The example is "product_info.php" file provided in this contribution :)

 

Parikesit

Share this post


Link to post
Share on other sites

yeap, thx! seems i?ve been a little dumb already yesterday.. :roll:


phanthomas

counter:attack media solutions gmbh

Share this post


Link to post
Share on other sites

Hi All,

 

Has anyone managed to do the popup gallery as mentioned before?

 

Thanks

 

Salvo

Share this post


Link to post
Share on other sites
Has anyone managed to do the popup gallery as mentioned before?

 

Hi Salvo,

This is the Champion League PRIMETIME :idea:

 

Sorry...

I'm currently develop Admin Level panel, and hope will finish in this week.

 

 

Cheers

zaenal

Share this post


Link to post
Share on other sites

So far things seem to be working ok...I'm even making progress on having the popup page include more info and the large picture and whatnot. But when I try to delete an imagine I am getting:

 

Fatal error: Call to undefined function: si() in /Volumes/Users/david/Sites/ShadmaOSC/admin/categories.php on line 318

 

       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<si($additional_images_id); $i++) {

            tep_db_query("te from " . TABLE_ADDITIONAL_IMAGES . " where additional_images_id = '" .

          }

        }

        //tep_db_query("de from " . TABLE_ADDITIONAL_IMAGES . " where additional_images_id = '" . $

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

        break;

 

line 318 is the for ($i=...

 

What am I missing?

 

Thanks!

David

Share this post


Link to post
Share on other sites

I *just* emailed him about this:

 

The code is missing characters all over the place. Here is the correct code.

 

      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;

 

As you can see, the sql statement, the tep_href_link, and the sizeof, were all missing characters. This occurs only in the categories_changes file, but is correct in the categories.php file provided with the contrib. I managed to guess that this was the case by guessing that "si" was a mistype for "sizeof", which lead me to this discovery.

 

-Matt Lewis

 

 

 

So far things seem to be working ok...I'm even making progress on having the popup page include more info and the large picture and whatnot. But when I try to delete an imagine I am getting:

 

Fatal error: Call to undefined function: si() in /Volumes/Users/david/Sites/ShadmaOSC/admin/categories.php on line 318

 

       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<si($additional_images_id); $i++) {

            tep_db_query("te from " . TABLE_ADDITIONAL_IMAGES . " where additional_images_id = '" .

          }

        }

        //tep_db_query("de from " . TABLE_ADDITIONAL_IMAGES . " where additional_images_id = '" . $

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

        break;

 

line 318 is the for ($i=...

 

What am I missing?

 

Thanks!

David

[/CODE][CODE]

Share this post


Link to post
Share on other sites

Hi here the miss typing de in:

tep_db_query("te from " . TABLE_ADDITIONAL_IMAGES  ...

It must be:

tep_db_query("delete from " . TABLE_ADDITIONAL_IMAGES ...

 

 

zaenal

Share this post


Link to post
Share on other sites

I still get this error after installing and looking at scripts till my eyes crossed. So can someone please help?

 

Fatal error: Cannot instantiate non-existent class: imagesbox in /home/sites/site39/web/catalog/includes/modules/additional_images.php on line 49

Share this post


Link to post
Share on other sites

This one too:

Warning: getimagesize: Read error! in /home/sites/site39/web/catalog/includes/functions/html_output.php on line 303

Share this post


Link to post
Share on other sites

I downloaded it, installed it per the directions, and it works perfectly! GREAT MOD!

 

I appreciate all the mods and tips, etc, posted by everyone. I only discovered osCommerce about a week or so ago, and am moving all my products from the old software (PayPal AntiFraud Portal) to osCommerce.

 

This software and all the people on these forums ROCKS!

 

Charlie :D

Share this post


Link to post
Share on other sites

Hello guys,

 

Sorry i'm not comming to this forum for a long time. I just finished another contribution: "Admin Account with Acces Level". You can see the discussion here:

 

http://forums.oscommerce.com/viewtopic.php?t=41447

 

 

Regard's

zaenal

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  

×