Skip to main content

💻 Add widgets with code

For themes without app blocks, or to place a widget exactly where you want it: every widget's snippet, where to paste it, the Home Carousel's options, and what a snippet can't change.

Most themes take Quoli's widgets as app blocks: you add them in your theme editor and drag them into place. Older themes don't support app blocks, and some spots, like inside a product card, can't take one. For those, every widget has a short snippet you paste into your theme.

Find it in

Settings ▸ Widgets ▸ the widget ▸ Instructions

Paste it in

A Custom Liquid block or section, or your theme's code

Needs

The Quoli Core Script app embed, on in your theme

Plans

Every plan

The Instructions popup for the Video Reel carousel with its parts numbered

➀ Add to theme. The app block way, when your theme supports it.

➁ The snippet. The code for this widget, ready to paste.

➂ Copy code. Copies it in one click.


Paste a snippet

  1. Make sure the Quoli Core Script is on: theme editor ▸ App embeds. It loads every widget, so a snippet shows nothing without it.

  2. In Quoli, open Settings ▸ Widgets, find the widget and click Instructions, then Copy code.

  3. Paste it where the widget should show: in a Custom Liquid block or section in your theme editor, or in the right template or section file in your theme's code.

  4. Save, and check the page on your store.

Paste snippets as they are. The parts in {{ }} fill in your product, shop and cart on each page, so they only work in your theme's Liquid, not in a plain HTML or text field.


Where each snippet goes

Widget

Paste it in

The snippet's tag

The product template, under the title

quoli-star-rating

The product template

quoli-pdp-reviews

The product template

quoli-grid-reviews

The product template, near Add to cart

quoli-nuggets-slider

Any page

quoli-home-carousel

Any page

quoli-reputation-badge

Any page

quoli-reputation-badge with the bar setting

The template of the page that lists your reviews

quoli-all-reviews

The cart template

quoli-cart-reviews

Your product card, inside the product loop

quoli-collection-rating

The product page snippets read the product from the page, so they belong in the product template. Pasted anywhere else they have no product to show.

Popup Widget and Reviews Sidebar

These two are app embeds: switched on once in App embeds, they show across your store. Their snippets show them only on the pages where you paste them, so use the app embed unless you want them on one template only.

Checkout Nuggets

Checkout Nuggets lives in your checkout, not your theme, so it has no snippet. On Plus stores, add it with Add to checkout in its card.


Home Carousel options

One snippet makes all eight carousel styles. Each style's Instructions gives you its snippet ready to paste, and you can change these options in the code:

<quoli-home-carousel
  merchant-id="{{ shop.permanent_domain }}"
  api-base="/apps/quoli"
  data-shop-name="{{ shop.name | escape }}"
  carousel-style="video-reel"
  source="recent"
  content="auto"
  count="10"
></quoli-home-carousel>

Option

Values

carousel-style

cards (Review Cards), spotlight, photo-wall, video-reel, minimal (Quote Cards), collage, big-quote, legacy (Classic)

source

recent for your newest reviews, featured for the ones you feature

content

auto picks what suits the style. Or all, with-media, video, text

count

How many reviews, 3 to 30


Collection Ratings

The Collection Ratings instructions

Collection Ratings has no app block: it always goes in with code, inside your product card, so every card shows its product's stars. Its article has the layouts you can set with a data-settings line.


What a snippet can't change

  • Block settings. A pasted widget uses its default settings: labels, layout, what it shows and its spacing. To change them, use the app block where your theme allows it.

  • Its status. Settings ▸ Widgets looks for app blocks, so a pasted widget reads Inactive there. Check it on your store instead.

  • Theme updates. Code you add to theme files stays with that theme. After switching themes, paste it again in the new one.

Colors and fonts still come from Settings ▸ Brand, and the language from Settings ▸ General, exactly as with app blocks.


💡 Tip: A Custom Liquid block in your theme editor is the safest place for a snippet. You can move or remove it later like any other block, without touching your theme's code.

Did this answer your question?