$new_products = $db->ExecuteRandomMulti($new_products_query, MAX_DISPLAY_NEW_PRODUCTS); } $row = 0; $col = 0; $list_box_contents = array(); $title = ''; $num_products_count = $new_products_query == '' ? 0 : $new_products->RecordCount(); // show only when 1 or more if ($num_products_count > 0) { if ($num_products_count < $number_of_columns || $number_of_columns == 0) { $col_width = floor(100 / $num_products_count); } else { $col_width = floor(100 / $number_of_columns); } while (!$new_products->EOF) { $products_price = zen_get_products_display_price_pure_green($new_products->fields['products_id']); if (!isset($productsInCategory[$new_products->fields['products_id']])) { $productsInCategory[$new_products->fields['products_id']] = zen_get_generated_category_path_rev($new_products->fields['master_categories_id']); } //##wel - additional class for last div in string if ($col == $number_of_columns - 1) { $additional_class = 'no-right-margin'; } else { $additional_class = ''; } //wel $list_box_contents[$row][$col] = array('params' => 'class="centerBoxContentsNew float-left ' . $additional_class . '" style="width: 31%;" ', 'text' => (($new_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : ' <div class="productbox-top-left"><div class="productbox-top-right"></div></div> <div class="productbox-bg-left"><div class="productbox-bg-right">
} $row = 0; $col = 0; $list_box_contents = array(); $title = ''; $num_products_count = $specials_index_query == '' ? 0 : $specials_index->RecordCount(); // show only when 1 or more if ($num_products_count > 0) { if ($num_products_count < $number_of_columns || $number_of_columns == 0) { $col_width = floor(100 / $num_products_count); } else { $col_width = floor(100 / $number_of_columns); } $list_box_contents = array(); while (!$specials_index->EOF) { $products_price = zen_get_products_display_price_pure_green($specials_index->fields['products_id']); if (!isset($productsInCategory[$specials_index->fields['products_id']])) { $productsInCategory[$specials_index->fields['products_id']] = zen_get_generated_category_path_rev($specials_index->fields['master_categories_id']); } $specials_index->fields['products_name'] = zen_get_products_name($specials_index->fields['products_id']); //##wel - additional class for last div in string if ($col == $number_of_columns - 1) { $additional_class = 'no-right-margin'; } else { $additional_class = ''; } //wel $list_box_contents[$row][$col] = array('params' => 'class="centerBoxContentsSpecials float-left ' . $additional_class . '"', 'text' => (($specials_index->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : ' <div class="productbox-top-left"><div class="productbox-top-right"></div></div>