<div class="wps-table">
<?php 
foreach ($comments_for_product as $comment_for_product) {
    if ($comment_for_product->opinion_approved == 1) {
        ?>
	<div class="wps-table-content wps-table-row">
		<div class="wps-table-cell"><?php 
        echo $comment_for_product->author;
        ?>
</div>
		<div class="wps-table-cell"><?php 
        echo mysql2date(get_option('date_format'), $comment_for_product->opinion_date, true);
        ?>
</div>
		<div class="wps-table-cell"><?php 
        echo $comment_for_product->opinion_content;
        ?>
</div>
		<div class="wps-table-cell"><?php 
        echo wps_opinion_ctr::display_stars($comment_for_product->opinion_rate);
        ?>
</div>
	</div>
<?php 
    }
}
?>
</div>
    ?>
</option>
						<?php 
}
?>
					</select>
				</div>
			</div>
		   <div>
		   	<label for="wps-opinion-stars"><?php 
_e('Star rate', 'wps_opinion');
?>
</label>
			   	<div class="wps-form" id="wps-opinion-star-container">
			   		<?php 
$wps_opinion_ctr = new wps_opinion_ctr();
echo $wps_opinion_ctr->display_stars(0);
?>
			   	</div>
		   </div>
	   </div>

	</div>

</form>
<div class="wps-form-group">
	<button class="wps-bton-first-rounded" id="wps-save-opinion"><?php 
_e('Save your opinion', 'wps_opinion');
?>
</button>
</div>
Ejemplo n.º 3
0
<div class="wps-table-content wps-table-row">
		<div class="wps-table-cell"><?php 
echo mysql2date(get_option('date_format'), $posted_opinion->opinion_date, true);
?>
</div>
		<div class="wps-table-cell">
			<?php 
$product = get_post($posted_opinion->opinion_post_ID);
if (!empty($product) && !empty($product->post_type)) {
    if ($product->post_type == WPSHOP_NEWTYPE_IDENTIFIER_PRODUCT_VARIATION) {
        $product = get_post($product->post_parent);
    }
}
echo $product->post_title;
?>
		</div>
		<div class="wps-table-cell"><?php 
echo $posted_opinion->opinion_content;
?>
</div>
		<div class="wps-table-cell"><?php 
echo wps_opinion_ctr::display_stars($posted_opinion->opinion_rate);
?>
</div>
</div>