Guest Posted September 8, 2003 Share Posted September 8, 2003 Hi there Just wanna say thanx for this great contrib, installed on MS2 and worked first time. :) Just a question though. Instead of the additional images being horizontal as htey are now, how would one get them to display verticlly under the main image ? Thanx heaps :) Quote Link to comment Share on other sites More sharing options...
Guest Posted September 8, 2003 Share Posted September 8, 2003 Hi again, I got it to go verticlly change this in additional_images.php $col ++; if ($col > 2) { $col = 0; $row ++; to this $row ++; if ($row > 2) { $col ++; $row = 0; After that its just a matter of changng the alignment by changng the "center" to what ever side you want it on, EG "right" Thanx heaps and it will display verticlly Quote Link to comment Share on other sites More sharing options...
Guest Posted September 9, 2003 Share Posted September 9, 2003 Hi tiz me again Ignore that last comment "After that its just a matter of changng the alignment by changng the "center" to what ever side you want it on, EG "right" " To do the alignment you need to move this line around to where you want it. <?php require(DIR_WS_MODULES . FILENAME_ADDITIONAL_IMAGES); ?> i placed it like this in my product_info.php around line 150 <script language="javascript"><!-- document.write('<?php echo '<a href="javascript:popupWindow('' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), DISPLAY_IMAGE_WIDTH, DISPLAY_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>'); //--></script> <noscript> <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], DISPLAY_IMAGE_WIDTH, DISPLAY_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?> </noscript><BR> <?php require(DIR_WS_MODULES . FILENAME_ADDITIONAL_IMAGES); ?> </td> </tr> </table> Hope i havent confused anyone Quote Link to comment Share on other sites More sharing options...
tobz Posted September 9, 2003 Author Share Posted September 9, 2003 Good to hear a few people are using this. Just to let you know, I have finally got around to updating the install instructions to remove the duplicate instructions it contained previously. I have just run through it step by step on a fresh MS2 install and it works perfectly :wink: Pixxi - nice little hack to show the description under the image :) Quote tobz osCommerce Links osCommerce Templates osCommerce UK <-- This site is for sale! Link to comment Share on other sites More sharing options...
Parikesit Posted September 9, 2003 Share Posted September 9, 2003 Base on last previous works, I make change to catalog/admin/categories.php (also .../english/categories.php). This main change apply due to "upload class" provided by MS2. It's also will check is "medium_images" field is empty or not. So, if you have last version of Toby works installed on your OsC and want to use "upload class", you only need modify catalog/admin/categories.php and adding some languages define to admin/includes/languages/english/categories.php; Otherwise, please disregards this update. I also add "KEY products_id (products_id)" to table "additional_images" Quote recent contributions: mySQLi extension for osc 2.X, OPI: advanced image handling (ajax, thumbnail, watermark, etc), and other contributions all here Link to comment Share on other sites More sharing options...
Parikesit Posted September 9, 2003 Share Posted September 9, 2003 Here the changes: case 'add_images': $products_id = $HTTP_GET_VARS['pID']; $add_images_error = true; if ($medium_images = new upload('medium_images', DIR_FS_CATALOG_IMAGES)) { $add_images_error = false; $sql_data_array = array('products_id' => tep_db_prepare_input($products_id), 'images_description' => tep_db_prepare_input($HTTP_POST_VARS['images_description']), 'medium_images' => tep_db_prepare_input($medium_images->filename)); if ($popup_images = new upload('popup_images', DIR_FS_CATALOG_IMAGES)) { $add_data_array = array('popup_images' => tep_db_prepare_input($popup_images->filename)); } else { $add_data_array = array('popup_images' => tep_db_prepare_input($medium_images->filename)); } $sql_data_array = array_merge($sql_data_array, $add_data_array); } if ($add_images_error == false) { tep_db_perform(TABLE_ADDITIONAL_IMAGES, $sql_data_array); } else { $messageStack->add_session(ERROR_ADDITIONAL_IMAGE_IS_EMPTY, 'error'); } tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products_id)); break; case 'del_images': $products_id = tep_db_prepare_input($HTTP_GET_VARS['pID']); if ( ($HTTP_GET_VARS['pID']) && (is_array($HTTP_POST_VARS['additional_images_id'])) ) { $additional_images_id[] = tep_db_prepare_input($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_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products_id)); break; case 'new_images': $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_NEW_IMAGES . '</b>'); $contents = array('form' => tep_draw_form('new_images', FILENAME_CATEGORIES, 'action=add_images&cPath=' . $cPath . '&pID=' . $HTTP_GET_VARS['pID'], 'post', 'enctype="multipart/form-data"')); $contents[] = array('text' => TEXT_NEW_IMAGES_INTRO); $contents[] = array('text' => '<br>' . TEXT_PRODUCTS_IMAGES_DESC . '<br>' . tep_draw_input_field('images_description')); $contents[] = array('text' => '<br>' . TEXT_PRODUCTS_IMAGES_NEW . '<br>' . tep_draw_file_field('medium_images')); $contents[] = array('text' => '<br>' . TEXT_PRODUCTS_IMAGES_NEWPOP . '<br>' . tep_draw_file_field('popup_images')); $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_save.gif', IMAGE_SAVE) . ' <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $HTTP_GET_VARS['pID']) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; case 'delete_images': $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_NEW_IMAGES . '</b>'); $contents = array('form' => tep_draw_form('delete_images', FILENAME_CATEGORIES, 'action=del_images&cPath=' . $cPath . '&pID=' . $HTTP_GET_VARS['pID'])); $contents[] = array('text' => TEXT_DEL_IMAGES_INTRO); $images_product = tep_db_query("SELECT additional_images_id, images_description, medium_images FROM " . TABLE_ADDITIONAL_IMAGES . " where products_id = '" . $HTTP_GET_VARS['pID'] . "'"); if (!tep_db_num_rows($images_product)) { $contents[] = array('align' => 'center', 'text' => '<br><font color="red">No Additional Images!</font>'); $contents[] = array('align' => 'center', 'text' => '<br><a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $HTTP_GET_VARS['pID']) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); } else { while ($new_images = tep_db_fetch_array($images_product)) { $contents[] = array('text' => ' ' . tep_draw_checkbox_field('additional_images_id[]', $new_images['additional_images_id'], true) . $new_images['images_description'] . ' (' . $new_images['medium_images'] . ')'); } $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_delete.gif', IMAGE_SAVE) . ' <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $HTTP_GET_VARS['pID']) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); } break; May this helpful, Quote recent contributions: mySQLi extension for osc 2.X, OPI: advanced image handling (ajax, thumbnail, watermark, etc), and other contributions all here Link to comment Share on other sites More sharing options...
DavidR Posted September 13, 2003 Share Posted September 13, 2003 I think it would be very helpful to have a combination of this contribution and image resize http://www.oscommerce.com/community/contributions,350. At the moment it's beyond my skills to make it work but I am willing to help test and debug. Image resize is wonderful for clients who add their own products and don't have any experience with graphics. It also has the option of automatically copying the resized pic onto a base image of fixed size and color, keeping things uniform without distortion. Additional images is really necessary for many products that need more than one pic to truly display them. I think a combination would be outstanding. Anybody else? David Quote Link to comment Share on other sites More sharing options...
Guest Posted September 18, 2003 Share Posted September 18, 2003 You need to have GD LIB 2.0 or higher to use that contribution Unfortunatly my hosting co. only has 1.6x installed. Before attempting that contribution - check out what version your machine is using in 'Server Info' in the admin panel. (It's under the results heading 'GD') I wish the authors would have put mentioned this important bit of information - It could have saved me a few hours! Quote Link to comment Share on other sites More sharing options...
Guest Posted September 18, 2003 Share Posted September 18, 2003 Never mind what I just said - the author does say all this. AND you can change the GD Lib version used in the control panel I'm getting off topic... Back to: Additional Images for MS2 Quote Link to comment Share on other sites More sharing options...
jswan Posted October 1, 2003 Share Posted October 1, 2003 I hope some of you folks are still subscribed to this thread. I installed the contribution, and the admin works great. However, when I look at the product_info.php page, all I get are the additional images. No product title, no price, and no text. It's odd. The product photo and title appear in the what's new infobox, but not on the product info page. Any suggestions? TIA, Jason Quote Link to comment Share on other sites More sharing options...
sinbad Posted October 6, 2003 Share Posted October 6, 2003 Ok finally go it working howerver the images are distorted and I have two sets of display image width and height and 2 sets if popup image width and height. I uninstall the first attempt and re-installed the mod. Why are these duplicating and where and how do I remove them. They don't seem to cause any errors but I don't think they should be there. Please help if you can. Small Image Width 100 Small Image Height 80 Heading Image Width 57 Heading Image Height 40 Subcategory Image Width 100 Subcategory Image Height 57 Calculate Image Size true Image Required true Display Image Width 150 Display Image Width 150 Display Image Height 120 Display Image Height 120 Popup Image Width Popup Image Width Popup Image Height Popup Image Height M.Dsouza Quote Sinbad "Mine is not the only way, mine is just another way Link to comment Share on other sites More sharing options...
peppers Posted October 9, 2003 Share Posted October 9, 2003 That's cool conrubution! How can i keep the mult images to right side?? I think it will more artistic. Who can give me fruitful help? :) Quote Link to comment Share on other sites More sharing options...
dimports Posted November 7, 2003 Share Posted November 7, 2003 I don't get the database installation part of the README: 1. Run the "additional_images.sql" file to make the database changes. 2. The "extra_width_images.sql" is to add new images width and height (display/medium height-width and popup/large height-width). If you have this configured in your database, you don't have to execute this "extra_width_images.sql". How would i do this? do i upload these files onto my server first? im sorry.. even tho i can do web design to a far extent, im fairly to the SQL database part of it. pls advise someone. thx in advance for this contribution! Quote Link to comment Share on other sites More sharing options...
jswan Posted November 7, 2003 Share Posted November 7, 2003 Hi dimports: Those two files are the database commands to create the modifications. You will need to add the modifications to your catalog database. There are two ways to do this. The easiest is to use something like myPHPadmin (many web hosts offer this because it is free) to install the files from the command line (the SQL tab in myPHPadmin). An alternative is to open each .sql file in a text editor and copy the commands. Then you can paste them in the command line of whatever you are using to manage your database. So, if you are using osCommerce, then you must have a database set up somewhere. Use the same tool that you used to create the new database when you installed osCommerce. Good luck. Jason Quote Link to comment Share on other sites More sharing options...
digx55 Posted November 8, 2003 Share Posted November 8, 2003 I'm having a problem. When I add a new product and I'm browsing them in admin I get: 1146 - Table 'digxworld.TABLE_ADDITIONAL_IMAGES' doesn't exist SELECT additional_images_id, images_description, medium_images FROM TABLE_ADDITIONAL_IMAGES where products_id = '29' [TEP STOP] Please help! Thanks. Quote digx55 Such a simple signature, yet original Link to comment Share on other sites More sharing options...
digx55 Posted November 8, 2003 Share Posted November 8, 2003 Never mind, fixed it. It seems I had to add the table definition ( define('TABLE_ADDITIONAL_IMAGES', 'additional_images'); //additional images ) to the /catalog/admin/includes/database_tables.php also instead of just the /catalog/includes/database_tables.php file. Thanks for the help anyways, and hope the info I just provided helps anybody that needs it! Quote digx55 Such a simple signature, yet original Link to comment Share on other sites More sharing options...
dimports Posted November 8, 2003 Share Posted November 8, 2003 (edited) sigh@!! i followed and added, replaced, etc etc all the files but i keep getting an error when trying to add a new product: Warning: Cannot modify header information - headers already sent by (output started at /home/designi/public_html/catalog/admin/includes/languages/english/categories.php:108) in /home/designi/public_html/catalog/admin/includes/functions/general.php on line 18 what am i doing wrong? Edited November 8, 2003 by dimports Quote Link to comment Share on other sites More sharing options...
dimports Posted November 8, 2003 Share Posted November 8, 2003 nevermind guys, i got it working!!.. 4th time doing it was a charm. awesome contribuition dude. genuis. i was wondering if i can take out the section in the admin to upload the popup picture just to make it easier for other people here. it confusing to them and they just ignore that the 2nd upload section is for the pop up. anyone know where i can make these changes? thx a mil to all you wonderful contributers. Quote Link to comment Share on other sites More sharing options...
tordeman Posted April 13, 2004 Share Posted April 13, 2004 Im getting these errors: Parse error: parse error in /usr/local/psa/home/vhosts/tord.no/httpdocs/shop3/includes/classes/boxes.php on line 101 That one was in the header this one was in the body Fatal error: Cannot instantiate non-existent class: infoboxheading in /usr/local/psa/home/vhosts/tord.no/httpdocs/shop3/includes/boxes/categories.php on line 68 Need answers as soon as possible. Quote Link to comment Share on other sites More sharing options...
Eisbaer Posted April 20, 2004 Share Posted April 20, 2004 Fatal error: Call to undefined function: tep_array_merge() in /osc/catalog/admin/categories.php on line 711 What is my problem? Lars Quote Link to comment Share on other sites More sharing options...
tordeman Posted April 20, 2004 Share Posted April 20, 2004 I fixed my problem Lars: Try installing it all over again. and make sure you use MS22 Quote Link to comment Share on other sites More sharing options...
Eisbaer Posted April 20, 2004 Share Posted April 20, 2004 There are many updates for this contribution..... The system is completely new, which contribution I need? Quote Link to comment Share on other sites More sharing options...
Eisbaer Posted April 22, 2004 Share Posted April 22, 2004 tordeman: I use osCommerce 2.2-MS2 I use a fresh Shop and install the contribution from 9 Sep 2003 After this installation the Admintool gives me this out: Fatal error: Call to undefined function: tep_array_merge() in /4gb/wwwtrans/tmp/lhe_php/osc/catalog/admin/categories.php on line 726 --> have you for me a categories.php?? Greeting Lars Quote Link to comment Share on other sites More sharing options...
cilliers Posted April 24, 2004 Share Posted April 24, 2004 (edited) I've just installed Additional Images on OS2.2MS2 The site is working fine, not a single error message However I cannot find the place where to add extra pics. Please help :ph34r: Edited April 24, 2004 by cilliers Quote Link to comment Share on other sites More sharing options...
MrE03 Posted May 9, 2004 Share Posted May 9, 2004 is there a way i can change the path of where the additional images go? because all my images go into subfolders of images/ i.e.- images/items/ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.