Immagini aggiuntive prodotti
Moderatore: mod Generali
-
- membro Junior
- Messaggi: 9
- Iscritto il: 18/10/2010, 19:46
Immagini aggiuntive prodotti
Ho installato la versione osCommerceITalia PACK v1.0.8 ....perfetto
il problema adesso è che mi manca la possibilità di inserire immagini aggiuntive al prodotto.
ho provato ad istallare questa: "Ultra Pics 2.07.01 - incl. STS + CCGV + LightBox" ma non sono riuscito a farla funzionare perchè arrivati alla pagina podutc_info,
e non solo, il codice e talmente modificato dai tanti contributi installati nel pacchetto che mi è diventato impossibile copiare incollare sostituire ecc.
ora mi chiedo: esiste un contributo maggiormente compatibile con questo pacchetto che mi potete consigliare oppure devo insistere e magari sottoporvi i dubbi su cosa sostituire e dove... grazie giovanni
il problema adesso è che mi manca la possibilità di inserire immagini aggiuntive al prodotto.
ho provato ad istallare questa: "Ultra Pics 2.07.01 - incl. STS + CCGV + LightBox" ma non sono riuscito a farla funzionare perchè arrivati alla pagina podutc_info,
e non solo, il codice e talmente modificato dai tanti contributi installati nel pacchetto che mi è diventato impossibile copiare incollare sostituire ecc.
ora mi chiedo: esiste un contributo maggiormente compatibile con questo pacchetto che mi potete consigliare oppure devo insistere e magari sottoporvi i dubbi su cosa sostituire e dove... grazie giovanni
Re: Immagini aggiuntive prodotti
io avevo incluso molto facilmente
Multi images extra by nico
http://www.oscommerce.com/community/contributions,4170
Multi images extra by nico
http://www.oscommerce.com/community/contributions,4170
Home page personale http://www.magnino.net
SVN aggiornamenti http://code.google.com/p/oswai/source/browse/#svn/trunk
SVN aggiornamenti http://code.google.com/p/oswai/source/browse/#svn/trunk
-
- membro Junior
- Messaggi: 9
- Iscritto il: 18/10/2010, 19:46
Re: Immagini aggiuntive prodotti
ok grazie... provo subito! ti faccio sapere
Re: Immagini aggiuntive prodotti
giovannidecup ha scritto: ora mi chiedo: esiste un contributo maggiormente compatibile con questo pacchetto che mi potete consigliare oppure devo insistere e magari sottoporvi i dubbi su cosa sostituire e dove... grazie giovanni
per confrontare i file e non imbrogliarti con le aggiunte e i tagli, ti consiglio di usare un programma che confronta i file.
io uso da poco examdiff e mi permette di confrontare l'originale e quello che sto modificando così non mi confondo. magari può tornarti utile.
ciaoooo
-
- membro Junior
- Messaggi: 9
- Iscritto il: 18/10/2010, 19:46
Re: Immagini aggiuntive prodotti
Scusate ma ho bisogno ancora del vostro aiuto:
su consiglio di maury2ma ho installato Multi images extra by nico che effettivamente si è dimostrato più semplice del precedente solo che il problema rimane quando arrivo alla pagina product_info.php il codice si presenta cosi:
e compiere queste modifiche:
f. catalog\product_info.php, if you don´t have other contributions you can copy the files, if not made following modifications :
find:
replace with:
Sto impazzendo perchè c'è quel contributo Total B2B che sconvolge tutto il codice...
Sarò grato a chi mi aiuto. Grazie
su consiglio di maury2ma ho installato Multi images extra by nico che effettivamente si è dimostrato più semplice del precedente solo che il problema rimane quando arrivo alla pagina product_info.php il codice si presenta cosi:
Codice: Seleziona tutto
<?php
/*
$Id: product_info.php 1739 2007-12-20 00:52:16Z hpdl $
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2003 osCommerce
Released under the GNU General Public License
*/
require('includes/application_top.php');
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO);
$product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
$product_check = tep_db_fetch_array($product_check_query);
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css" media="screen">
<script language="javascript"><!--
function popupWindow(url) {
window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150')
}
//--></script>
<!-- lightbox //-->
<script type="text/javascript" src="lightbox/prototype.js"></script>
<script type="text/javascript" src="lightbox/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="lightbox/builder.js"></script>
<script type="text/javascript" src="lightbox/lightbox.js"></script>
<!-- lightbox //-->
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->
<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
<tr>
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</table></td>
<!-- body_text //-->
<td width="100%" valign="top"><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
<?php
if ($product_check['total'] < 1) {
?>
<tr>
<td><?php new infoBox(array(array('text' => TEXT_PRODUCT_NOT_FOUND))); ?></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
<tr class="infoBoxContents">
<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
<td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<?php
} else {
$product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
$product_info = tep_db_fetch_array($product_info_query);
tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'");
//TotalB2B start
$product_info['products_price'] = tep_xppp_getproductprice($product_info['products_id']);
//TotalB2B end
if ($new_price = tep_get_products_special_price($product_info['products_id'])) {
//TotalB2B start
$query_special_prices_hide = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " WHERE configuration_key = 'SPECIAL_PRICES_HIDE'");
$query_special_prices_hide_result = tep_db_fetch_array($query_special_prices_hide);
if ($query_special_prices_hide_result['configuration_value'] == 'true') {
$products_price = '<span class="productSpecialPrice">' . $currencies->display_price_nodiscount($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';
} else {
$products_price = '<s>' . $currencies->display_price($product_info['products_id'], $product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price_nodiscount($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';
}
//TotalB2B end
} else {
//TotalB2B start
$products_price = $currencies->display_price($product_info['products_id'], $product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']));
//TotalB2B end
}
if (tep_not_null($product_info['products_model'])) {
$products_name = $product_info['products_name'] . '<br><span class="smallText">[' . $product_info['products_model'] . ']</span>';
} else {
$products_name = $product_info['products_name'];
}
?>
<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td class="pageHeading" valign="top"><?php echo $products_name; ?></td>
<td class="pageHeading" align="right" valign="top"><?php echo $products_price; ?></td>
</tr>
</table></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td class="main">
<?php
if (tep_not_null($product_info['products_image'])) {
?>
<table border="0" cellspacing="0" cellpadding="2" align="right">
<tr>
<td align="center" class="smallText">
<!-- lightbox //-->
<?php
$enable_lightbox = true;
if ($enable_lightbox) {
?>
<script language="javascript"><!--
document.write('<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank" rel="lightbox" title="'.$product_info['products_name'].'" >' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_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" rel="lightbox" title="'.$product_info['products_name'].'" >' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');
</noscript>
<?php
} else {
?>
<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']), SMALL_IMAGE_WIDTH, SMALL_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'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>
<?php
}
?>
<!-- lightbox //-->
</td>
</tr>
</table>
<?php
}
?>
<p><?php echo stripslashes($product_info['products_description']); ?></p>
<?php
// START: Extra Fields Contribution v2.0b - mintpeel display fix
$extra_fields_query = tep_db_query("
SELECT pef.products_extra_fields_status as status, pef.products_extra_fields_name as name, ptf.products_extra_fields_value as value
FROM ". TABLE_PRODUCTS_EXTRA_FIELDS ." pef
LEFT JOIN ". TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS ." ptf
ON ptf.products_extra_fields_id=pef.products_extra_fields_id
WHERE ptf.products_id=". (int)$HTTP_GET_VARS['products_id'] ." and ptf.products_extra_fields_value<>'' and (pef.languages_id='0' or pef.languages_id='".(int)$languages_id."')
ORDER BY products_extra_fields_order");
echo '<table border="0" width="50%" cellspacing="0" cellpadding="2px">';
while ($extra_fields = tep_db_fetch_array($extra_fields_query)) {
if (! $extra_fields['status']) // show only enabled extra field
continue;
echo'<tr><td class="main" align="left" valign="middle"><font size="1" color="#666666"><b>'.$extra_fields['name'].': </b>' . stripslashes($extra_fields['value']).'</font></td></tr>';
}
echo' </table>';
// END: Extra Fields Contribution - mintpeel display fix
?>
<?php
$products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'");
$products_attributes = tep_db_fetch_array($products_attributes_query);
if ($products_attributes['total'] > 0) {
//++++ QT Pro: Begin Changed code
$products_id=(preg_match("/^\d{1,10}(\{\d{1,10}\}\d{1,10})*$/",$HTTP_GET_VARS['products_id']) ? $HTTP_GET_VARS['products_id'] : (int)$HTTP_GET_VARS['products_id']);
require(DIR_WS_CLASSES . 'pad_' . PRODINFO_ATTRIBUTE_PLUGIN . '.php');
$class = 'pad_' . PRODINFO_ATTRIBUTE_PLUGIN;
$pad = new $class($products_id);
echo $pad->draw();
}
//Display a table with which attributecombinations is on stock to the customer?
if(PRODINFO_ATTRIBUTE_DISPLAY_STOCK_LIST == 'True'): require(DIR_WS_MODULES . "qtpro_stock_table.php");
endif;
//End Display a table with which attributecombinations is on stock to the customer?
//++++ QT Pro: End Changed Code
?>
<?php
}
?>
</td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<?php
$reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");
$reviews = tep_db_fetch_array($reviews_query);
if ($reviews['count'] > 0) {
?>
<tr>
<td class="main"><?php echo TEXT_CURRENT_REVIEWS . ' ' . $reviews['count']; ?></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<?php
}
if (tep_not_null($product_info['products_url'])) {
?>
<tr>
<td class="main"><?php echo sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false)); ?></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<?php
}
if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {
?>
<tr>
<td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td>
</tr>
<?php
} else {
?>
<tr>
<td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td>
</tr>
<?php
}
?>
<!-- social bookmarks start //-->
<?php include(DIR_WS_MODULES . 'social_bookmarks' . '.php'); ?>
<!-- social bookmarks finish //-->
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
<tr class="infoBoxContents">
<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
<td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?></td>
<td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td>
<?php
if ((USE_CACHE == 'true') && empty($SID)) {
echo tep_cache_also_purchased(3600);
} else {
include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);
}
?>
</td>
</tr>
</table></form></td>
<!-- body_text_eof //-->
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
</table></td>
</tr>
</table>
<!-- body_eof //-->
<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
f. catalog\product_info.php, if you don´t have other contributions you can copy the files, if not made following modifications :
find:
Codice: Seleziona tutto
$product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
replace with:
$product_info_query = tep_db_query("select p.products_id, pd.products_name,
pd.products_description, p.products_model, p.products_quantity, p.products_image,
pi.products_image1, pi.products_image2, pi.products_image3, pi.products_image4, pi.products_image5,
pi.products_image6, pi.products_image7, pi.products_image8, pi.products_image9,
pd.products_url, p.products_price, p.products_tax_class_id,
p.products_date_added, p.products_date_available, p.manufacturers_id
FROM ".TABLE_PRODUCTS." p,".TABLE_PRODUCTS_DESCRIPTION." pd,".TABLE_PRODUCTS_IMAGES." pi
WHERE p.products_status = '1'
AND p.products_id = '".(int)$HTTP_GET_VARS['products_id']."'
AND pd.products_id = p.products_id
AND pi.products_id = p.products_id
AND pd.language_id = '" . (int)$languages_id . "'");
find:
<?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'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>
</td>
</tr>
</table>
Codice: Seleziona tutto
<?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'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>
</td>
</tr>
<?php
}
for($nb=1; $nb <= NB_IMAGE_EXTRA ; $nb++) {
$var_products_image = "products_image".$nb;
if (tep_not_null($product_info[$var_products_image])) {
?>
<tr>
<td align="center" class="smallText">
<script language="javascript"><!--
document.write('<?php echo '<a href="javascript:popupWindow(\\\'' .
tep_href_link(FILENAME_POPUP_IMAGE_EXTRA, 'pID='.$product_info['products_id']).'&id='.$nb.'\\\')">'.
tep_image(DIR_WS_IMAGES_EXTRA . $product_info[$var_products_image], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');
//--></script>
<noscript>
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES_EXTRA . $product_info[$var_products_image]) . '" target="_blank">' . tep_image(DIR_WS_IMAGES_EXTRA . $product_info[$var_products_image], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>
</td>
</tr>
<?php
}
}
?>
</table>
Sto impazzendo perchè c'è quel contributo Total B2B che sconvolge tutto il codice...
Sarò grato a chi mi aiuto. Grazie
Re: Immagini aggiuntive prodotti
scusa giovanni, ma nel tuo codice non trovi quella parte da sostituire? a me sembra che ci sia
attenzione che nel primo quadro di modifiche c'è un altro "replace with".
quindi la stringa che devi modificare è molto corta, facci caso.
attenzione che nel primo quadro di modifiche c'è un altro "replace with".
quindi la stringa che devi modificare è molto corta, facci caso.
-
- membro Regular
- Messaggi: 112
- Iscritto il: 31/03/2010, 17:58
Re: Immagini aggiuntive prodotti
ciao hai risolto? ho anche io il tuo problema.
Re: Immagini aggiuntive prodotti
Ciao a tutti,
Il problema è risolvibile in questa maniera.
Nel file che avete inserito andate alla riga 80 e da:
modificatela in:
poi cerca le righe dalla 143 alla 163 e da:
modificala in:
provate e fatemi sapere.
Simona67
Il problema è risolvibile in questa maniera.
Nel file che avete inserito andate alla riga 80 e da:
Codice: Seleziona tutto
$product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
Codice: Seleziona tutto
$product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pi.products_image1, pi.products_image2, pi.products_image3, pi.products_image4, pi.products_image5, pi.products_image6, pi.products_image7, pi.products_image8, pi.products_image9, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
Codice: Seleziona tutto
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank" rel="lightbox" title="'.$product_info['products_name'].'" >' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');
</noscript>
<?php
} else {
?>
<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']), SMALL_IMAGE_WIDTH, SMALL_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'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>
<?php
}
?>
<!-- lightbox //-->
</td>
</tr>
</table>
Codice: Seleziona tutto
<?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'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>
</td>
</tr>
<?php
}
for($nb=1; $nb <= NB_IMAGE_EXTRA ; $nb++) {
$var_products_image = "products_image".$nb;
if (tep_not_null($product_info[$var_products_image])) {
?>
<tr>
<td align="center" class="smallText">
<script language="javascript"><!--
document.write('<?php echo '<a href="javascript:popupWindow(\\\'' .
tep_href_link(FILENAME_POPUP_IMAGE_EXTRA, 'pID='.$product_info['products_id']).'&id='.$nb.'\\\')">'.
tep_image(DIR_WS_IMAGES_EXTRA . $product_info[$var_products_image], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');
//--></script>
<noscript>
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES_EXTRA . $product_info[$var_products_image]) . '" target="_blank">' . tep_image(DIR_WS_IMAGES_EXTRA . $product_info[$var_products_image], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>
</td>
</tr>
<?php
}
}
?>
</table>
Simona67