Print Available Testimonial & Product Count

I have attached a screenshot of random found store of how it looks in google search.

Pay attention it is not a product page that was found, but store root page with something like a review or testimonial block you can do in cs-cart.

But I hardly believe cs-cart store with such testimonial block would be presented this nicely like in my attachment.

So question would be how do I achieve this result ?

reviews.jpg

I have attached a screenshot of random found store of how it looks in google search.

Pay attention it is not a product page that was found, but store root page with something like a review or testimonial block you can do in cs-cart.

But I hardly believe cs-cart store with such testimonial block would be presented this nicely like in my attachment.

So question would be how do I achieve this result ?

By adding rich snippets to your reviews using schema.org. Furthermore, you might not see the reviews in Google although you have rich snippets enabled. Google decides whether the 'stars' will be displayed or not.

Best wishes,

Yea but currently there is no way for google to know how many reviews you got total at all..

By adding rich snippets to your reviews using schema.org. Furthermore, you might not see the reviews in Google although you have rich snippets enabled. Google decides whether the 'stars' will be displayed or not.

Best wishes,

Yea but currently there is no way for google to know how many reviews you got total at all..

Thats why you would have to add the rich snippets yourself, unless you want me to do it for you. If this is the case please send me a PM.

I will ask different, is there a way to load total testimonial amount number in to smarty block ?

I will ask different, is there a way to load total testimonial amount number in to smarty block ?

Try

{$properties = []}
{assign var="discussion" value=0|fn_get_discussion:"E":true:$properties}
{if $discussion && $discussion.type != "D" && $discussion.posts}
    {$discussion.posts|count}
{/if}

(!) Not tested

This code works incorrect. What it does is print number 10, then if page has any reviews no matter what limit to lead is 1 or 3, block loads 10 same as printed number..

This code works incorrect. What it does is print number 10, then if page has any reviews no matter what limit to lead is 1 or 3, block loads 10 same as printed number..

Right, the following setting is used here

Add-ons -> Manage add-ons -> Comments and reviews -> Testimonials -> Posts per page

Try the modified code

{$properties = ["limit" => 999]}
{assign var="discussion" value=0|fn_get_discussion:"E":true:$properties}
{if $discussion && $discussion.type != "D" && $discussion.posts}
    {$discussion.posts|count}
{/if}

This does print out correct number of available testimonials! :) thanks a lot

Maybe you also can point me to how to print total number of products in shop ?

Just basic number what you get by making empty search on demo site "Products found: 241"

You can try

{"SELECT COUNT(product_id) FROM ?:products WHERE status = ?s"|db_get_field:'A'}

This is lightweight and fast query, but it does not take into account usergroups, products without prices, etc. Only product status is checked

Can this show only in stock products?

Can this show only in stock products?

Try the following code if you do not use inventory by option combinations

{"SELECT COUNT(product_id) FROM ?:products WHERE status = ?s AND amount > 0"|db_get_field:'A'}

good input

Perfect thanks!

Try the following code if you do not use inventory by option combinations

{"SELECT COUNT(product_id) FROM ?:products WHERE status = ?s AND amount > 0"|db_get_field:'A'}