Zen Cart Logo
Forums / General Questions / Category or product type specific reviews

Category or product type specific reviews

Locked

Views: 963

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
29 Aug 2007, 4:41 PM
#1
awhfy99 avatar

awhfy99

Zen Follower

Join Date:
Feb 2007
Location:
Burleson. Texas
Posts:
196
Plugin Contributions:
0

Category or product type specific reviews

I can't seem to find this asked or answered anywhere so here goes!

What I am looking to do is to have the review option product (maybe category) specific. The first product is mainly one-of's and the review option doesn't make too much sense, but the other is virtual, and it would make great sense to have reviews. The products would be in different categories, so the option could be either category or type specific, or both. It would be great if they showed in a sidebox that was also category specific. I believe I have checked every option in admin and came up dry, so I thought I would see if I am missing something of if this is not possible. Any ideas?!

30 Aug 2007, 11:54 PM
#2
brandtim avatar

brandtim

Zen Follower

Join Date:
Apr 2006
Posts:
250
Plugin Contributions:
0

Re: Category or product type specific reviews

If I'm understanding correctly, this is two separate pieces:

  1. Have the 'write a review' and 'read the reviews' buttons/links only appear on the pages for specific products and/or categories

  2. Have the Reviews sidebox only appear on certain pages and only include reviews of specific products filtered by product and/or category

For the first one, in your includes/templates/YOUR_TEMPLATE/templates/tpl_product_info_display.php file, change the Reviews button and count code to this:

<!--bof Reviews button and count-->
<?php
  if (($flag_show_product_info_reviews == 1) && ((int)$_GET['cPath']==XX || (int)$_GET['products_id']==YY)) {
    // if more than 0 reviews, then show reviews button; otherwise, show the "write review" button
    if ($reviews->fields['count'] > 0 ) { ?>
<div id="productReviewLink" class="buttonRow back"><?php echo '<a href="' . zen_href_link(FILENAME_PRODUCT_REVIEWS, zen_get_all_get_params()) . '">' . zen_image_button(BUTTON_IMAGE_REVIEWS, BUTTON_REVIEWS_ALT) . '</a>'; ?></div>
<br class="clearBoth" />
<p class="reviewCount"><?php echo ($flag_show_product_info_reviews_count == 1 ? TEXT_CURRENT_REVIEWS . ' ' . $reviews->fields['count'] : ''); ?></p>
<?php } else { ?>
<div id="productReviewLink" class="buttonRow back"><?php echo '<a href="' . zen_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, zen_get_all_get_params(array())) . '">' . zen_image_button(BUTTON_IMAGE_WRITE_REVIEW, BUTTON_WRITE_REVIEW_ALT) . '</a>'; ?></div>
<br class="clearBoth" />
<?php
  }
}
?>
<!--eof Reviews button and count -->

Just add as many cPath and products_id values as you need. The buttons/links will only show up on pages that match at least one of those values. You can add as many as you need - just be sure to use OR ( || ) to separate them.

For #2, can you describe in more detail exactly which categories/products pages the sidebox should appear on? Also, do you want to limit the reviews displayed in the sidebox based upon some combination of categories or products criteria?

BrandTim

31 Aug 2007, 12:34 PM
#3
awhfy99 avatar

awhfy99

Zen Follower

Join Date:
Feb 2007
Location:
Burleson. Texas
Posts:
196
Plugin Contributions:
0

Re: Category or product type specific reviews

:smile: Thanks, I will give that a try. It looks like what I am shooting for!

The second was for a scenerio like this:

When accessing category #2 (just virtual products), a side box appears that randomly displays reviews of products listed within that category. The random selection would change if another category with different virtual product types was entered. It would kinda treat reviews like new products (or images). Hope that makes sense, I've been up for nearly 30 hrs and I'm getting a little punchy. :blink:

1 Sep 2007, 2:01 PM
#4
brandtim avatar

brandtim

Zen Follower

Join Date:
Apr 2006
Posts:
250
Plugin Contributions:
0

Re: Category or product type specific reviews

Glad that's what you were looking for.

I'm afraid I'm still a little lost on #2 - are you describing what's happening now or what you want to happen?

Get yourself some sleep (I'm sure you deserve it :smile:) and then we'll try to make some more headway on this....

BrandTim

5 Sep 2007, 11:25 PM
#5
awhfy99 avatar

awhfy99

Zen Follower

Join Date:
Feb 2007
Location:
Burleson. Texas
Posts:
196
Plugin Contributions:
0

Re: Category or product type specific reviews

I took a different approach to this non-issue. I just admin'd reviews and then created a product called reviews (virtual w/o a price or qty), I then created images out of the text (called them review_1, review_2, etc.). Since there are only two products in the category, the user can read the product desc. and/or the reviews. I did this so that there would be quick access to them, since that is the one product most likely to attract any reviews, Sounds strange when I put it into words, but it has the desired effect.