I want to show Rating count on the shop page in the product widget, but i’m unable to do it, I’m using reviewx pro. Upon contacting them this is what they said –
“Actually the counter is controlled by the theme, ReviewX pass the data of how many reviews there are in a particular product
but whether it will be displayed or not depends on theme. Please check your theme settings or consult with theme developer whether they have this option or not.”
Kindly resolve asap
Theme version: 9.1.11 WooCommerce version: 7.9.0Hello, Artibdfl,
Thank you for getting in touch with us.
Please note that we do not give a guaranty for full theme compatibility with all existing 3rd party plugins. Sometimes, not always, you need additionally customize the theme or plugin to make them work together. Unfortunately, it’s not possible for the author to make the theme compatible with all the existing plugins and additional customization is outside the scope of our basic support.
Provide the URL of your Shop page, temporary wp-admin, and FTP access, so we can check what can be done to help you.
Kind Regards,
8theme team
Hi!
We tried doing this but were unsuccessful in doing so, kindly help us out on this issue. I’ve provided the details as asked in the private section and access to the staging website as well.
TIA
Hello, Artibdfl,
As we can see, you are working on the site right now, disable/enable plugins, and so on, so we can’t work there at the same time.
Kind Regards,
8theme team
Hi! apologies for that, we are not working on the website from now onwards, till you tell us to do it.
TIA
Hello, Artibdfl,
Thank you for your response.
1/ As we understood you right you meant ratings in Sidebar area → https://prnt.sc/mdz-JoASAeQE (and if it is so then It is displayed from another PWF – Products Filter for WooCommerce plugin but not ReviewX one). In case you mean another area, please provide us more information (screenshots, videos)
2/ By checking the code of PWF – Products Filter for WooCommerce plugin we found that they output rating count html only in case there are at list one rating left for any product → https://prnt.sc/Rv8vIQzNdQS9 and option to show count should be active → https://prnt.sc/4lp9YGTPv7G4 (you had it inactive before)
3/ We tried to check how it works with default WooCommerce theme – Storefront to separate the issue is depended/independed on our theme. But even after installing and activation Storefront theme the frontend is hard cached and didn’t change anything (like XStore theme was still active) = please, check it from your side or figure out why it is so hard cached.
Waiting for your response!
Kind Regards,
8theme team
Hi!
No, we were not looking forward to that, the topic has gone in the wrong direction.
We want to display, rating/review count in the product card in carousels and shop page.
Kindly check the private content area
Hello, Artibdfl,
We attempted to add a code to Code Snippets → Snippet, however, a fatal error occurred after saving https://prnt.sc/aUXgJaq6saP3 . Now, it is necessary to either provide FTP access or revert the changes through the link that will be sent to your email.
To create FTP access (FTP host, FTP username, FTP password, FTP port, FTP encryption) , please contact your hosting provider for assistance.
We are waiting for your response with FTP access.
Kind Regards,
8theme team
Hello, Artibdfl,
Maybe it will be fastest for you to follow the next steps by yourself:
1/ Activate child theme or use Code Snippets plugin.
Download the child theme archive from this page – https://www.8theme.com/downloads/
Go to Appearance > Themes > Install and activate the child theme.
Please note that the child theme does not inherit the theme options of the parent theme, if you enable the child theme, you need to import options from the parent theme.
Go to Theme Options (when the parent theme is activated) > Import/Export > download the export file. After that activate the child theme > go to Theme Options > Import/Export > import your options and reload the page without saving! Save options only after reloading. Check your site after that, and use the child theme.
2/ Add the next code into xstore-child/functions.php OR to plugin new snippet:
add_filter('woocommerce_product_get_rating_html', function($rating_html, $rating, $count) {
global $product;
$rating_html = str_replace('</div>', '<div class="review-count">(' . esc_html( $product->get_review_count() ) . ')</div>'.'</div>', $rating_html);
return $rating_html;
}, 10, 3);
3/ Add the next code into Theme Options > Theme custom CSS:
.star-rating .review-count {
font-size: 1rem;
display: inline-block;
position: absolute;
top: 0;
left: calc(100% + 5px);
}
4/ Result -> https://prnt.sc/-95VsHY2beBq
Kind Regards,
8theme team
Hi!
We implemented the above given code but this is visible upon viewing a variable product and not variation products on shop page. In variation it shows “0” count while in variable “7”.
And on the product page the count is coinciding with the main review detail.
Kindly refer private area for details.
TIA
Hello, Artibdfl,
Thank you for your response.
1/ Site is not working now https://prnt.sc/BwcEz8OFJx-K
2/ FTP access is not provided yet.
We suggest trying something similar to the following code as a replacement (this code takes into account whether it is a product variation and then the rating will be taken from the parent variable product):
add_filter('woocommerce_product_get_rating_html', function($rating_html, $rating, $count) {
global $product;
$product_type = $product->get_type();
$review_count = $product->get_review_count();
if ( $product_type == 'variation' ) {
$parent_product = wc_get_product( $product->get_parent_id() );
$review_count = $parent_product->get_review_count();
}
$rating_html = str_replace('</div>', '<div class="review-count">(' . esc_html( $review_count ) . ')</div>'.'</div>', $rating_html);
return $rating_html;
}, 10, 3);
Kind Regards,
8theme team
Thanks, the issue is resolved
Hello, Artibdfl,
You’re welcome!
Kind Regards,
8theme team
You must be logged in to reply to this topic.Log in/Sign up
One standard license is valid only for 1 project. Running multiple projects on a single license is a copyright violation.