wpsc_top_of_products_page

Located in: wpsc-grid_view.php, wpsc-list_view.php, wpsc-products_page.php, wpsc-Single_product.php

Functions that call this hook: none this is the product page template files
Arguments Accepted: none
Version Introduced: 3.8

Description: This action is triggered at the top of the products page, it is used to add things to the top of the products pages for exapmle: Gold Cart uses this hook to output its live search.

Use Case:
[php]
add_action(‘wpsc_top_of_products_page’,’my_function’);

function my_function(){
//whatever you want to go on the products page goes here
echo "Big Sale 50% off everything!!";
}
[/php]

Code in context:
[php firstline=”1″ highlight=”12″]
<?php
global $wp_query;
$image_width = get_option(‘product_image_width’);
/*
* 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’),
[/php]