/**
 * wpsc product rater function
 * @return string - HTML to display the product rater
 */
function wpsc_product_rater()
{
    global $wpsc_query;
    $product_id = get_the_ID();
    $output = '';
    if (get_option('product_ratings') == 1) {
        $output .= "<div class='product_footer'>";
        $output .= "<div class='product_average_vote'>";
        $output .= "<strong>" . __('Avg. Customer Rating', 'wp-e-commerce') . ":</strong>";
        $output .= wpsc_product_existing_rating($product_id);
        $output .= "</div>";
        $output .= "<div class='product_user_vote'>";
        $output .= "<strong><span id='rating_" . $product_id . "_text'>" . __('Your Rating', 'wp-e-commerce') . ":</span>";
        $output .= "<span class='rating_saved' id='saved_" . $product_id . "_text'> " . __('Saved', 'wp-e-commerce') . "</span>";
        $output .= "</strong>";
        $output .= wpsc_product_new_rating($product_id);
        $output .= "</div>";
        $output .= "</div>";
    }
    return $output;
}
Example #2
0
/**
* wpsc product rater function
* @return string - HTML to display the product rater
*/
function wpsc_product_rater()
{
    global $wpsc_query;
    if (get_option('product_ratings') == 1) {
        $output .= "<div class='product_footer'>";
        $output .= "<div class='product_average_vote'>";
        $output .= "<strong>" . __('Avg. Customer Rating', 'wpsc') . ":</strong>";
        $output .= wpsc_product_existing_rating($wpsc_query->product['id']);
        $output .= "</div>";
        $output .= "<div class='product_user_vote'>";
        //$vote_output = nzshpcrt_product_vote($wpsc_query->product['id'],"onmouseover='hide_save_indicator(\"saved_".$wpsc_query->product['id']."_text\");'");
        $output .= "<strong><span id='rating_" . $wpsc_query->product['id'] . "_text'>" . __('Your Rating', 'wpsc') . ":</span>";
        $output .= "<span class='rating_saved' id='saved_" . $wpsc_query->product['id'] . "_text'> " . __('Saved', 'wpsc') . "</span>";
        $output .= "</strong>";
        $output .= wpsc_product_new_rating($wpsc_query->product['id']);
        $output .= "</div>";
        $output .= "</div>";
    }
    return $output;
}