function getProductPrice($level, $productid)
{
    global $wpdb;
    //echo "\$level: ".$level;
    $post_id = getPostbyProductID($productid);
    $level = $level > 1 ? $level - 1 : 0;
    if ($level == 0) {
        $sql_prod = "SELECT * FROM " . $wpdb->prefix . "ign_products WHERE id = '" . $productid . "'";
        $product_data = $wpdb->get_row($sql_prod);
        return $product_data->product_price;
    }
    //echo "ign_product_level_".$level."_price<br />";
    //echo "post_oid: ".$post_id;
    $level_price = get_post_meta($post_id, $name = "ign_product_level_" . $level . "_price", true);
    //$level_desc = get_post_meta( $post->ID, $name="ign_product_level_".$order_data->product_level."_desc", true );
    return $level_price;
}
Example #2
0
<?php

$options = get_option('fivehundred_theme_settings');
if (!empty($options['home'])) {
    $project_id = $options['home'];
    if (class_exists('Deck')) {
        $new_hdeck = new Deck($project_id);
        if (method_exists($new_hdeck, 'hDeck')) {
            $hDeck = $new_hdeck->hDeck();
        } else {
            $hDeck = the_project_hDeck($id);
        }
        $id = getPostbyProductID($project_id);
        //$hDeck = the_project_hDeck($id);
        $permalinks = get_option('permalink_structure');
        $summary = the_project_summary($id);
        do_action('fh_hDeck_before');
        $video = the_project_video($id);
    }
}
if (isset($hDeck)) {
    ?>
<div id="ign-hDeck-wrapper">
	<div id="ign-hdeck-wrapperbg">
		<div id="ign-hDeck-header">
			<div id="ign-hDeck-left">
				<div class="video <?php 
    echo !empty($video) ? 'hasvideo' : '';
    ?>
" style="background-image: url(<?php 
    echo $summary->image_url;
echo $tr_Date;
?>
</b></a></th>
			</tr>
		</thead>
		<?php 
if (count($items) > 0) {
    $item_array = array();
    $i = 0;
    foreach ($items as $item) {
        $item_array[$i] = $item;
        $i++;
    }
    for ($i = 0; $i < count($item_array); $i++) {
        $product_id = $item_array[$i]->product_id;
        $post_id = getPostbyProductID($product_id);
        $project = new ID_Project($product_id);
        $cCode = $project->currency_code();
        ?>
				<tr>
					<td valign="top"><?php 
        echo $item_array[$i]->id;
        ?>
</td>
					<td valign="top" class="alternatetd"><?php 
        echo stripslashes(html_entity_decode($item_array[$i]->first_name)) . " " . stripslashes(html_entity_decode($item_array[$i]->last_name));
        ?>
</td>
					<td valign="top"><?php 
        echo isset($product_array[$product_id]) ? stripslashes($product_array[$product_id]) : '';
        ?>