[php]MAP Price: ’ . $currencies->display_price($listing[$x][‘map_price’], tep_get_tax_rate($listing[$x][‘products_tax_class_id’])) . ‘’;
} else {
$whats_new_price = 'MSRP: ’ . $currencies->display_price($listing[$x][‘msrp_price’], tep_get_tax_rate($listing[$x][‘products_tax_class_id’])) . ’
MAP Price: ’ . $currencies->display_price($listing[$x][‘map_price’], tep_get_tax_rate($listing[$x][‘products_tax_class_id’])) . ‘’;
}
if ($_SESSION[‘customers_email_address’] == ‘’) {
$whats_new_price .= ’
Our Price: Login to See Price’;
}
} elseif (isset($listing[$x][‘msrp_price’]) && $listing[$x][‘msrp_price’] != “0.00”) {
$whats_new_price = $prod_price . ’
MSRP: ’ . $currencies->display_price($listing[$x][‘msrp_price’], tep_get_tax_rate($listing[$x][‘products_tax_class_id’])) . ‘’;
} else
$whats_new_price = $prod_price;
if (!empty($listing[$x][‘products_url’]) && isset($_SESSION[‘customers_email_address’])) {
$multibuy = ‘’;
$newArea = ’
Qty:
‘;
} elseif (HIDE_PRICE_NON_LOGGED == “true” && $_SESSION[‘customers_email_address’] == ‘’) {
$newArea = ‘
‘;
$multibuy = ‘’;
} elseif ($listing[$x][‘products_price’] > 0) {
$newArea = ’
Qty:
‘;
if (!tep_has_product_attributes($listing[$x][‘products_id’])){
$ismulti = 1;
$multibuy = ‘
’ . TEXT_MULTIBUY_SELECT . ’
‘;
} else { $multibuy = ‘’; }
} else {
$newArea = ‘’;
$multibuy = ‘’;
}
if (HIDE_PRICE_NON_LOGGED == “true” && $_SESSION[‘customers_email_address’] == ‘’) {
$whats_new_price = “”;
} elseif ($listing[$x][‘products_price’] > 0) {
$whats_new_price = $prod_price;
} else {
$urlContactUs = “email_for_price.php?product_name=” . addslashes(addslashes($listing[$x][‘products_name’])) . “&products_model=” . $listing[$x][‘products_model’];
$whats_new_price = ‘
eMail for Price’;
}
$list_box_contents[$row][$column] = array(‘align’ => ‘’, ‘valign’ => $lc_valign, ‘params’ => ‘’, ‘text’ => ‘’ . $prod_name . ‘’ . $prod_img . ’ ’ . $prod_price . ‘’ . $prod_btn . ‘’);
print(’ ‘);
if ($listing[$x][‘products_image’] != “” && file_exists(DIR_WS_IMAGES . ‘/’ . $listing[$x][‘products_image’])) {
$imgsize =
@getimagesize(DIR_WS_IMAGES . $listing[$x][‘products_image’]);
if ($imgsize[‘mime’] == ‘image/bmp’) {
$imag_var = ‘<img src=’ . DIR_WS_IMAGES . $listing[$x][‘products_image’] . ’ height=’ . SMALL_IMAGE_HEIGHT . ’ width=’ . SMALL_IMAGE_WIDTH . ’ />’;
} else {
$imag_var = tep_image(DIR_WS_IMAGES . $listing[$x][‘products_image’], $listing[$x][‘products_name’], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT);
}
print(’’ . tep_draw_form(‘frm’ . $listing[$x][‘products_id’], tep_href_link(basename($PHP_SELF)), ‘get’) . tep_draw_hidden_field(“products_id”, $listing[$x][‘products_id’]) . tep_draw_hidden_field(“action”, “buy_now”) . tep_draw_hidden_field(“sort”, (isset($_GET[‘sort’]) ? $_GET[‘sort’] : ‘’)) . tep_draw_hidden_field(tep_session_name(), tep_session_id()) . ‘’);
if (!empty($_GET[‘cPath’]))
print tep_draw_hidden_field(“cPath”, $_GET[‘cPath’]);
if ($listing[$x][‘products_model’])
$model = ‘
SKU: ’ . $listing[$x][‘products_model’] . ’
‘;
else
$model = ‘’;
$extra_fields_query = tep_db_query("
SELECT pef.products_extra_fields_name as name, ptf.products_extra_fields_value as value ,pef.products_extra_fields_status as status
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=" . $listing[$x][‘products_id’] . " and ptf.products_extra_fields_value<>’’ and (pef.languages_id=‘0’ or pef.languages_id=’" . $languages_id . “’)
ORDER BY products_extra_fields_order”);
if (tep_db_num_rows($extra_fields_query) > 0) {
$extraField = ‘
’;
}
while ($extra_fields = tep_db_fetch_array($extra_fields_query)) {
if (!$extra_fields[‘status’])
continue;
$extraField .= ‘
’ . $extra_fields[‘name’] . ‘: |
’;
$extraField .= ‘’ . $extra_fields[‘value’] . ‘ |
’;
}
if (tep_db_num_rows($extra_fields_query) > 0) {
$extraField .= ‘
’;
} else
$extraField = ‘’;
print(’
' . $multibuy .
'
' . $prod_name . '
' . (!empty($listing[$x]['products_short']) ? '
' . $listing[$x]['products_short'] . '
' : '') . '
' . $extraField . '
' . $whats_new_price . '
' . $newArea . '
<div class="clear"/></div>');
if (!empty($listing[$x]['products_info_title'])) {
print('
' . $listing[$x]['products_info_title']);
}
if ($listing[$x]['manufacturers_name'] != "") {
if (!isset($listing[$x]['manufacturers_id'])){
$mfg_query = tep_db_query("select manufacturers_id from " . TABLE_MANUFACTURERS . " where manufacturers_name='" . $listing[$x]['manufacturers_name'] . "'");
if (tep_db_num_rows($mfg_query) > 0){
$mfg = tep_db_fetch_array($mfg_query);
$listing[$x]['manufacturers_id'] = $mfg['manufacturers_id'];
}
}
print('
<div class="clear"></div>Manufacturer : <a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing[$x]['manufacturers_id']) . '">' . $listing[$x]['manufacturers_name'] . '</a><br />');
}
print('<a class="readon" href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing[$x]['products_id']) . '">More Info</a><br/>
<div class="clear"/></div>');
if ($reviews_avg['countr'] > 0) {
print('<div class="rating">
<label>Average Rating:</label>
' . tep_image(DIR_WS_IMAGES . 'stars_' . $star_rating . '.gif', sprintf(BOX_REVIEWS_TEXT_OF_5_STARS, $star_rating)) . '
<div class="clear"/></div>
</div>');
}
print('</div>
<div class="clear"/></div>
</div>
');
} [/php]