Pagina 1 di 1

Recensioni - ho un problema

Inviato: 21/04/2005, 15:43
da webserviceonline
Un saluto a tutti. Sono un pricipiante su php. Mi sto cimentando con os commerce, sto riuscendo quasi in tutto ma ho un problema sia dal lato italiano che quello inglese.

Le recensioni: ne inserisco per test. Se clicco sulla freccina a lato del testo mi fa vedere l'elenco delle recensioni inserite senza problema. Se però ne seleziono una qualsiasi dall'elenco per il dettaglio, appare la pagina ma non si visualizzano le stelle del giudizio, l'immagine del prodotto e il testo del commento.

C'è qualcuno che ha il mio stesso problema o sa come eliminare il servizio recensioni?

spero di essermi spiegato. Ringrazio per l'aiuto che spero mi darete.



Saluti

Luigi

Inviato: 22/04/2005, 1:52
da wolfz
per eliminarlo non è molto difficile...
elimini il link al box dal file column_right.php
per farlo funzionare bisognerebbe vedere bene dove sta il problema..
da quello che dici non riesco a capire molto bene...

ciao ciao

Ancora sulle recensioni

Inviato: 22/04/2005, 14:28
da webserviceonline
Ti ringrazio davvero per la risposta, certo se invece di eliminarlo riuscissi a metterlo a posto sarebbe meglio. Se riuscissi a darmi una mano te ne sarei grato.
Gli esperimenti li sto facendo qui http://wsol.phenominet.com/1/catalog/index.php
Vedi a destra in basso c'è la tabella "recensioni", se clicchi sulla freccina accanto alla scritta "recensioni" esce l'elenco dei commenti, fin qui tutto bene.
Se invece il click lo fai sull'immagine sotto la scritta "recensioni" o su una delle immagini della lista dei commenti che sono usciti prima, la scheda che esce non visualizza le immagini ed il testo.
Se vedi i percorsi delle immagini che dovrebbero essere le stesse della schermata precedente invece sono altre che non so dove cerca, il testo poi non c'è.
Tieni conto che in PHP sono un principiante totale quindi non ho osato mettere le mani a caso.
Grazie ancora, spero che tu riesca a darmi qualche dritta.
Cordialmente
Luigi

Inviato: 22/04/2005, 15:16
da wolfz
sembrerebbe che cerchi di aprirti una finestra popup.. adesso devo andare ad allenarmi.. stasera ci dò un'occhiata..
lo provo sul mio sito..
per ora non ho dato molto interesse alle recensioni sul mio sito quindi non ti posso aiutare all'istante, devo guardare come funzionano ;)

a stasera

ciao ciao

Recensioni

Inviato: 25/04/2005, 9:40
da webserviceonline
Ti ringrazio davvero e spero tu ci riesca, resto in attesa.

Ciao

Re: Recensioni

Inviato: 26/04/2005, 2:42
da wolfz
webserviceonline ha scritto:Ti ringrazio davvero e spero tu ci riesca, resto in attesa.

Ciao
mi posteresti per cortesia questo file?
product_reviews_info.php

grazie

ciao ciao

Recensioni

Inviato: 26/04/2005, 10:43
da webserviceonline
ok lo scarico e te lo copio nel msg? non si possono allegare files qui mi pare.
Fammi sapere

grazie

Re: Recensioni

Inviato: 26/04/2005, 12:57
da wolfz
webserviceonline ha scritto:ok lo scarico e te lo copio nel msg? non si possono allegare files qui mi pare.
Fammi sapere

grazie
copialo qui così lo possono vedere anche gli altri...

;)

ciao ciao

ecco il file - ciao

Inviato: 26/04/2005, 13:58
da webserviceonline
<?php
/*
$Id: product_reviews_info.php,v 1.50 2003/06/20 14:25:58 hpdl Exp $

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');

if (isset($HTTP_GET_VARS['reviews_id']) && tep_not_null($HTTP_GET_VARS['reviews_id']) && isset($HTTP_GET_VARS['products_id']) && tep_not_null($HTTP_GET_VARS['products_id'])) {
$review_check_query = tep_db_query("select count(*) as total from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd where r.reviews_id = '" . (int)$HTTP_GET_VARS['reviews_id'] . "' and r.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and r.reviews_id = rd.reviews_id and rd.languages_id = '" . (int)$languages_id . "'");
$review_check = tep_db_fetch_array($review_check_query);

if ($review_check['total'] < 1) {
tep_redirect(tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params(array('reviews_id'))));
}
} else {
tep_redirect(tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params(array('reviews_id'))));
}

tep_db_query("update " . TABLE_REVIEWS . " set reviews_read = reviews_read+1 where reviews_id = '" . (int)$HTTP_GET_VARS['reviews_id'] . "'");

$review_query = tep_db_query("select rd.reviews_text, r.reviews_rating, r.reviews_id, r.customers_name, r.date_added, r.reviews_read, p.products_id, p.products_price, p.products_tax_class_id, p.products_image, p.products_model, pd.products_name from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where r.reviews_id = '" . (int)$HTTP_GET_VARS['reviews_id'] . "' and r.reviews_id = rd.reviews_id and rd.languages_id = '" . (int)$languages_id . "' and r.products_id = p.products_id and p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '". (int)$languages_id . "'");
$review = tep_db_fetch_array($review_query);

if ($new_price = tep_get_products_special_price($review['products_id'])) {
$products_price = '<s>' . $currencies->display_price($review['products_price'], tep_get_tax_rate($review['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($review['products_tax_class_id'])) . '</span>';
} else {
$products_price = $currencies->display_price($review['products_price'], tep_get_tax_rate($review['products_tax_class_id']));
}

if (tep_not_null($review['products_model'])) {
$products_name = $review['products_name'] . '<br><span class="smallText">[' . $review['products_model'] . ']</span>';
} else {
$products_name = $review['products_name'];
}

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_REVIEWS_INFO);

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()));
?>
<!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">
<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>
</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"><table border="0" width="100%" cellspacing="0" cellpadding="0">
<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><table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td class="main"><?php echo '<b>' . sprintf(TEXT_REVIEW_BY, tep_output_string_protected($review['customers_name'])) . '</b>'; ?></td>
<td class="smallText" align="right"><?php echo sprintf(TEXT_REVIEW_DATE_ADDED, tep_date_long($review['date_added'])); ?></td>
</tr>
</table></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 valign="top" class="main"><?php echo tep_break_string(nl2br(tep_output_string_protected($review['reviews_text'])), 60, '-<br>') . '<br><br><i>' . sprintf(TEXT_REVIEW_RATING, tep_image(DIR_WS_IMAGES . 'stars_' . $review['reviews_rating'] . '.gif', sprintf(TEXT_OF_5_STARS, $review['reviews_rating'])), sprintf(TEXT_OF_5_STARS, $review['reviews_rating'])) . '</i>'; ?></td>
<td width="10" align="right"><?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><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(array('reviews_id'))) . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td>
<td class="main" align="right"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, tep_get_all_get_params(array('reviews_id'))) . '">' . tep_image_button('button_write_review.gif', IMAGE_BUTTON_WRITE_REVIEW) . '</a>'; ?></td>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
<td width="<?php echo SMALL_IMAGE_WIDTH + 10; ?>" align="right" valign="top"><table border="0" cellspacing="0" cellpadding="2">
<tr>
<td align="center" class="smallText">
<?php
if (tep_not_null($review['products_image'])) {
?>
<script language="javascript"><!--
document.write('<?php echo '<a href="javascript:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $review['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $review['products_image'], addslashes($review['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 . $review['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $review['products_image'], $review['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>
<?php
}

echo '<p><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now') . '">' . tep_image_button('button_in_cart.gif', IMAGE_BUTTON_IN_CART) . '</a></p>';
?>
</td>
</tr>
</table>
</td>
</table></td>
</tr>
</table></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'); ?>

Inviato: 23/09/2005, 18:04
da veganet
Quealcuno ha trovato la soluzione al problema?

Grazie

Inviato: 23/09/2005, 18:29
da veganet
Risolto il problema!!

Aprire il file incriminato catalog/product_reviews_info.php

Cercare e sostituire in TUTTO il codice la variabile $review con un diverso nome ad esempio $mia_review

Come per magia tutto funziona!! eheh!! :D