Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

How Can I Show Number On Product Rating On The Home Page? Rate Topic   - - - - -

 
  • Dexterflamez
  • Senior Member
  • Trial users
  • Join Date: 08-Jan 18
  • 168 posts

Posted 18 November 2019 - 09:51 AM #1

i tried this  ({$product.discussion.search.total_items}) ratings, but it's not working on the homepage but it work on product page



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 20936 posts

Posted 18 November 2019 - 01:01 PM #2

What block do you mean? Did you use correct template? Possibly reviews data is not retrieved from database for this block. To check it, print our the whole array with product data

{$product|fn_print_r}

GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • Dexterflamez
  • Senior Member
  • Trial users
  • Join Date: 08-Jan 18
  • 168 posts

Posted 18 November 2019 - 07:08 PM #3

It's not showing, here is an example of what im trying to do, it works on product page but not the home page or list pages

 

 

Product:

 

Nice black T - shirt

 

X X X X X (4 ratings)



 
  • Dexterflamez
  • Senior Member
  • Trial users
  • Join Date: 08-Jan 18
  • 168 posts

Posted 18 November 2019 - 07:14 PM #4

I also tried to use this {assign var="reviews" value=""|fn_get_discussions}{$reviews[0]|@count} but it show the entire review count but i want it to show the review count for just the product under it's title on the homepage



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 20936 posts

Posted 19 November 2019 - 01:09 PM #5

Try to use

{$product_reviews = $product.product_id|fn_get_discussion:'P':true:$smarty.request}
{$product_reviews|fn_print_r}

GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • Dexterflamez
  • Senior Member
  • Trial users
  • Join Date: 08-Jan 18
  • 168 posts

Posted 19 November 2019 - 09:23 PM #6

 

Try to use

{$product_reviews = $product.product_id|fn_get_discussion:'P':true:$smarty.request}
{$product_reviews|fn_print_r}

WOW!!! you're the man! I appreciate the help, thanks!



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 20936 posts

Posted 20 November 2019 - 05:43 AM #7

You are welcome!


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)