Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I am using a VITALS app to add reviews from my supplier's site to my Shopify website, BUT I am having trouble removing the original "Reviews: 0", "Write a Review", and "Be the first to review this item" sections at the bottom of my product page (see image). Do you know how I could remove this in the code? Help would be so appreciated!!
Site: probikelock.com
Solved! Go to the solution
This is an accepted solution.
@probikelock
1. In your Shopify Admin go to online store > themes > actions > edit code
2. Find Asset > theme.scss.liquid and paste this at the bottom of the file:
div#stamped-main-widget {
display: none !important;
}
Let me know whether it works.
This is an accepted solution.
@probikelock
1. In your Shopify Admin go to online store > themes > actions > edit code
2. Find Asset > theme.scss.liquid and paste this at the bottom of the file:
div#stamped-main-widget {
display: none !important;
}
Let me know whether it works.
You're awesome, dantepw!! Thank you so much for a quick response - and one that helped!! That whole section from my image went away when I added the coding you suggested.
I had tried a few other codes earlier that I saw on other posts but they didn't work for my situation. Thank you thank you!! 🙂
@probikelock
You're welcome! I'm glad I could be of help. Whenever you need feel free to e-mail me personally.
Wishing you a great day.
Hey i am facing a problem of having 0 reviews appear at top of the imported reviews plus be the first one and no reviews i wanna delete them
https://lazyash.com/products/fully-automatic-mixing-cup-fried-juice-cup-milkshake-cup
Hey Diego,
I am facing a similar issue: I use Judgme for the Reviews and they show successfully, however even if I have for example 16 review in a product, at the top it says "(0) REVIEWS" - check out this example:
https://www.whiteandblujewellery.com/collections/gold-finished-rings/products/mykonos-ring
Thanks
@whiteandblu,
1. In your Shopify Admin go to online store > themes > actions > edit code
2. In your theme.liquid file, find the </body> (press CTRL + F or command + F on Mac)
3. paste this code right above the </body> tag:
<script>
async function showTotalReviews(){
function _waitForElement(selector, delay = 50, tries = 250) {
const element = document.querySelector(selector);
if (!window[`__${selector}`]) {
window[`__${selector}`] = 0;
}
function _search() {
return new Promise((resolve) => {
window[`__${selector}`]++;
setTimeout(resolve, delay);
});
}
if (element === null) {
if (window[`__${selector}`] >= tries) {
window[`__${selector}`] = 0;
return Promise.reject(null);
}
return _search().then(() => _waitForElement(selector));
} else {
return Promise.resolve(element);
}
}
const $total = await _waitForElement(`[data-number-of-reviews]`);
if (!$total){
return;
}
const $tab = document.querySelector(`.Product__Tabs .Collapsible__Button:nth-child(1) .text--light`);
if (!$tab){
return
}
const totalReviews = $total.getAttribute(`data-number-of-reviews`).trim();
$tab.innerHTML = `(${totalReviews})`
}
showTotalReviews();
</script>
As long as the reviews are always on the very first tab, this will work. Thorough customizations to automatically find the correct review tab will require more complex coding.
Kind regards,
Diego
Worked! Thanks Diego for your help really appreciate it!
Hi Diego,
Got the same problem.
I plated the code above the </body> as you provided but It did not work on my store, please help.
Is the problem solved, awakelnv?
Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024In today’s interview, we sat down with @BSS-Commerce to discuss practical strategies f...
By JasonH Nov 13, 2024