Have your say in Community Polls: What was/is your greatest motivation to start your own business?

NEED CODE HELP! TRYING TO REMOVE ORIGINAL REVIEW SECTION

Solved

NEED CODE HELP! TRYING TO REMOVE ORIGINAL REVIEW SECTION

probikelock
Tourist
3 0 1

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 

Screen Shot 2020-08-19 at 4.43.37 PM.png

Accepted Solution (1)

diego_ezfy
Shopify Partner
2970 571 917

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.

View solution in original post

Replies 10 (10)

diego_ezfy
Shopify Partner
2970 571 917

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.

probikelock
Tourist
3 0 1

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!! 🙂

diego_ezfy
Shopify Partner
2970 571 917

@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.

probikelock
Tourist
3 0 1

@diego_ezfy wow, much appreciated!!

Have a great day as well.

David315
Visitor
1 0 0

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

4EE8D40A-791B-4297-AF2D-5017ABD16D5E.png9860828B-F5B0-4A0D-A046-F9148EAB5F67.png

 

whiteandblu
Excursionist
18 0 5

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:

Screenshot 2021-07-12 at 21.02.19.png

https://www.whiteandblujewellery.com/collections/gold-finished-rings/products/mykonos-ring

Thanks

diego_ezfy
Shopify Partner
2970 571 917

@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>

 

diego_ezfy_0-1626125387188.png

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

whiteandblu
Excursionist
18 0 5

Worked! Thanks Diego for your help really appreciate it!

AwakeInv
Visitor
1 0 1

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.

Screenshot (2).png

zaazystore
Visitor
1 0 0

Is the problem solved, awakelnv?