Guest Posted January 7, 2005 Posted January 7, 2005 I've been searching and even post up a thread regarding using total b2b and product_listing_col.php but got no answer. Please if anyone that can help me solve this problem? ================================ START CODE ================================ <?php // Product Listing in Column ?> <!-- product_listing_col //--> <?php DEFINE('PRODUCT_LIST_COL_NUM',3); $listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_SEARCH_RESULTS, 'p.products_id'); if ( ($listing_split->number_of_rows > 0) && ( (PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3') ) ) { ?> <table border="0" width="100%" cellspacing="10" cellpadding="0"> <tr><td class="smallText"><?php echo tep_draw_separator('pixel_trans.gif', '12', '10'); ?></td> <td width="50%" class="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td> <td width="50%" align="right" class="smallText"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td> <td class="smallText" align="right"><?php echo tep_draw_separator('pixel_trans.gif', '10', '10'); ?></td> </tr> </table> <?php } $info_box_contents = array(); if ($listing_split->number_of_rows > 0) { $row = 0; $col = 0; $listing = tep_db_query($listing_split->sql_query); while ($listing_values = tep_db_fetch_array($listing)) { $listing_values['products_name'] = tep_get_products_name($listing_values['products_id']); $lc_text= '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing_values['products_id']) . '" class="borderImage">' . tep_image(DIR_WS_IMAGES . $listing_values['products_image'], $listing_values['products_name'], 140, 140) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing_values['products_id']) . '">' . $listing_values['products_name'] . '</a><br>'; //TotalB2B start $product_info['products_price'] = tep_xppp_getproductprice($product_info['products_id']); //TotalB2B end //TotalB2B start if ($new_price = tep_get_products_special_price($product_info['products_id'])) { $product_info['specials_new_products_price'] = $new_price; $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') { $lc_text = ' <span class="productSpecialPrice">' . $currencies->display_price_nodiscount($product_info['specials_new_products_price'], tep_get_tax_rate($listing_values['products_tax_class_id'])) . '</span> '; } else { $lc_text = ' <s>' . $currencies->display_price($product_info['products_id'], $product_info['products_price'], tep_get_tax_rate($listing_values['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price_nodiscount($product_info['specials_new_products_price'], tep_get_tax_rate($listing_values['products_tax_class_id'])) . '</span> '; } //TotalB2B end if ($listing_values['specials_new_products_price']) { $lc_text .= ' <s>' . $currencies->display_price($listing_values['products_id'], $listing_values['products_price'], tep_get_tax_rate($listing_values['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($listing_values['products_id'], $listing_values['specials_new_products_price'], tep_get_tax_rate($listing_values['products_tax_class_id'])) . '</span> '; } else { $lc_text .= ' <font color=CC0000><b>' . $currencies->display_price($listing_values['products_id'], $listing_values['products_price'], tep_get_tax_rate($listing_values['products_tax_class_id'])) . '</b></font> '; } if (PRODUCT_LIST_BUY_NOW) { $lc_text .= '<br><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing_values['products_id'], 'NONSSL') . '">' . tep_image_button('button_buy_now.gif', TEXT_BUY . $listing_values['products_name'] . TEXT_NOW) . '</a> '; } $info_box_contents[$row][$col] = array('align' => 'center', 'params' => 'class="smallText" width="33%" valign="top"', 'text' => $lc_text); $col ++; if ($col > PRODUCT_LIST_COL_NUM-1) { $col = 0; $row ++; } } new contentBox($info_box_contents); } else { $info_box_contents = array(); $info_box_contents[0] = array('params' => 'class="productListing-odd"'); $info_box_contents[0][] = array('params' => 'class="productListing-data"', 'text' => TEXT_NO_PRODUCTS); new contentBox($info_box_contents); } if ( ($listing_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3')) ) { ?> <table width="100%" border="0" cellpadding="0" cellspacing="10"> <tr> <td class="smallText"><?php echo tep_draw_separator('pixel_trans.gif', '12', '10'); ?></td> <td width="50%" class="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td> <td width="50%" align="right" class="smallText"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td> <td class="smallText" align="right"><?php echo tep_draw_separator('pixel_trans.gif', '10', '10'); ?></td> </tr> </table> <?php } ?> ============================== END CODE ============================== Thanks in advance Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.