Ejemplo n.º 1
0
}
$random_select .= " order by r.reviews_id desc limit " . MAX_RANDOM_SELECT_REVIEWS;
$random_product = tep_random_select($random_select);
$info_box_contents = array();
if ($random_product) {
    // display random review box
    $rand_review_query = tep_db_query("select substring(reviews_text, 1, 60) as reviews_text from " . TABLE_REVIEWS_DESCRIPTION . " where reviews_id = '" . (int) $random_product['reviews_id'] . "' and languages_id = '" . (int) $languages_id . "'");
    $rand_review = tep_db_fetch_array($rand_review_query);
    $rand_review_text = tep_break_string(tep_output_string_protected($rand_review['reviews_text']), 15, '-<br>');
    $name_prod = '<span><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $random_product['products_id'] . '&reviews_id=' . $random_product['reviews_id']) . '">' . $random_product['products_name'] . '...</a></span><br />';
    $review_prod = substr(strip_tags($rand_review_text), 0, MAX_DESCR_REVIEWS);
    $pic_prod = '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $random_product['products_id'] . '&reviews_id=' . $random_product['reviews_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT) . '</a>';
    $info_box_contents[] = array('text' => '
	
									<table cellspacing="0" cellpadding="0" align="center" border="0">
										<tr><td align="center" class="vam"><br style="line-height:1px;"><br style="line-height:5px;">' . tep_draw_box_prod_top() . '' . $pic_prod . '' . tep_draw_box_prod_bottom() . '<br style="line-height:5px;">
										</td></tr>
										<tr><td height="38" class="vam" align="center">' . $name_prod . '
											<br style="line-height:1px;"><br style="line-height:5px;">
											' . $review_prod . '
											</td></tr>
										<tr><td align="center"><br style="line-height:1px;"><br style="line-height:5px;">
' . tep_image(DIR_WS_IMAGES . 'stars_' . $random_product['reviews_rating'] . '.gif', sprintf(BOX_REVIEWS_TEXT_OF_5_STARS, $random_product['reviews_rating'])) . '										
										<br style="line-height:1px;"><br style="line-height:5px;"></td></tr>
									</table>								 
									');
} elseif (isset($HTTP_GET_VARS['products_id'])) {
    // display 'write a review' box
    $info_box_contents[] = array('text' => '
	
	<table border="0" cellspacing="5" cellpadding="0">
Ejemplo n.º 2
0
          <tr>
            <td>
<?php 
    $info_box_contents = array();
    $info_box_contents[] = array('text' => BOX_HEADING_SPECIALS);
    new infoBoxHeading4($info_box_contents, false, false, tep_href_link(FILENAME_SPECIALS));
    $name_prod = '<span><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . $random_product['products_name'] . '</a></span>';
    $pic_prod = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT) . '</a>';
    $sp_price_1 = '<span class="productSpecialPrice">' . $currencies->display_price($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</span>';
    $sp_price_2 = '<del>' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</del>';
    $sp_price = $sp_price_2 . '<br />' . tep_draw_separator('spacer.gif', '1', '9') . '<br />' . $sp_price_1;
    $info_box_contents = array();
    $info_box_contents[] = array('align' => 'center', 'text' => '
            <table cellpadding="0" cellspacing="0" border="0">
                <tr>
                    <td>' . tep_draw_box_prod_top() . '' . $pic_prod . '' . tep_draw_box_prod_bottom() . '</td>
                    <td>' . tep_draw_separator('spacer.gif', '10', '1') . '</td>
					<td style="width:100%">
                      <table cellpadding="0" cellspacing="0" border="0" class="box_body">
                            <tr>
                                <td class="vam" style="height:31px ">' . $name_prod . '</td>
                            </tr>
                            <tr>
                                <td class="vam" style="height:46px ">' . $sp_price . '</td>
                            </tr>
                        </table> 
                    </td>
                </tr>
            </table>');
    new infoBox4($info_box_contents);
    ?>
Ejemplo n.º 3
0
	  ';
        $whats_new_price = '<s>' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</s> &nbsp; &nbsp; ';
        $whats_new_price .= '<span class="productSpecialPrice">' . $currencies->display_price($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</span>';
        $pic_prod = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT) . '</a>';
    } else {
        $whats_new_price = '<span class="productSpecialPrice">' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</span>';
        $name_prod = '
	  <span><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . $random_product['products_name'] . '</a></span>
	  ';
        $pic_prod = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT) . '</a>';
    }
    $info_box_contents = array();
    $info_box_contents[] = array('align' => 'center ', 'text' => '
                    <table cellpadding="0" cellspacing="0" border="0">
                        <tr>
                            <td align="center">' . tep_draw_box_prod_top() . '' . $pic_prod . '' . tep_draw_box_prod_bottom() . '</td>
                        </tr>
                        <tr>
                            <td align="center" style="height:20px;" class="vam">' . $name_prod . '</td>
                        </tr>						
                        <tr>
                            <td style="height:20px;" align="center" class="vam">' . $whats_new_price . '</td>
                        </tr>
                </table> 
								 ');
    new infoBox($info_box_contents);
    ?>
            </td>
          </tr>
<!-- whats_new_eof //-->
<?php