Hi, we need to modify the review module to suit our site.
Where is the file that I need to edit? I looked in directories but couldn’t find review.php (I see it called in the loop-single).
We have custom fields that specify venue, actor names, etc. that will go with the review. So we plan to pull them into the existing box. Hopefully this will work as we have about 6 years of reviews!
Thanks! We may instead use the Newsmag system as it is very good.
I’d like to copy over our custom field “Rating” (0-5 with 0.5 stars) to the DB field used by the theme.
Any suggestions if this would be fairly straightforward? SQL query?
Cheers,
Clint
Hi,
Theme’s reviews are stored under td_review in the database: http://screencast.com/t/ZwevkAKW – http://screencast.com/t/ZwevkAKW
This is the theme’s review settings: http://screencast.com/t/N4jgbQMghX6F
Not sure how you could easily do this. A SQL query update could work, anyways you need custom work for this so I suggest you get someone to help you with that if you can manage it by yourself as we cannot provide custom work right not because we work hard on development, fixes and support so you might look for a freelancer on site’s like http://studio.envato.com/
Thanks
Thanks. I think we will use the TD review system instead to avoid complication. It looks great.
One change I want to make is instead of showing ‘OVERALL SCORE’ to a word related to the score.
E.G. 5 stars = ‘AWESOME’
4.5 stars = ‘ VERY GOOD’
etc
We are familiar with if/else and I see where to modify line in td_review.php.
What would syntax be, something like:
if the_field (‘rate’) = 5 stars, $rateword=’AWESOME’;
$buffy .= ‘<span>’ . __td($rateword, TD_THEME_NAME) . ‘</span>’;
Just not sure of correct syntax. I hope you can advise on this 1 change, the theme is awesome and love the modular structure!
Clint
Hi,
It would be something like this: http://screencast.com/t/z58xWU0O – http://pastebin.com/NSzK3vbX
Result: http://screencast.com/t/10wp9G7BKgUv
Thanks
Brilliant thanks, works a charm. Final code:
if (self::calculate_total($td_review) == 5) {
$buffy .= ‘<span>’ . __td(‘OUTSTANDING – STARKIE!’, TD_THEME_NAME) . ‘</span>’;
} elseif(self::calculate_total($td_review) == 4.5) {
$buffy .= ‘<span>’ . __td(‘RIGHT ON THE MONEY’, TD_THEME_NAME) . ‘</span>’;
} elseif(self::calculate_total($td_review) == 4) {
$buffy .= ‘<span>’ . __td(‘SMASHING’, TD_THEME_NAME) . ‘</span>’;
} elseif(self::calculate_total($td_review) == 3.5) {
$buffy .= ‘<span>’ . __td(‘SWEET STUFF’, TD_THEME_NAME) . ‘</span>’;
} elseif(self::calculate_total($td_review) == 3) {
$buffy .= ‘<span>’ . __td(‘WORTH A LOOK’, TD_THEME_NAME) . ‘</span>’;
} elseif(self::calculate_total($td_review) == 2.5) {
$buffy .= ‘<span>’ . __td(‘COMME CI, COMME ÇA’, TD_THEME_NAME) . ‘</span>’;
} elseif(self::calculate_total($td_review) == 2) {
$buffy .= ‘<span>’ . __td(‘BOOHOO’, TD_THEME_NAME) . ‘</span>’;
} else {
$buffy .= ‘<span>’ . __td(‘OVERALL SCORE’, TD_THEME_NAME) . ‘</span>’;
}
Oh, one more thing. We have about 5 custom fields we add to every review that includes venue, directors, actors, etc.
One example custom field is called ‘review-where’.
How do I push that field to the review module, right below ‘SUMMARY’ section?
My current code is:
<?php if((get_post_meta(get_the_ID(),”review-where”,true))) { ?>
<?php echo get_post_meta(get_the_ID(), “review-where”, true); ?><?php } ?>
Thanks again, I’m absolutely blown away by you guys!
Hi,
Add your code to the render table function here: http://screencast.com/t/dlZyhfbK
I suggest you get someone to help you with this if you don’t know how to do it yourself as you need custom work for this which we cannot provide as we work hard on development fixes and support. You can always get a freelancer from site like: http://studio.envato.com/
Thanks
Thanks Lucian! I am so close (I can’t afford to hire freelancer). I added this line and the if works, but won’t output:
if((get_post_meta(get_the_ID(),”review-where”,true))) {$buffy.=’.get_post_meta(get_the_ID(), “review-where”, true).’;}
I know syntax is incorrect on 2nd part. How to I make it execute .get_post_meta command instead of echo?
If I know this I can do rest no problem! So close!
Clint
I think I got it! Here’s code I used, hopefully ok 🙂
$buffy .= ‘<div class=”td-review-summary-content”>’;
$venue = get_post_meta( get_the_ID(), ‘review-where’, true);if (!empty($venue)) {$buffy.=”.$venue.”;}
$buffy .= ‘</div>’;
Ah, all for not. I’ve decided to use your core review code as is!
Hi, last question on this one.
I see this in each loop:
<?php echo $td_mod_single->get_review();?>
But where is if statement located to check if “Is product review” (and thus execute td_review.php)?
Thanks!