Hello David,
I try to figure out how I can realize a review-link into related products on the product-detail-page that also counts reviews from related product. I posted the Screenshot for better understanding.
I uploaded here: {link saved}
It would be pretty to solve this.
Thanks in advance.
Almir
Hello David,
thank you for providing the solution. The only thing I need is the Counter as many reviews stored on the product are.
Similar on the detail page (as x Reviews) below the price.
Best regards, Almir.
Hello Almir,
The count should be displayed; but only where there is at least 1 review. The above code should display
3 Reviews
or
Review This Product
(exactly as the product page)
If that doesn't seem to be the case after testing against a product that definitely has reviews (don't forget to moderate them in from /admin/ if testing), if you could post your full html/searchresults.php I'll check it out...
Cheers,
David.
--
PriceTapestry.com
Yeah man, you're right!
I was blind to this part!!
Thanks & Best regards!
Almir
Hello Almir,
Sure - related products HTML is actually generated by the searchresults HTML module (html/searchresults.php to the following instructions would relate to both but of you don't require the review link on search result pages that can be fixed easily. In your file, look for where the description is displayed, similar to the following code from the distribution version:
<p><?php print tapestry_substr($product["description"],250,"..."); ?></p>
...and immediately after this point; add the following code to generate your review link:
if ($product["reviews"])
{
$reviewHTML = "<p>".tapestry_stars($product["rating"],"")." <a href='".tapestry_reviewHREF($product)."'>".$product["reviews"]." ".translate("Reviews")."</a></p>";
}
else
{
$reviewHTML = "<p><a href='".tapestry_reviewHREF($product)."'>".translate("Review This Product")."</a></p>";
}
print $reviewHTML;
Hope this helps!
Cheers,
David.
--
PriceTapestry.com