Community Add-Ons

Maintainers: nico1814
Add file to this package
Top » Images

Multi images extra by nico
for osCommerce Online Merchant v2.2

There are many contributions to manage several images, but all modify many files, as well as the original database.

I thus decided to write this contribution by basing me on "Three images with admin 1.0" of Jason:
http://www.oscommerce.com/community/contributions, the 3432

Principal functionalities are:
- free from 0 to 9 additional images, management in configuration > images > Number of extra images
- creation of an additional table to manage the images (the original database is not modified)
- automatic redimensioning of the images, increased in popup.

Documentation in english, with many screenshot.

Nico

Legend:  Download   Report
Expand All / Collapse All
Fixing: Warning: array_merge() [function.array-merge]: Argument #1 is not an array in admin/categories.php maltchev 19 Apr 2008  

There is a bug in the contribution that shows error when adding items with no extra images.

When adding
==================================
unset($sql_data_array);
for($nb=1; $nb <= NB_IMAGE_EXTRA ; $nb++) {
$var_delete_image = "delete_image".$nb;
$var_products_image = "products_image".$nb;
// possibility to delete extra images, but not the standard image
if ($HTTP_POST_VARS[$var_delete_image] == 'yes') {
unlink(DIR_FS_CATALOG_IMAGES_EXTRA.$HTTP_POST_VARS[$var_products_image]);
$sql_data_array[$var_products_image] = tep_db_prepare_input($HTTP_POST_VARS['none']);
}
//end delete image function
else if (isset($HTTP_POST_VARS[$var_products_image]) && tep_not_null($HTTP_POST_VARS[$var_products_image]) && ($HTTP_POST_VARS[$var_products_image] != 'none')) {
$sql_data_array[$var_products_image] = tep_db_prepare_input($HTTP_POST_VARS[$var_products_image]);
}
}
$insert_sql_data = array('products_id' => $products_id);
$sql_data_array = array_merge($sql_data_array, $insert_sql_data);
=========================================
in admin/categories.php as part of the installation, replace the end part:

$sql_data_array = array_merge($sql_data_array, $insert_sql_data);

with:

if(isset($sql_data_array)) $sql_data_array = array_merge($sql_data_array, $insert_sql_data);


I hope that helps!

Nick

bug fix product_info.php for products without multi image thebigia 7 Aug 2006  
Bug fixe synthax error { product_info rafsand 7 Jun 2006  
Multi images extra 1.02 nico1814 18 Apr 2006  
Multi images extra 1.01 nico1814 17 Apr 2006  
Multi images extra by nico nico1814 17 Apr 2006