FoxrFoxr

Custom HTML & CSS

Add your own HTML at chosen spots in the drawer, and your own CSS to restyle any part of it.

Where to find it: in the cart editor, click Custom HTML & CSS in the Cart Editor Settings list.

For anything the other tabs don't cover: add your own HTML, like a banner or a message, at eight spots in the drawer, and write CSS to restyle any part of it.

For people comfortable with code

Your HTML and CSS go live exactly as written when you save. Nothing checks them for mistakes, so a broken tag can break the drawer's layout. Test on a draft first.

The Custom HTML & CSS tab with Custom HTML switched on. The tab, the switch, Select HTML Location, the Code Editor, and the Custom CSS card are numbered, and a dashed arrow runs from the Code Editor to a yellow banner at the top of the cart preview.

In this screenshot Custom HTML is switched on, the location is Above announcements/rewards, and the Code Editor holds a short sample banner. The preview shows it as a yellow "Free gift wrap on every order this week" bar just under the cart header, above the announcement bar (6).

#SectionWhat it's for
1Custom HTML & CSS tabOpen this tab. The eye icon shows it's on. A crossed-out eye means it's off.
2Custom HTML switchTurns on both your HTML and your CSS. When it's on, the card reads Custom HTML active with a green On badge.
3Select HTML LocationWhere in the drawer this HTML goes.
4Code EditorYour HTML for the selected location.
5Custom CSSCSS for the whole drawer, typed in the Css Editor.
6Your HTML in the previewHere, the sample banner just under the cart header.

The banner is just an example to show where HTML appears. This is the code from the screenshot, if you'd like to start from it:

<p style="margin:0;padding:10px;text-align:center;background:#fff4d6;font-weight:600">🎁 Free gift wrap on every order this week</p>

Change the text and colours to suit your store, or replace it with your own HTML.

Add HTML

Switch on Custom HTML at the top.

Choose a spot in Select HTML Location.

Type or paste your HTML in the Code Editor.

To add HTML at another spot, choose that location and type its HTML. Each location keeps its own code.

Click Save.

Locations

LocationWhere it shows
Above announcements/rewardsUnder the cart header, above the announcement bar and rewards.
Below header/announcements/rewardsJust under them.
Between each line itemUnder every product in the cart.
Above footer/add-onsAt the top of the footer.
Above checkout buttonRight above the checkout button.
Below checkout buttonRight under it.
Bottom of cartAt the very bottom.
On empty cart screenOnly when the cart is empty.

When you come back to the tab, it shows the first location. Your code for the other locations is still there; pick a location to see it.

Live values you can use

These placeholders in your HTML are replaced with live values:

PlaceholderBecomes
{{cart_total}}The cart total, formatted, like $57.05.
{{cart_total_amount}}The cart total as a plain number.
{{savings}}The total saving. Empty when there's none.
{{order_discount_savings}}Savings from order discounts.
{{original_price}}The total before discounts.
{{cart_item_count}}The number of items.
{{discount_codes}}The applied codes, separated by commas.

For example: <p>You're saving {{savings}} today!</p>

Add CSS

Type CSS in Css Editor. It applies to the whole drawer, including the rewards bar and the empty cart. Use your browser's inspector on your store to find the class names to target.

Good to know

  • The one switch controls both. Turning Custom HTML off also turns off your CSS.
  • Scripts run. script tags in your HTML run on your store, and may run more than once as the cart updates. Write them so running twice does no harm.
  • Product forms in your HTML still add to the drawer's cart.

On this page