Back to Shopify Liquid
Fake Reviews Block
Shopify Liquid

Fake Reviews Block

Creates a manual testimonial slider with a social proof counter indicating total customer count and star ratings. It features a responsive grid that displays multiple reviews on desktop and transitions to a single-card view on mobile devices using vanilla JavaScript.

EasyTrustProduct Page BasgeCROUrgencySales
200 lines · 5.3 KB
Setup 5–10 minutes 5 min read 199 lines
Key features
  • Responsive multi-column desktop layout
  • Manual navigation arrows with hover effects
  • Integrated social proof counter header
  • Vanilla JavaScript (no jQuery required)
  • Lazy-ready image optimization support
Best use cases
  • Displaying curated customer testimonials on product pages.
  • Adding social proof to landing pages without an external review app.
  • Building trust on a homepage via a manual review carousel.
Compatibility
  • Shopify Online Store 2.0
  • Most Shopify themes

The code

Shopify Liquid
1<!-- INICIO COMENTARIOS FAKE -->
2<div class="testimonial-wrapper">
3 <div class="clients-info">
4 <div class="clients-text">+13.879 Clientes</div>
5 <div class="clients-stars">⭐⭐⭐⭐⭐</div>
6 </div>
7 <div class="testimonial-slider">
8 <div class="testimonial">
9 <img src="https://cdn.shopify.com/s/files/1/0673/9787/7980/files/img1.webp?v=1720587858" alt="Miriam, Barcelona">
10 <h3>Miriam, Barcelona</h3>
11 <div class="stars">⭐⭐⭐⭐⭐</div>
12 <p>Estoy impresionado por lo realista que se ve este papel de mármol. ¡Ha transformado por completo mi baño!</p>
13 </div>
14 <div class="testimonial">
15 <img src="https://cdn.shopify.com/s/files/1/0673/9787/7980/files/img2.webp?v=1720587858" alt="Pilar, Zaragoza">
16 <h3>Pilar, Zaragoza</h3>
17 <div class="stars">⭐⭐⭐⭐⭐</div>
18 <p>El primer vinilo que pego, y la verdad que el resultado para mí es perfecto. ¡Yo lo he utilizado en mi encimera!</p>
19 </div>
20 <div class="testimonial">
21 <img src="https://cdn.shopify.com/s/files/1/0673/9787/7980/files/img3.webp?v=1720587858" alt="Noa, Sevilla">
22 <h3>Noa, Sevilla</h3>
23 <div class="stars">⭐⭐⭐⭐⭐</div>
24 <p>La calidad del material es excelente y la instalación fue muy sencilla. ¡Mi escritorio está como nuevo!</p>
25 </div>
26 <div class="testimonial">
27 <img src="https://cdn.shopify.com/s/files/1/0673/9787/7980/files/img3.webp?v=1720587858" alt="Noa, Sevilla">
28 <h3>Leao, Lima</h3>
29 <div class="stars">⭐⭐⭐⭐⭐</div>
30 <p>Muy buen producto, todo es excelente y la instalación fue muy sencilla. ¡Mi escritorio está como nuevo!</p>
31 </div>
32 <button class="prev"></button>
33 <button class="next"></button>
34 </div>
35</div>
36
37<style>
38.testimonial-wrapper {
39 display: flex;
40 flex-direction: column;
41 align-items: flex-start;
42 max-width: 1200px;
43 margin: auto;
44}
45
46.clients-info {
47 display: flex;
48 align-items: center; /* Alinea el texto y las estrellas verticalmente */
49 padding-left: 20px;
50 margin-bottom: 20px;
51 font-size: 24px;
52 color: #000000;
53}
54
55.clients-text {
56 font-size: 20px;
57 color: #000000;
58 margin-right: 10px; /* Espacio entre el texto y las estrellas */
59}
60
61.clients-stars {
62 font-size: 20px;
63 color: #FFD700; /* Color dorado para las estrellas */
64 display: flex;
65 align-items: center; /* Asegura que las estrellas estén alineadas verticalmente */
66}
67
68.testimonial-slider {
69 position: relative;
70 display: flex;
71 justify-content: center; /* Centra los testimonios */
72 align-items: center;
73 width: 100%;
74 overflow: hidden;
75 border-radius: 10px;
76 box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
77 padding: 0 40px;
78}
79
80.testimonial {
81 flex: 1;
82 text-align: center; /* Centra el contenido */
83 padding: 20px;
84 box-sizing: border-box;
85 display: none;
86}
87
88.testimonial img {
89 width: 100%;
90 height: auto;
91 border-radius: 10px;
92 margin-bottom: 10px;
93}
94
95.testimonial h3 {
96 font-size: 18px;
97 margin: 10px 0 5px;
98}
99
100.testimonial p {
101 font-size: 16px;
102 color: #666;
103}
104
105.testimonial.active {
106 display: block;
107}
108
109.stars {
110 font-size: 20px;
111 color: #FFD700; /* Color dorado */
112 margin-bottom: 10px;
113}
114
115.prev, .next {
116 cursor: pointer;
117 position: absolute;
118 top: 50%;
119 transform: translateY(-50%);
120 font-size: 30px;
121 color: black;
122 background: none;
123 border: none;
124 z-index: 2;
125 user-select: none;
126}
127
128.prev:hover, .next:hover {
129 background-color: #000000; /* Cambia este valor por el color de fondo que prefieras */
130 color: #FFFFFF; /* Cambia este valor por el color de la flecha cuando pasas el mouse */
131}
132
133
134.prev {
135 left: 10px; /* Ajusta la distancia de la flecha a la izquierda */
136}
137
138.next {
139 right: 10px; /* Ajusta la distancia de la flecha a la derecha */
140}
141
142@media only screen and (max-width: 600px) {
143 .clients-info {
144 justify-content: center;
145 text-align: center;
146 }
147
148 .testimonial-slider {
149 padding: 0 20px; /* Reduce el padding en móvil */
150 }
151
152 .testimonial img {
153 width: 80%;
154 height: auto;
155 }
156
157 .prev {
158 left: 10px; /* Ajusta la distancia para pantallas móviles */
159 }
160
161 .next {
162 right: 10px; /* Ajusta la distancia para pantallas móviles */
163 }
164}
165</style>
166
167<script>
168let slideIndex = 0;
169showSlides(slideIndex);
170
171function plusSlides(n) {
172 showSlides(slideIndex += n);
173}
174
175function showSlides(n) {
176 let slides = document.querySelectorAll('.testimonial');
177 let visibleSlides = 1;
178 if (window.innerWidth > 600) {
179 visibleSlides = 3;
180 }
181
182 if (n >= slides.length) { slideIndex = 0 }
183 if (n < 0) { slideIndex = slides.length - visibleSlides }
184 slides.forEach(slide => slide.classList.remove('active'));
185
186 for (let i = 0; i < visibleSlides; i++) {
187 slides[(slideIndex + i) % slides.length].classList.add('active');
188 }
189}
190
191document.querySelector('.prev').addEventListener('click', () => plusSlides(-1));
192document.querySelector('.next').addEventListener('click', () => plusSlides(1));
193
194window.addEventListener('resize', () => showSlides(slideIndex));
195
196// Mostrar la primera diapositiva al cargar la página
197showSlides(slideIndex);
198</script>
199<!-- FINAL COMENTARIOS FAKE -->

How to install Fake Reviews Block on your Shopify theme

This snippet belongs in sections/main-product.liquid, directly under the Add to cart button, where it reinforces the purchase decision. Expect the whole job to take about 5–10 minutes.

  1. 1From your Shopify admin, open Online Store → Themes, click the button on your live theme and choose Duplicate. Always work on a copy so you can roll back instantly.
  2. 2On the duplicated theme, click … → Edit code to open the theme code editor.
  3. 3Open sections/main-product.liquid in the file tree. If your theme uses different file names, search for the template that renders the area where you want the block to show up.
  4. 4Click Copy code on this page, then paste the snippet directly under the Add to cart button, where it reinforces the purchase decision.
  5. 5The snippet ships with its own scoped <style> block, so you do not need to touch base.css or theme.css. If you prefer to keep CSS centralised, move the contents of the style tag into your theme stylesheet and delete the inline block.
  6. 6Keep the <script> tag at the end of the snippet. It only runs once the surrounding markup exists in the DOM, so moving it higher up the file can break the behaviour.
  7. 7Click Save, then hit Preview and check the block on desktop, tablet and mobile widths.
  8. 8When you are happy with the result, publish the duplicated theme from Online Store → Themes → Actions → Publish.

How to customise it

Every value below lives inside the snippet, so you can adapt Fake Reviews Block to your brand without touching the rest of the theme.

  • Colours — the snippet uses #000000, #FFD700, #666, #FFFFFF. Replace those values inside the style block with your brand palette, keeping at least a 4.5:1 contrast ratio between text and background so the block stays accessible.
  • Sizing — adjust the font-size values (24px, 20px, 18px) and the padding so the block carries the same visual weight as the elements around it.
  • Cornersborder-radius: 10px controls the roundness. Set it to 0 for a sharper editorial look, or increase it for a softer, app-like feel.
  • Images — replace the placeholder image URLs with your own assets. Upload them under Content → Files in Shopify admin and use the generated CDN URL, or reference a theme asset with {{ 'my-image.png' | asset_url }}.
  • Copy — rewrite the hard-coded text (for example “+13.879 Clientes”) in your own brand voice, and translate it if you sell in more than one language.
  • Responsive behaviour — the @media query defines the mobile breakpoint. Adjust the pixel value if your theme uses a different breakpoint scale.

Common mistakes to avoid

These are the issues merchants run into most often when installing a snippet like this one.

  • Editing the live theme directly. Duplicate it first — a single unbalanced Liquid tag can take a storefront down mid-campaign.
  • Pasting the code into the wrong file. Dropped into layout/theme.liquid instead of sections/main-product.liquid, this block will render on every page of the store, including ones where it makes no sense.
  • Renaming the CSS classes in the markup but not in the style block, or vice versa. The class names have to match exactly or the styling silently disappears.
  • Adding the snippet twice on the same page. The script targets its selector, so two copies can conflict or double-fire.
  • Publishing without testing on a real phone. Most Shopify traffic is mobile, and layout problems almost always surface there first.

Performance notes

What this block costs you in load time, and how to keep that cost at zero.

  • The CSS is inline and scoped to this block, so it adds no extra network request. At a few kilobytes it has no measurable effect on your Lighthouse score.
  • The JavaScript is vanilla — no jQuery, no external library, no additional request. Keep it after the markup so it never blocks rendering.
  • Add loading="lazy" plus explicit width and height attributes to every image in the snippet. That prevents Cumulative Layout Shift, which is a Core Web Vitals ranking factor.
  • Run PageSpeed Insights before and after you add the block so you have a concrete number rather than a guess.

SEO & accessibility

How to add this block without damaging your on-page structure or your rich results.

  • Nothing in this snippet should replace your page <h1>. Keep product and page headings intact and use <h2> or <h3> for the block's own heading so the document outline stays clean.
  • Write a descriptive alt attribute for every image. Empty or generic alt text is one of the most common accessibility and SEO issues on Shopify stores.
  • If the block shows review or rating content, keep it consistent with the structured data your review app already outputs. Duplicating or contradicting rating markup can cost you the rich result entirely.
  • The block does not create a new URL, so there is no canonical or indexing change to make. It improves on-page engagement signals rather than crawlability.
Frequently asked questions

Fake Reviews Block — questions merchants ask

Will this snippet work with my theme?

It is built with standard Liquid, HTML and CSS, so it works with Dawn and virtually every Online Store 2.0 theme, as well as most vintage themes. The only thing that changes between themes is the file you paste it into — if yours has no sections/main-product.liquid, look for the equivalent template that renders the same area.

Do I need an app to use it?

No. This is theme code you own outright: no monthly fee, no third-party script tag, and no app that can break your storefront the next time it updates.

How long does it take to add “Fake Reviews Block” to a store?

Most merchants have it live in under fifteen minutes — duplicate the theme, paste the code, adjust the colours and copy, preview on mobile, publish.

The block appears but nothing happens. What is wrong?

That is almost always a script-order problem. Check that the script tag is still at the bottom of the snippet and that the markup was not pasted inside another script or a Liquid comment block. Open your browser console and look for an error naming the snippet's selector.

The styling looks broken after pasting. How do I fix it?

Confirm you copied the whole snippet including the closing style tag, then check whether one of your theme's own CSS rules is overriding it. If a theme rule wins, increase the specificity of the snippet's selector rather than scattering !important through the file.

Will it slow my store down?

Not meaningfully. It is inline markup with scoped CSS and at most a few lines of vanilla JavaScript — no external libraries, no extra HTTP request. Optimising your product images will always have a far bigger impact on load time.

Can I use it on a client store or a commercial project?

Yes. Every snippet in the MCO Hub library is free to copy, modify and ship on any store, including client work. Attribution is appreciated but not required.

Related snippets

Keep exploring