Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Additional Images Module


Parikesit

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

Link to comment
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..

Link to comment
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

Link to comment
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

Link to comment
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

Link to comment
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

Link to comment
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

Link to comment
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

Link to comment
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

Link to comment
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.

Link to comment
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

Link to comment
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

Link to comment
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

Link to comment
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]

Link to comment
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

Link to comment
Share on other sites

  • 2 weeks later...

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

Link to comment
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

Link to comment
Share on other sites

  • 3 weeks later...

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://www.oscommerce.com/forums/viewtopic.php?t=41447

 

 

Regard's

zaenal

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