Hi,
I bought PT a month or so ago and I'm just getting my head around it. It's absolutely fantastic, congrats and thank you!
Question regarding ratings. First of all, is it possible to have a star rating or use my own star images? Secondly, is it possible to include reviews and review form on the product page so they're mot two separate pages?
Cheers :)
Thank you that worked perfectly. Is it possible to remove "Review This Product" link which appears below the product description?
Hi Phil,
I've just updated the modified version to remove those links...
Cheers,
David.
Hi David,
I am really having fun with PT, it's fantastic! I have moved the ratings to below the product but there is still the "Review this product" which occurs in product.php. I think this is the (extraHTML) bit of the script as I have been able to move it to underneath the title but I want the link to go to example.com/sub/product.php?q=PRODUCT#review not example.com/sub/reviews.php?q=PRODUCT.
Is this possible?
Cheers
Phil
Hi Phil,
Sure - that can be done. You're right - the link is generated by the extraHTML variable, which itself contains a link generated by the reviewHREF link in products.php. Look for the following section (beginning at line 20 in the distribution):
if ($config_useRewrite)
{
$rows[$k]["merchantHREF"] = "../merchant/".tapestry_hyphenate($row["merchant"])."/";
$rows[$k]["reviewHREF"] = "../review/".tapestry_hyphenate($row["name"]).".html";
}
else
{
$rows[$k]["merchantHREF"] = "search.php?q=merchant:".urlencode($row["merchant"]).":";
$rows[$k]["reviewHREF"] = "reviews.php?q=".urlencode($row["name"]);
}
...and change this as follows based on the link you want to use instead:
if ($config_useRewrite)
{
$rows[$k]["merchantHREF"] = "../merchant/".tapestry_hyphenate($row["merchant"])."/";
$rows[$k]["reviewHREF"] = "../product/".tapestry_hyphenate($row["name"]).".html#review";
}
else
{
$rows[$k]["merchantHREF"] = "search.php?q=merchant:".urlencode($row["merchant"]).":";
$rows[$k]["reviewHREF"] = "reviews.php?q=".urlencode($row["name"])."#review";
}
The second section isn't actually relevant as you are using rewrite, but it makes the modification complete for other users's benefit...
Cheers,
David.
Perfect :)
OK, 3 more things for the ratings..sorry if I'm overcomplicating things!
1. Is it possible to add an extra field for name, and then obviously display the name with the review?
2. How do I make all the fields mandatory?
3. Can I delete reviews, or does that require going into the database itself? I just want to delete the reviews I have already published if number 1 is possible.
Thanks so much
Phil
Hi
I'm also trying to add the UGC reviews to the product page, rather than a distinct /review/ page and I think that this poster's solution is what I need. The link to the updated .zip file is now dead, is it possible to post the replacement code for the product, as well as the code that handle the URL (which is what I understand the code example is) ?
Thanks
Rob
Hi Phil,
Sure - you can replace the images star rating images if you like - they're in the images/ folder. The filenames are [rating].gif for the large version (used on search result and product page), and [rating]s.gif for the small version (used in featured products).
It is possible to include the review and ratings code on the product page (products.php), but involves a bit of copy and pasting so i've made the changes to the original version and uploaded it to the support directory {link saved} If you've made any changes to the original since installation just merge the modifications across instead of uploading over your modified version...
Cheers,
David.