get_row('SELECT id FROM '. WPSC_TABLE_PRODUCT_CATEGORIES . ' WHERE `nice-name` = "featured" LIMIT 1', ARRAY_A); if($featured_category != null) { // get all featured products $wpsc_query = new WPSC_Query(array('category_id' => $featured_category['id'])); $has_featured = TRUE; } get_header(); ?>
products = $wpdb->get_results($sql, ARRAY_A); $wpsc_query->product_count = count($wpsc_query->products); // get top selling in this month if ($wpsc_query->product_count == 0) { $top_selling_at_time = 'This Month'; $sql = get_sql_top_selling(getMonthRange()); $wpsc_query->products = $wpdb->get_results($sql, ARRAY_A); $wpsc_query->product_count = count($wpsc_query->products); } // get top selling in all time if ($wpsc_query->product_count == 0) { $top_selling_at_time = 'All Time'; $sql = get_sql_top_selling(getMonthRange()); $wpsc_query->products = $wpdb->get_results($sql, ARRAY_A); $wpsc_query->product_count = count($wpsc_query->products); } $n_download = count($wpsc_query->products); $i_row_download = 1; $i_slide_download = 1; $max_per_row = 4; $max_per_slide = 8; $downloadRemain = bcmod($n_download, $max_per_slide); $downloadRemain = ($downloadRemain == $n_download) ? $max_per_slide - $n_download : $downloadRemain; ?>

Top Selling

<?php echo wpsc_the_product_title(); ?> No Image Available

8) ? substr($p_title, 0, 8) . '...' : $p_title; ?>

', ''); ?>