/** * wpsc display products function * Used to determine whether to display products on the page * @return boolean - true for yes, false for no */ function wpsc_display_products() { //we have to display something, if we are not displaying categories, then we must display products $output = true; if (wpsc_display_categories()) { if (get_option('wpsc_default_category') == 'list') { $output = false; } if (isset($_GET['range']) || isset($_GET['category'])) { $output = true; } } return $output; }
/** * wpsc display products function * Used to determine whether to display products on the page * @return boolean - true for yes, false for no */ function wpsc_display_products() { $post = get_queried_object(); $product_page_id = wpsc_get_the_post_id_by_shortcode('[productspage]'); //we have to display something, if we are not displaying categories, then we must display products $output = true; if (wpsc_display_categories() && isset($post->ID)) { if (get_option('wpsc_default_category') == 'list' && $post->ID == $product_page_id) { $output = false; } if (isset($_GET['range']) || isset($_GET['category'])) { $output = true; } } return $output; }
<?php if(wpsc_has_breadcrumbs()) : ?> <div class='breadcrumb'> <a href='<?php echo get_option('home'); ?>'><?php echo get_option('blogname'); ?></a> » <?php while (wpsc_have_breadcrumbs()) : wpsc_the_breadcrumb(); ?> <?php if(wpsc_breadcrumb_url()) :?> <a href='<?php echo wpsc_breadcrumb_url(); ?>'><?php echo wpsc_breadcrumb_name(); ?></a> » <?php else: ?> <?php echo wpsc_breadcrumb_name(); ?> <?php endif; ?> <?php endwhile; ?> </div> <?php endif; ?> <?php do_action('wpsc_top_of_products_page'); // Plugin hook for adding things to the top of the products page, like the live search ?> <?php if(wpsc_display_categories()): ?> <?php if(get_option('wpsc_category_grid_view') == 1) :?> <div class='wpsc_categories wpsc_category_grid'> <?php wpsc_start_category_query(array('category_group'=> get_option('wpsc_default_category'), 'show_thumbnails'=> 1)); ?> <a href="<?php wpsc_print_category_url();?>" class="wpsc_category_grid_item" title='<?php wpsc_print_category_name();?>'> <?php wpsc_print_category_image(45, 45); ?> </a> <?php wpsc_print_subcategory("", ""); ?> <?php wpsc_end_category_query(); ?> <div class='clear_category_group'></div> </div> <?php else:?> <ul class='wpsc_categories'> <?php wpsc_start_category_query(array('category_group'=> get_option('wpsc_default_category'), 'show_thumbnails'=> get_option('show_category_thumbnails'))); ?> <li> <?php wpsc_print_category_image(32, 32); ?>
/* * Most functions called in this page can be found in the wpsc_query.php file */ ?> <div id="default_products_page_container" class="wrap wpsc_container"> <?php wpsc_output_breadcrumbs(); ?> <?php do_action('wpsc_top_of_products_page'); // Plugin hook for adding things to the top of the products page, like the live search ?> <?php if (wpsc_display_categories()) { ?> <?php if (wpsc_category_grid_view()) { ?> <div class="wpsc_categories wpsc_category_grid group"> <?php wpsc_start_category_query(array('category_group' => get_option('wpsc_default_category'), 'show_thumbnails' => 1)); ?> <a href="<?php wpsc_print_category_url(); ?> " class="wpsc_category_grid_item <?php wpsc_print_category_classes_section(); ?> " title="<?php