wpsc_product_before_description

Located in: 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: $product_id, $wp_query->post (current product in the loop)
Version Introduced: 3.8

Description: This action is triggered right before the product description. The MP3 music player uses this to display the J player preview.

You could use it to display any additional custom post meta about your products.

Note: This action is called on all product theme files apart from the grid view.

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

function my_function($product_id, $wp_query->post){
//whatever you want to go before the products description
$extra_meta = get_product_meta(‘$product_id’, ‘my_extra_info’);
echo "Product Specs";
echo $extra_meta;
}
[/php]

Code in context:
[php firstline=”46″ highlight=”47″]
<div class="productcol">
<?php do_action(‘wpsc_product_before_description’, wpsc_the_product_id(), $wp_query->post); ?>
<div class="product_description">
<?php echo wpsc_the_product_description(); ?>
</div><!–close product_description –>
<?php do_action( ‘wpsc_product_addons’, wpsc_the_product_id() ); ?>
<?php if ( wpsc_the_product_additional_description() ) : ?>
<div class="single_additional_description">
<p><?php echo wpsc_the_product_additional_description(); ?></p>
</div><!–close single_additional_description–>
<?php endif; ?>
<?php do_action( ‘wpsc_product_addon_after_descr’, wpsc_the_product_id() ); ?>
[/php]