Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Review Filter


dailce

Recommended Posts

When I get customer reviews all is well, the reviews are there. Now with OSC the customer can go to the product page and then click reviews and see all the reviews for that product. However, when they go to the reviews.php page to see reviews all the reviews show up. I don't mind this, but is there a way to apply a filter to the reviews.php page.

 

I looking to make it possible to to have a filter for all the reviews, so people can easily browse all the reviews?

Link to comment
Share on other sites

No not really.

 

Product 1 has 5 reviews

Product 2 has 4 reviews

Product 3 has 8 reviews

 

In reviews.php the reviews are displayed in the order they were written with partial comments.

 

Product 3 has "nice review..." <-- click on this and you get to see the full review.

Product 2 has "nice review..."

Product 1 has "nice review..."

Product 3 has "nice review..."

Product 1 has "nice review..."

Product 3 has "nice review..."

 

I want to make a filter somehow, in reviews.php so that we can display

 

Product 1 has 5 reviews <-- click and you will see all the reviews for this product

Product 2 has 4 reviews

Product 3 has 8 reviews

 

 

I guess I just need a way to count the reviews for each product, how can I do this?

Link to comment
Share on other sites

So you should set up a new select statement like select products_id, count(products_id) from reviews group by products_id.

 

This will bring up the number of reviews for each product. Then set up a link with the according parameters, so when you return to the page you can determine via a switch statement to display all of the reviews for the selected product.

Link to comment
Share on other sites

  • 6 months later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...