product reviews template question

Questions and answers about ShopSite Custom Templates

product reviews template question

Postby lneibauer » Thu Jan 14, 2016 2:26 pm

All,
I am working on adding product reviews section to my more information pages and I wrote this if then statement:

[-- IF REVIEWS --]<span class="reviews-brief">[-- REVIEWS_STARS --][-- REVIEWS_COUNT --][-- REVIEWS_READ_REVIEWS_LINK --]</span>[-- ELSE --][-- REVIEWS_WRITE_FIRST --][-- REVIEWS_WRITE_REVIEW_LINK --][-- END_IF --]

The starts show up if the product is reviewed but if the product DOES NOT have a product review I want it to tell the customer and then ask them to write a review. I set my text in the reviews configuration so that the text shows up but the [-- REVIEWS_WRITE_FIRST --] and [-- REVIEWS_WRITE_REVIEW_LINK --] do not seem to do anything. This is my first go at adding product reviews and I can't seem to find a heck of a lot of documentation. Can someone please explain what I might be doing wrong? All of the code up to the ELSE statement is working the way I expect it to, I still need to tweak it a little but it is working

Is there a shopsite product template out there that has product review code in it that I can look at?

thanks in advance
lneibauer
 
Posts: 110
Joined: Tue Sep 30, 2014 7:13 am
Location: Warminster, PA

Re: product reviews template question

Postby ShopSite Lauren » Fri Jan 15, 2016 3:47 pm

Those tags are correct (you should only need the [-- REVIEWS_WRITE_FIRST --] tag...that creates a link with "Be the first one to write a review" text.

However my guess is that your reviews are configured so that customers need to purchase in order to write a review. If that is the case, then the 'write a review' link won't ever be displayed on your website. The only way customers can write a review is by clicking the "write a review" link in the email they get after purchasing an item. To change this setting so that customers can write a review on the website as well, you will want to go to Merchandising > Reviews > Configure, and uncheck the second checkbox on the page...

Who can write a review [ ] Shoppers must purchase a product before reviewing it
- ShopSite Lauren
Contact me for help with any of your
custom ShopSite template questions.
ShopSite Lauren
 
Posts: 889
Joined: Fri Aug 11, 2006 1:35 pm
Location: Orem, UT

Re: product reviews template question

Postby lneibauer » Tue Jan 19, 2016 8:39 am

Thanks Lauren, I did check the setting and you were correct, I had the check box selected to only accept reviews after purchase, I have turned that off but I still only see the text from my reviews configuration screen that say "there are currently no reviews available"

I did update my if then string as per your suggestion to:
[-- IF REVIEWS --]<span class="reviews-brief">[-- REVIEWS_STARS --][-- REVIEWS_COUNT --][-- REVIEWS_READ_REVIEWS_LINK --]</span>[-- ELSE --][-- REVIEWS_WRITE_FIRST --][-- END_IF --]

what else could I be missing? The stars and the review count do show up but the link to write the review does not.

thanks
lneibauer
 
Posts: 110
Joined: Tue Sep 30, 2014 7:13 am
Location: Warminster, PA

Re: product reviews template question

Postby ShopSite Lauren » Tue Jan 19, 2016 8:56 am

I should have looked at your if statement closer. Your if statement says "if the reviews feature is enabled, display the stars/reviews. If the reviews feature is not enabled, display the write a review link." which won't display the link in either case. You will want to change your IF REVIEWS to be a tag that checks if the product has reviews. So change your IF/ELSE statement to be:

[-- IF Reviews_Count_Number GT "0" --]<span class="reviews-brief">[-- REVIEWS_STARS --][-- REVIEWS_COUNT --][-- REVIEWS_READ_REVIEWS_LINK --]</span>[-- ELSE --][-- REVIEWS_WRITE_FIRST --][-- END_IF --]
- ShopSite Lauren
Contact me for help with any of your
custom ShopSite template questions.
ShopSite Lauren
 
Posts: 889
Joined: Fri Aug 11, 2006 1:35 pm
Location: Orem, UT

Re: product reviews template question

Postby lneibauer » Tue Jan 19, 2016 10:32 am

That worked perfectly! Thank you!

I just have one additional question: how can I adjust the line spacing between the product title and the stars? I do not see it in the Theme CSS. If there a special place to edit the CSS Line spacing

thanks
lneibauer
 
Posts: 110
Joined: Tue Sep 30, 2014 7:13 am
Location: Warminster, PA

Re: product reviews template question

Postby ShopSite Lauren » Tue Jan 19, 2016 10:44 am

If this is in a custom template, then there isn't any default CSS, so you will want to add your own CSS. The code should already have classes and/or IDs, so you can look at the code that is being output and add your own CSS styles.
- ShopSite Lauren
Contact me for help with any of your
custom ShopSite template questions.
ShopSite Lauren
 
Posts: 889
Joined: Fri Aug 11, 2006 1:35 pm
Location: Orem, UT

Re: product reviews template question

Postby lneibauer » Tue Feb 16, 2016 10:41 am

Is there a ShopSite tag that will just give me the review stars followed by the number of reviews, kind of like what amazon does?
lneibauer
 
Posts: 110
Joined: Tue Sep 30, 2014 7:13 am
Location: Warminster, PA

Re: product reviews template question

Postby ShopSite Lauren » Wed Feb 17, 2016 1:38 pm

[-- REVIEWS_STARS --] - displays the stars
[-- REVIEWS_COUNT --] and [-- REVIEWS_COUNT_NUMBER --] both will give the number of reviews (in slightly different formats, so choose which works best for you).
- ShopSite Lauren
Contact me for help with any of your
custom ShopSite template questions.
ShopSite Lauren
 
Posts: 889
Joined: Fri Aug 11, 2006 1:35 pm
Location: Orem, UT


Return to Custom Template Questions

Who is online

Users browsing this forum: No registered users and 10 guests

cron