Trustpilot reviews in the cart
Show your Trustpilot TrustScore in the EliteCart drawer with a TrustBox widget, including a compact version for mobile.
Last updated
A Trustpilot rating in the cart reassures shoppers right before checkout. This article shows how to add a Trustpilot TrustBox widget to the EliteCart drawer with Custom HTML.

What you need
- A Trustpilot Business account
- EliteCart Professional or Enterprise (Custom HTML is part of these plans)
Add the TrustBox
Copy the widget code from Trustpilot
In Trustpilot Business, open the website widgets (TrustBoxes), choose a compact one such as Micro Star Rating or Micro TrustScore, and copy its code.
Open Custom HTML
In EliteCart, go to Cart designerOtherCustom HTML.
Choose the position
In Below checkout button, tick Enable and Widget mode. Widget mode lets Trustpilot's script find the widget when the page loads.
Paste the code
Paste the code into the HTML editor. Read the note on the TrustBox script below first.
Save and test
Click Save, add a product to the cart on your store and check the rating below the checkout button, on desktop and on a phone.

The code looks similar to this:
<!-- TrustBox script: only if Trustpilot isn't loaded elsewhere on your store -->
<script type="text/javascript" src="//widget.trustpilot.com/bootstrap/v5/tp.widget.bootstrap.min.js" async></script>
<!-- TrustBox widget: Micro Star Rating -->
<div class="trustpilot-widget" data-locale="en-US" data-template-id="5419b732fbfb950b10de65e5" data-businessunit-id="YOUR-BUSINESS-UNIT-ID" data-style-height="20px" data-style-width="100%" data-theme="light">
<a href="https://www.trustpilot.com/review/YOUR-DOMAIN" target="_blank" rel="noopener">Trustpilot</a>
</div>
To change the look, edit the attributes in the widget, for example data-theme="dark", data-locale="de-DE" or data-style-height="28px".
A compact widget on mobile
On a phone the cart is only about 320 to 400 pixels wide, so wide TrustBoxes don't fit. Use two widgets and switch between them with CSS: a wider one on desktop and a Micro widget on mobile. Replace the IDs and token with the values from your own Trustpilot code.
<div class="tp-desktop">
<!-- paste your wider TrustBox widget here -->
</div>
<div class="tp-mobile">
<!-- paste your Micro TrustBox widget here -->
</div>
<style>
.tp-mobile { display: none; }
@media screen and (max-width: 749px) {
.tp-desktop { display: none; }
.tp-mobile { display: block; }
}
</style>
Still stuck?
Chat with us and we'll help you get your cart live. Or email contact@elitecart.app.