Ghost reviews for duplicate products in catalogue
-
I have duplicated products in my catalog to create new products.
I found that the new products have the same number of reviews of the duplicate product, but no real review is visible..Help me, please ??
WordPress v5.2.2
Woocommerce v3.6.5
Site Reviews v3.5.4
-
This is happening because when you clone a product that has assigned reviews, it also clones the meta data of the product which includes the saved rating counts used for the Site Reviews summary.
Rebuilding the rating counts on the Site Reviews Tools page will not work in this case because your reviews do not reference the cloned product as having had reviews assigned to it.
In order to fix this:
1. Install the Code Snippets plugin
2. Create a new snippet and paste in the code from this link: https://pastebin.com/x0VFeHeY
3. Select the, “Only run in administration area” option and activate the snippet.
4. Edit your cloned product page and delete the following fields using the Custom Fields Metabox:_glsr_average
_glsr_count
_glsr_ranking
Once you have finished doing that with all of your cloned products, go to the Site Reviews > Tools page and hit the “Recalculate Counts” button.
Thanks you so much for your reply, but after I remove the values, recalculate the counts (and empty all caches) nothing happened ??
In the frontend product view I see also the reviews..
- This reply was modified 5 years, 4 months ago by ranone.
Please make sure that you are using the assign_to/assigned_to options correctly.
Also, I recommend that you use
post_id
as the value instead of entering the actual numerical post ID.For example:
[site_reviews assigned_to=post_id]
[site_reviews_summary assigned_to=post_id]
[site_reviews_form assign_to=post_id]
Hi, this is my code into product pages:
add_action( 'woocommerce_after_single_product_summary', 'add_reviews_code_for_products', 10 ); function add_reviews_code_for_products() { echo do_shortcode('[site_reviews_summary assigned_to=post_id hide=rating,if_empty][site_reviews assigned_to=post_id schema=true][site_reviews_form assign_to=post_id category="prodotti" title="Scrivi una recensione"]'); }
It’s all as you suggested, but not work.. ??
1. Better to use the do_shortcode function once for each shortcode.
echo do_shortcode('[site_reviews]'); echo do_shortcode('[site_reviews_summary]');
2. There is a bug in the current version of Site Reviews that will affect the review counts when you assign reviews to both a category and a page.
Even when v3.6 is real sad which fixes this, it is still recommended for performance sake to only use one or the other.
To fix this, you will need to follow the steps below:
1. Remove all categories from Site Reviews.
2. Go to the Site Reviews > Tools page and recalculate counts.
2. Only use either the assign_to/assigned_to options OR the category option going forwards, but not both.Hi,
1. ok for use do_shortcode function once for each shortcode
2. I didn’t understand the difference between “when assigning reviews to both category and a page”..
The v3.6, when will it be released? Will version 3.6 automatically fix the bug or will it still be necessary to fix something?
Thanks
Site Reviews allows you to assign reviews to the ID or slug of a category, for example:
[site_reviews_form category=apartment]
Site Reviews also allows you to assign reviews directly to the ID of a page or post:
[site_reviews_form assign_to=13]
Site Reviews also allows you to do both at the same time:
[site_reviews_form category=apartment assign_to=13]
BUT, the current version has a bug that will mess up your review counts if you use both options together.
This is BAD:
[site_reviews_form category=apartment assign_to=13]
This is GOOD:
[site_reviews_form category=apartment]
OR
[site_reviews_form assign_to=13]
But not both!The next version of Site Reviews will fix this bug and recalculate the rating counts once you update.
HOWEVER, I still recommend that even with v3.6 you do not use both options. The reason for this is performance. If you use both options, Site Reviews will not be able to cache the review counts which means it may slow down your website if you have lots of reviews.
So, to fix the problem you are having:
1. Remove the
category
option from all of the Site Reviews shortcodes that you are using.
2. Delete any Site Reviews categories that you have created
3. Go to the Site Reviews Tools page and recalculate the rating counts.Thank you very much for the clear explanation!
I did as you told me:
– separated shortcodes
– removed the categories from the shortcodes
– deleted the categories from the SiteReviews plugin (now no reviews have assigned categories)
– I recalculated the rating counts from SiteReviews > Tools
– I cleaned every cache (browser, server, CDN)I unfortunately still have the ghost reviews ??
Please go to the “Site Reviews > Documentation > Support” page and follow the steps in the “Contact Support” section to contact me directly.
ok ??
I am unsure why this happened. It could have been a side effect from previously assigning reviews to both a category and a product.
Either way, the next major version of Site Reviews should fix this once released as it handles WordPress post events better, fixes the rating summary calculation for categories, and performs a deeper rating re-calculation from the Tools page.
However, if you notice this happening again in v3.5, here is how to fix it:
1. Submit a test review that is assigned to the product with the ghost reviews
2. Approve the review
3. Edit the review and remove the assigned product, then hit the update button.This should force the rating summary on the product to recalculate.
- The topic ‘Ghost reviews for duplicate products in catalogue’ is closed to new replies.