- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2015
07:07 PM
08-04-2015
07:07 PM
if($review): .... but what if no review?
I am working on one of the pages and there is code to display the review summary if there is a review. What I want to do is show something if there is NO review. Maybe the grayed out stars?
Can someone help me with this?
<?php if($review): ?> <?php echo $this->getReviewSummaryHtml($_product) ?> <?php endif; ?>
Thanks!
Labels:
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2015
10:59 PM
08-04-2015
10:59 PM
Re: if($review): .... but what if no review?
<?php if(!$review): ?> /* Do something */ <?php endif; ?>
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2015
12:35 AM
08-05-2015
12:35 AM
Re: if($review): .... but what if no review?
<?php if($review): ?> <?php echo $this->getReviewSummaryHtml($_product) ?> <?php else: ?>
// display grayed out stars <?php endif; ?>
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2015
08:57 AM
08-05-2015
08:57 AM
Re: if($review): .... but what if no review?
Putting the else statement always gave me an error on the page, not sure why. It seems as though it's a simple add-in, but nothing seems to work for me.