number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3'))) {
?>
display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS_NEW); ?>
display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?>
number_of_rows > 0) {
$products_new_query = tep_db_query($products_new_split->sql_query);
$row = 0;
$col = 0;
$col_items = (MAX_DISPLAY_NEW_PRODUCTS_LIST_PER_ROW - 1);
$col_width = (int)(100 / ($col_items + 1)).'%';
$count_color = 0;
$info_box_contents = array();
while ($products_new = tep_db_fetch_array($products_new_query)) {
if ($col_items %2){
if ($count_color %2){
$color_class = '';
$class_position = 'right';
$info_bool = 0;
}else{
$color_class = '';
$class_position = 'left';
$info_bool = 1;
}
}else{
if ($count_color %4 == 0){
$color_class = 'color_class1';
$class_position = 'left';
$info_bool = 0;
}elseif($count_color %4 == 1){
$color_class = 'color_class2';
$class_position = 'right';
$info_bool = 1;
}elseif($count_color %4 == 2){
$color_class = 'color_class3';
$class_position = 'right';
$info_bool = 0;
}elseif($count_color %4 == 3){
$color_class = 'color_class4';
$class_position = 'left';
$info_bool = 1;
}else{
// $color_class = 'color_class-red';
}
}
$product_query = tep_db_query("select products_description, products_id from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$products_new['products_id'] . "' and language_id = '" . (int)$languages_id . "'");
$product = tep_db_fetch_array($product_query);
$p_desc = substr(stripslashes($product['products_description']), 0, MAX_DESCR_2).'...';
$p_id = $product['products_id'];
$p_pic = '' . tep_image(DIR_WS_IMAGES . $products_new['products_image'], $products_new['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '';
$p_name = '' .$products_new['products_name'] . '';
if ($new_price = tep_get_products_special_price($products_new['products_id'])) {
$products_price = '' . $currencies->display_price($products_new['products_price'], tep_get_tax_rate($products_new['products_tax_class_id'])) . ' ' . $currencies->display_price($new_price, tep_get_tax_rate($products_new['products_tax_class_id'])) . '';
} else {
$products_price = ''.$currencies->display_price($products_new['products_price'], tep_get_tax_rate($products_new['products_tax_class_id']).'');
}
$p_price = $products_price;
$p_details = ''.tep_image_button("button_details.png").'';
$p_details_tex = ''.tep_draw_list_act_top().DETAILS .tep_draw_list_act_bottom().'';
$p_buy_now = ''.tep_image_button('button_add_to_cart1.png').'';
$p_buy_now_text = ''.tep_draw_list_top().ADD_TO_CART .tep_draw_list_bottom().'';
if ($info_bool == 0) {
$info_position = '
' . TEXT_DATE_ADDED . ' ' . tep_date_long($products_new['products_date_added']) . ' ' . TEXT_MANUFACTURER . ' ' . $products_new['manufacturers_name'] . '
'.$p_price.'
';
$button_posipion = '
';
}else{
$info_position = '
' . TEXT_DATE_ADDED . ' ' . tep_date_long($products_new['products_date_added']) . ' ' . TEXT_MANUFACTURER . ' ' . $products_new['manufacturers_name'] . '
'.$p_price.'
';
$button_posipion = '';
}
$products_new['products_name'] = tep_get_products_name($products_new['products_id']);
$info_box_contents[$row][$col] = array('align' => 'left',
'params' => ' class="'.$class_position.' '.$color_class.'" style="width:'.$col_width.'"',
'text' => ''.tep_draw_prod_top().'
'.tep_draw_prod_pic_top().''.$p_pic.''.tep_draw_prod_pic_bottom().'
'.$p_name.'
'.$info_position.'
'.$p_desc.'
'.$button_posipion.'
'.tep_draw_prod_bottom().'');
$count_color ++;
$col ++;
if ($col > $col_items) {
$col = 0;
$row ++;
}
}
new contentBox2($info_box_contents);
} else {
?>
number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3'))) {
?>
display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS_NEW); ?>
display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?>
|