Extra Images
for osCommerce Online Merchant v2.2
This contribution will give you the ability to have multiple images per product.
There are several contributions available that allow you to have different size
images, or multiple images, but none of them seemed to work for my needs. So I
created my own version which has no limit on the amount of images you can add.
The way this contribution works is very simple, it keeps extra images in a new
table in the database. Each product can have the 1 main image (in the products table) as
well as an unlimited number of images from the new extra_images table.
Includes admin interface for adding images to each product, also has 2 options for how the images will be displayed.
Tested with 2.2 MS1
Legend: 
Download

Report
At line 203 find -
Na linha 203 encontre -
<td class="dataTableContent"><?php echo $products_extra_image['products_name']; ?></td>
<td class="dataTableContent" align="center"><?php echo tep_image(DIR_WS_CATALOG_IMAGES . $products_extra_image['products_image'], $products_extra_image['products_name'], SMALL_IMAGE_WIDTH/2, SMALL_IMAGE_HEIGHT/2); ?></td>
<td class="dataTableContent"><?php echo $products_extra_image['products_extra_image']; ?></td>
<td class="dataTableContent" align="center"><?php echo tep_image(DIR_WS_CATALOG_IMAGES . $products_extra_image['products_extra_image'], $products_extra_image['products_extra_image_name'], SMALL_IMAGE_WIDTH/2, SMALL_IMAGE_HEIGHT/2); ?></td>
just take out the /2 after ALL SMALL_IMAGE_WIDTH and SMALL_IMAGE_HEIGHT .
retire o /2 depois de TODOS SMALL_IMAGE_WITH
e SMALL_IMAGE_HEIGHT
------
hope it can help someone :)
Agora você pode adicionar imagens extras para os produtos de sua loja com o efeito lightbox js. Contém tradução apenas para o Português-Brasil.
Arquivos originais, baixe a contribuição da SABAINA.
CORINTHIANS!
===================================
Now you can add images extras for the products of his shop with the effect lightbox js. Contains translation only for the Portuguese-Brazil.
Original files, download the contribuition of SABAINA.
CORINTHIANS!
On digaovr files :
in admin/products_extra_images.php, line 31/32:
Replace
$products_array[] = array('id' => $products['products_name'],
'text' => $products['products_name']);
With
$products_array[] = array('id' => $products['products_id'],
'text' => $products['products_name']);
2nd Fix, line 143~:
Replace
<td class="dataTableContent" align="right"><?php if ($products_extra_image['products_extra_images_id'] == $pId) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif'); } else { echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_EXTRA_IMAGES, 'page=' . $page . '&pID=' . $pId . '">' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO)) . '</a>'; } ?> </td>
with
<td class="dataTableContent" align="right"><?php if ($products_extra_image['products_extra_images_id'] == $pId) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif'); } else { echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_EXTRA_IMAGES, 'page=' . $page . '&pID=' . $pId) . '">' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td>
And, i prefer for the line 141 :
<td class="dataTableContent"><?php echo $products_extra_image['products_name']; ?></td>
PORTUGUÊS / PORTUGUESE:
Agora você pode adicionar imagens extras pro produto através do admin da loja! Com esse update, ao invés de selecionar o produto pelo modelo, você irá agora selecioná-los pelo nome dos produtos!
PACOTE COMPLETO: Tutorial de instalação + Arquivos + Screenshot!
======================================================================
INGLÊS / ENGLISH
Now you can add to extra images per product through admin of the store! With this update, instead of selecting the product for the model, you will now go to select them for the name of the products!
COMPLETE PACKAGE: Tutorial of instalation + Archives + Screenshot!
Enjoy !!!
There's a bug with product and category description using multi language, the query in the admin didn't filter this.
This file has instruction to fix the query.
>> admin/products_extra_images.php -- When a row was selected, the image was showing in its original size, which could stretch the page for some users (if their images were of large dimensions). This has been fixed in this release - all images show in a constant width and height now.
>> catalog/includes/products_extra_images.php -- Added a onMouseOut event for the images shown (extra images) so that the main image would return after the mouse leaves the extra images. Originally, the extra image used to get stuck in the image placeholder, with no way to bring back the main original image (except to refresh the page).
>> Corrected instructions for step 8 below. The code to insert was correct; the code to insert it after was not.
This is a FULL package -- ONLY for the ENGLISH LANGUAGE.
- INSTALLATION MANUAL: Includes new instruction/installation manual in HTML format with checkboxes to help keep track of the steps you've already done.
- ADMIN AREA: Admin area now shows product name in the table's first column. Also changed the formatting of table to make it look less 'blotchy'. Also added a link to add a new extra image at the top of the table (so that it is easier to find it) - the original present after the table also exists.
- ADMIN AREA: Kaiser has posted a file (below) which shows the product names instead of models (the original contribution). I have added category names AND product names (concatenated) to the dropdown (as "category name -- product name") so it is now much easier to find a particular product - especially useful if you have a lot of products.
- PRODUCT PAGE: Added a onMouseOver event for the images shown (extra images) so that the main image would change when someone hovers the mouse over the extra images. This requires a change in catalog/product_info.php
/admin/products_extra_images.php ONLY!
This modification to the /admin/products_extra_images.php will change the admin function to use the product name field instead of the product model with the pull-down.
<b>/admin/products_extra_images.php ONLY!</b><br><br>
This modification to the /admin/products_extra_images.php will change the admin function to use the product name field instead of the product model with the pull-down.
This is just catalog/admin/products_extra_images.php
Upload first Extra Images 1.4 and then exchange admin/products_extra_images.php with the one in this package.
I only added a missing image size.
This is an update for admin/products_extra_images.php and admin/includes/languages/*/products_extra_images.php
Inspired by the Mini Images contribution I added a mini product_image and a mini product_extra_image in the product_extra_images listing in admin to have a better overview of products and their extra_images.
The addon from jashnu for three more image upload fields is also included in this package.
This is the full package.
I added three more image upload fields to the add new image field. One can easily modify the code to add even more image fields. Just one file; replace the original admin/products_extra_images.php with this one.
TWO BUG FIXES IN admin 1.2:
admin/includes/languages/*/products_extra_images.php
TEXT_IMAGE_NONEXISTENT was not defined in language files
admin/products_extra_images.php
IMAGE_ICON_INFO had an extra bracket at the end causing the session id to be text link appended to the info icon
ADDITIONAL FUNCTIONALITY found in admin 1.3:
I found the new contribution admin 1.2 was nice but it loss some flexibility that was found in the 1.4 contribution which was to set the path to the image within the images directory (E.G. subfolderA/subsubfolderB/image.jpg). Admin 1.2 contribution allowed you to upload files but ONLY to the images directory, which would be hard to manage if you had many products to add or if you had your main products in a subfolder and you wanted to keep the extra images also in those subfolders. Now if you want to add this additional functionality (customize subfolder paths to image or upload images to a specific subfolder in your images directory) to the extra images page in the admin do the following OR UPLOAD THE NEW FILES:
If you have installed admin 1.2 these are the only files that have been updated:
admin/products_extra_images.php
/admin/includes/languages/*/products_extra_images.php
FULL PACKAGE ATTACHED
This is NOT the entire controbution. The last instruction in the install.txt file submitted by sebastic did not match my /catalog/product_info.php file. I am running osCommerce 2.2 MS2
The last instruction should be:
/catalog/product_info.php
Find :
<td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td>
</tr>
<?php
}
After Add :
if (DISPLAY_EXTRA_IMAGES == 'true'){
if ($product_check['total'] >= 1) {
include (DIR_WS_INCLUDES . 'products_extra_images.php');
}
}
This is a small update to the release of 23 Nov 2005 by xav.
The strings used on the admin page of the extra images module are now included in the language includes.
Sorry, i forgot to say : package updated to work with osCommerce 2.2 Milestone 2 Update 051113
ZIP included too !
This package includes (Full package) :
- Alternative Admin from moosey_jude (9 Nov 2005)
- Fix to delete extra images along with a product from moosey_jude (7 Nov 2005)
- Image Upload from StuBo (5 Oct 2005)
- extra_images_14 from Mikel Williams (6 Jul 2003)
Modification :
L administrateur peut choisir d'afficher ou non les extra images des produits sur la page products_info.php
dans Admin >> configuration
Admin can choose if extra images have to be displayed on products_info.php
in Admin >> configuration
First Contribution, I hope everything is all right !
This is a great contibution - also has a very painless install. It uses the default OSC method for resizing the popup window. The default popup was never tall enough for me (especially in firefox) and usually cut off the bottom of the image, so here's an easy tweak to increase the popup window height.
Modify 'function resize' in the following files:
catalog/popup_image.php
catalog/popup_extra_images.php
I submit this as an alternative admin page for this contribution. It adds file upload and pagination to the 1.4 release and completely replaces admin/products_extra_images.php.
You will need to download the 1.4 package and replace admin/products_extra_images.php with the one enclosed in the zip.
Tony.
This fix deletes a product's extra images from the products_extra_images table when a product is deleted from the catalogue.
Tony.
This fix will allow you to browse and upload the image automaticaly. Was in a rush and didn't add this functionality for editing already uploaded images. this is a patch to put over v 1.4.
Re-corrected previous update. I made a mistake on the fix in 1.3 here is the coreected corrected version.
Corrected a small error in the SQL statement used to find the extra images fro the product_info.php page.
This is only an update to the readme file included with this contribution to correct some instructional errors. The contribution itself has not been changed :)
Updated admin section so that products model drop down menu shows correct model, instead of default of --none--
Page now sorts extra images by products_model
This contribution will give you the ability to have multiple images per product.
There are several contributions available that allow you to have different size
images, or multiple images, but none of them seemed to work for my needs. So I
created my own version which has no limit on the amount of images you can add.
The way this contribution works is very simple, it keeps extra images in a new
table in the database. Each product can have the 1 main image (in the products table) as
well as an unlimited number of images from the new extra_images table.
Includes admin interface for adding images to each product, also has 2 options for how the images will be displayed.
Tested with 2.2 MS1