Emergency

In urgent situations or outages, you can send a text message to our emergency line

Emergency line (text message only)

+45 29 70 15 95

Send a text message with the following information:

  • Your name and webshop
  • A description of the problem

Note: This service is only for critical situations where your webshop is down or has serious problems. For regular support, please use our normal support channels.

Custom CSS: style your store and admin with your own stylesheet

Add custom CSS to your Shoporama store and admin panel to change colors, fonts, and layout or hide elements without editing theme files. You can also schedule and split test stylesheet variants and color-code the order list.

Reading time: about 41 minutes
Store owner Developer

With the Custom CSS feature, you can add your own CSS to both your store and your admin panel. It's ideal for design tweaks like changing colors, fonts, and margins, or hiding elements, without editing theme files. The two are managed separately: the store's CSS is under Design → Stylesheet, and the admin panel's is under Company → Admin appearance.

How to add custom CSS

  1. Go to Design in the menu
  2. Click Stylesheet
  3. Enter your CSS code in the text field
  4. Click Save

Your CSS loads after the theme's own stylesheets, so your rules override the default styles. It applies to the whole store, not just the front page. To style the admin panel itself, you use a different page, as described under Admin customizations further down.

The Stylesheet page in the Shoporama admin with a CSS field, the SAVE and MAKE A VARIANT OF THIS buttons, and the Stylesheet variants section below.
The theme's own stylesheet under Design → Stylesheet. Write your CSS in the field, click SAVE, and optionally create alternative stylesheet variants you can split test.

Stylesheet variants: multiple CSS versions on the same theme

The field with your CSS is your main stylesheet. Right below it is the Stylesheet variants section, where you can save alternative versions of the same CSS. A variant is a complete CSS version with its own name, its own visibility, and its own schedule. You can have as many variants as you like, but only one is shown at a time.

As long as no variant is active, the store uses the main stylesheet. When a variant becomes active, it takes over, and when it's switched off again, the main stylesheet is back exactly as before.

Important: An active variant replaces the main stylesheet. It isn't added on top. Everything your store needs from your own CSS must therefore be in the variant itself. That's exactly why the "Make a variant of this" button exists: it copies your entire current stylesheet into the new variant, so you start with everything you already have.

How to create a variant

There are two ways, and each has its own purpose:

  • Make a variant of this (the button next to Save): saves your main stylesheet and copies the contents of the field into a new variant, which opens right away. Use it when you want to build on the design you already have.
  • New variant (the button in the Stylesheet variants section): starts from scratch. You give the variant a name and can paste in CSS right away, or leave the field empty and fill it in later.

Whichever way you choose, the variant is created offline. It doesn't affect the store until you switch it on yourself or give it a date range.

The fields on a variant

FieldWhat it does
NameAn internal name so you can recognize the variant. The name is only shown in the admin, never to customers. The field is required.
CSSThe variant's entire stylesheet. It loads after the theme's CSS, exactly like the main stylesheet does.
OnlineSwitch it on to show the variant permanently. Switch it off to hide the variant, or to show it only within a date range.
Visible fromThe first day the variant may be shown. The period starts at the beginning of the day.
Visible untilThe last day the variant is shown. That day is included, all the way until midnight.
PriorityDetermines which variant is shown if several are active at the same time. The default is 0.

Save with Save and keep editing if you want to stay on the page, or Save and close if you want to go back to the overview. Delete variant removes the variant completely.

When is a variant better than just editing the CSS?

  • Campaigns that switch themselves off. Put your Black Friday styling in a variant with a start and end date. It then switches on and off by itself, and nobody has to remember to clean up on Monday morning.
  • Seasons and holidays. Save your Christmas, Easter, and sale styling as separate variants, and reuse them year after year instead of building them from scratch.
  • Experiment without risk. Try a bigger rewrite in a variant. If it doesn't turn out as you hoped, just switch the variant off again.
  • Quick undo. One click sets the variant offline, and the store falls back to the main stylesheet, which is completely untouched. You don't have to figure out what you changed first.
  • Split test. Compare two designs on real visitors instead of guessing which one sells best.

The statuses in the variant list

The Status column shows at a glance what's happening with each variant:

StatusMeaning
Active nowThe variant is shown in the store right now.
OfflineThe variant is switched off and has no dates. It isn't shown.
Scheduled fromThe variant has a start date that hasn't been reached yet. The date appears in the status badge.
ExpiredThe variant's end date has passed, so it's no longer shown.

The actions on the far right

ActionWhat happens
Set online / Set offlineSwitches the variant on or off immediately, without opening it.
EditOpens the variant so you can change its name, CSS, visibility, and priority.
Clone variantMakes a copy you can keep working on.
Delete the variantRemoves the variant permanently.

A clone gets "(copy)" added to its name, is always created offline, and gets a priority one step below the original. That way, the original keeps winning until you decide otherwise, and the clone is a safe place to try something new. That also makes it the obvious starting point for a split test.

Deleting a variant can't be undone. The variant is also removed from any split tests it was part of.

How the system chooses which variant to show

On every page view, the store works out which stylesheet to use. The order is always the same:

  1. First, all variants that are active right now are collected, meaning those that are either set online or within their date range.
  2. If a split test covering at least two of them is running, visitors are split between the variants.
  3. Otherwise, the variant with the highest priority wins.
  4. If several have the same priority, the newest of them wins.
  5. If no variants are active, the main stylesheet is used.

The Online field and the dates work together

It's the combination of the Online field and the two date fields that determines when a variant is live:

OnlineDatesResult
OnNoneActive all the time, until you switch it off again
OnStart and/or end dateActive during the period
OffNoneNever active
OffStart and/or end dateActive, but only during the period

Note: A variant with a date range goes live during that period, even if Online isn't switched on. This is intentional, because it's exactly how you schedule a campaign well in advance. If a variant must never be shown, clear the date fields or delete the variant.

Priority

Priority only matters when several variants are active at the same time. The highest number wins. The default is 0, and you can use negative numbers. If two variants with the same priority are active, the newest one wins, meaning the one you created last.

Tip: Keep your permanent variants at 0, and give campaign variants a higher number, such as 10. The campaign then takes over automatically while it runs, without you having to remember to switch anything else off first.

Variants only apply to the store

  • Variants only change what your customers see. The admin panel isn't affected.
  • The field at the top of the Stylesheet page always shows the main stylesheet, even while a variant is live. That means you can't accidentally edit a variant when you open the page.
  • To style the admin itself, go to Company → Admin appearance. That CSS exists in only one version, has no variants, and applies to all users on the account.

Why doesn't the change always show up right away?

Your store saves finished pages in a cache so they load quickly. When you switch a variant on or off, it can therefore take up to four hours before all visitors see the new CSS on the cached pages. While a split test is running, the cache is automatically turned off, so each visitor always gets the variant they've been assigned to.

For developers

Both the main stylesheet and the variants are delivered through the same call in the theme, $webshop->getStylesheet(). Shoporama's built-in themes already make this call. If your theme is built from scratch, the call must be in the theme's head section, or neither the main stylesheet nor the variants will be shown. The call returns the variant's CSS when a variant is active and the main stylesheet otherwise, so the theme doesn't have to handle variants, priority, or date ranges itself.

Split test two stylesheet variants against each other

If you have two variants, you don't have to guess which one works best. You can let your visitors decide:

  1. Create at least two variants, and set them both online.
  2. As soon as two variants are active at the same time, the shortcut Set up a split test of your stylesheet variations appears below the variant list. You can also go directly to Design → Split test.
  3. Give the test a name, and create it.
  4. Add the variants you want to include, split the traffic between them, and start the test.

A stylesheet test applies to the whole store, not a single page. That makes it the right choice when you want to test something that appears everywhere, like button colors, font sizes, or the spacing around the buy button.

Note: Both variants must be active while the test runs. If you switch one off along the way, there are no longer two to split traffic between, and all visitors get the active variant with the highest priority instead.

If you check Use the winner as the new default when the test stops, Shoporama takes care of the rest: the winner is set online and gets a higher priority than the others, and the losing variants are switched off. You can always change this manually afterward from the variant list.

The whole process, the statistics, and how the winner is determined are described in How to create and run a split test in Shoporama. If you'd like to understand the idea behind it first, you can read more about split testing as a feature.

Store customizations

Here are examples of typical customizations of the store:

Change the header background color:

header {
    background-color: #1a1a2e;
}

Change the font:

body {
    font-family: 'Georgia', serif;
}

Hide an element:

.element-class {
    display: none;
}

Admin customizations

You can also customize the look of the admin panel with your own CSS. However, you write it in a different place from the store's stylesheet, namely under Company → Admin appearance, and it applies to all users on the account. Below is a complete overview of the CSS classes and IDs you can use.

Admin appearance under Company in Shoporama, with the Custom CSS field filled in with .navbar-brand and .btn-primary rules, and a SAVE button.
Admin appearance under Company. This is where you add CSS to the admin panel itself, and the changes apply to all users on the account.

Note: In the admin, you often need to add !important to override the existing Bootstrap styles.

The order list: CSS classes on order rows

Each order row in the order list has a set of dynamic CSS classes you can use to style orders based on their status, payment, and shipping method.

Payment status

ClassWhen
.paidThe order is paid
.unpaidThe order isn't paid

Example: red background on unpaid orders:

.unpaid {
    background-color: #ffe0e0 !important;
}

Order status

The order's status is added directly to the row as a class:

ClassStatus
.newNew
.processIn process
.pendingPending
.readyReady
.ready_for_pickupReady for pickup
.picked_upPicked up
.sentShipped
.creditCredit note
.cancelledCancelled

Example: green background on shipped and paid orders:

.paid.sent {
    background-color: #ddffeb !important;
}

Example: dimmed display of cancelled orders:

.cancelled {
    background-color: #eee !important;
    opacity: 0.7;
}

Shipping method

The shipping method's name is automatically converted into a CSS class. All letters become lowercase, and special characters are replaced with underscores. For example, a shipping method named "Hjemmeadresse med GLS" (home address with GLS) becomes the class .hjemmeadresse_med_gls.

Example: color-code orders by shipping method:

/* GLS orders with an orange background */
.hjemmeadresse_med_gls {
    background-color: #fff3e0 !important;
}

/* PostNord orders with a blue background */
.postdanmark_til_privatadresse {
    background-color: #e3f2fd !important;
}

Tip: To find the exact class for your shipping method, right-click an order row in the order list, choose "Inspect", and look at the classes on the <tr> element.

Payment gateway

Each order row gets a class based on the payment gateway's ID, in the format .payment-{ID}. To find the ID, go to Integrations → Payment gateways and look at the URL when you click edit.

Example: green background for orders paid with a specific gateway:

/* Replace 12 with your gateway's ID */
.payment-12 {
    background-color: #c8e6c9 !important;
}

Other order row classes

ClassWhen
.eanThe order has an EAN number (used for e-invoicing Danish public institutions)
.credit_noteThe order is a credit note
.has_pickup_addressThe order has a pickup address (parcel shop)
.no_pickup_addressNo pickup address
.shopgatewayfailThe transfer to the accounting software (shop gateway) failed

Example: highlight EAN orders:

.ean {
    background-color: #c2caff !important;
}

Order details: classes in the expanded view

When you expand an order in the list, the order details are shown with these classes:

Order contents

ClassDescription
.order-details-contentThe entire expanded order details section
.order-internal-commentsThe internal comments field
.order-content-nameProduct name
.order-content-skuItem number (SKU)
.order-content-commentOrder comment from the customer

Stock status

ClassDescription
.itemsinstockThe product is in stock
.itemsnotinstockThe product is out of stock
.shoporama-stock-in-stockStock > 0
.shoporama-stock-out-of-stockStock = 0
.order-content-amount-multipleQuantity > 1 on the order line

Example: red text on products that are out of stock:

.itemsnotinstock {
    color: #ff0000 !important;
    font-weight: bold;
}

Buttons in the order list

The buttons in the order list have fixed IDs you can style:

Primary buttons

IDButton
#btn-printPrint packing slips
#btn-mailSend email
#btn-cloneCopy order
#btn-new_invoiceRe-send order confirmation
#btn-send_sentRe-send order shipped email
#btn-current-viewCSV file (all search results)
#btn-shop-order-queueView order queue

Shipping buttons

IDButton
#btn-gls-apiSend to GLS
#btn-gls-pdfDownload GLS shipping labels
#btn-gls-api-returnCreate return label at GLS
#btn-postnord-apiSend to PostNord
#btn-postnord-pdfDownload PostNord shipping labels
#btn-dao-pickupDAO (pickup)
#btn-dao-pdfDownload DAO shipping labels
#btn-burdSend to Burd
#btn-burd-pdfDownload Burd shipping labels
#btn-shop-gatewayExport to accounting software (Shine Regnskab/Dinero)
#btn-swipboxSwipbox export
#btn-glsGLS Uni-Connect

Example: highlight the print button:

#btn-print {
    background-color: green !important;
    color: white !important;
}

Example: hide shipping buttons you don't use:

#btn-swipbox,
#btn-gls {
    display: none !important;
}

Store-specific styling

If you manage several stores under the same company, you can style the admin differently for each store. The body element has the class webshop{ID}, where ID is the store's ID number.

Example: a different header color for each store:

/* Store with ID 123: red header */
body.webshop123 nav.top-app-bar {
    background-color: #ad3c3c !important;
}

/* Store with ID 456: blue header */
body.webshop456 nav.top-app-bar {
    background-color: #2a50a6 !important;
}

Tip: You can find your store's ID in the URL in the admin, or by inspecting the body element with your browser's developer tools.

Layout and navigation

ElementDescription
nav.top-app-barThe top navigation bar
.drawer-lightThe left menu (sidebar)
.drawer-menuThe menu list in the sidebar
.drawer-menu .nav-linkMenu links in the sidebar
.drawer-footerThe bottom of the sidebar
#layoutDrawer_contentThe main content area

Example: change the color of the left menu:

.drawer-light .drawer-menu .nav-link {
    color: #333 !important;
}

.drawer-light .drawer-menu .nav-link:hover {
    background-color: #f0f0f0 !important;
}

Other useful elements

ElementDescription
#demo_progressThe demo progress box (hide it with display:none)
td.more_unsentThe order number cell when there are several unsent shipments
td.bought_beforeThe order number cell for repeat purchases
.container-fluidThe page's content area. Adjust the padding, for example, to give the tables more room

Popular use cases

Color-coding the order list

A popular setup is to color-code the order list so you can quickly tell paid and unpaid orders, and the different statuses, apart:

/* Unpaid orders in light red */
.unpaid {
    background-color: #fff0f0 !important;
}

/* Paid and shipped orders in light green */
.paid.sent {
    background-color: #f0fff0 !important;
}

/* Cancelled orders dimmed */
.cancelled {
    background-color: #f5f5f5 !important;
    opacity: 0.6;
}

/* EAN orders in light blue */
.ean {
    background-color: #f0f4ff !important;
}

Highlight important action buttons

/* Green print button */
#btn-print {
    background-color: #28a745 !important;
    color: white !important;
}

/* Orange GLS button */
#btn-gls-api {
    background-color: #ff9800 !important;
    color: white !important;
}

Give the order list more room

/* Less space at the sides = more room for the columns */
.container-fluid {
    padding-left: 8px !important;
    padding-right: 8px !important;
}

Clearly mark products that are out of stock

.itemsnotinstock {
    color: #ff0000 !important;
    font-weight: bold;
    font-size: 1.1em;
}

How to find the right CSS selector

To find the exact class or ID of an element:

  1. Right-click the element in your browser
  2. Choose Inspect (Inspect Element in some browsers)
  3. Find the element's class (for example class="unpaid sent") or ID
  4. Use the class or ID as the CSS selector in your stylesheet

Tip: Use your browser's developer tools (F12) to test CSS changes in real time before you save them in your custom stylesheet.

Bigger design changes

Custom CSS is well suited to smaller customizations. For bigger design changes, we recommend editing the theme files themselves via SFTP. See the article Log in with SFTP to get started.

CSS cheat sheet

Here's a quick overview of the most commonly used CSS properties, so you can get started without having to look them up.

Colors

Colors can be given as names, hex codes, or RGB:

/* Hex code (most common) */
color: #ff0000;              /* Red text */
background-color: #f0f0f0;  /* Light gray background */

/* Color names */
color: red;
background-color: white;

/* RGB with transparency */
background-color: rgba(0, 0, 0, 0.1);  /* Black, 10% visible */

Useful color codes:

CodeColorUse
#fff0f0 Light redUnpaid orders
#f0fff0 Light greenPaid/shipped orders
#f0f4ff Light blueEAN orders
#fff3e0 Light orangeHighlighting
#f5f5f5 Light grayDimmed/cancelled

Font (font-family)

/* Change the font */
font-family: 'Georgia', serif;
font-family: 'Arial', sans-serif;
font-family: 'Courier New', monospace;

/* Google Fonts (add the import at the top of your stylesheet) */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans&display=swap');
font-family: 'Open Sans', sans-serif;

Text

font-size: 14px;            /* Text size */
font-weight: bold;          /* Bold text (or 400, 600, 700) */
font-style: italic;         /* Italic */
text-align: center;         /* Centered (left, right, center) */
text-decoration: underline; /* Underline */
text-transform: uppercase;  /* Capital letters (lowercase, capitalize) */
line-height: 1.5;           /* Line spacing */
letter-spacing: 1px;        /* Letter spacing */

Background

background-color: #f0f0f0;
background-image: url('https://example.com/bg.png');
background-size: cover;     /* Fill the whole area */
background-repeat: no-repeat;

Borders (border)

border: 1px solid #ccc;           /* Border around the whole element */
border-bottom: 2px solid #333;    /* Bottom border only */
border-left: 4px solid #28a745;   /* Green left border */
border-radius: 8px;               /* Rounded corners */
border: none;                     /* Remove the border */

Spacing (margin and padding)

/* Padding = inner spacing */
padding: 10px;              /* All sides */
padding: 10px 20px;         /* Top/bottom, left/right */
padding-left: 15px;         /* Left only */

/* Margin = outer spacing */
margin: 10px;               /* All sides */
margin-bottom: 20px;        /* Bottom only */
margin: 0 auto;             /* Center an element */

Show/hide

display: none;       /* Hide completely (takes up no space) */
visibility: hidden;  /* Invisible (still takes up space) */
opacity: 0.5;        /* Semi-transparent (0 = invisible, 1 = fully visible) */

Size

width: 100%;         /* Full width */
max-width: 800px;    /* Maximum width */
height: 50px;        /* Fixed height */
min-height: 200px;   /* Minimum height */

Shadows

box-shadow: 0 2px 4px rgba(0,0,0,0.1);    /* Soft shadow */
box-shadow: 0 4px 12px rgba(0,0,0,0.15);  /* Stronger shadow */
box-shadow: none;                          /* Remove the shadow */

Frequently asked questions

I've created a variant, but my store looks exactly the same as before. What did I forget?

A new variant is always created offline, so it can't go live by accident. Go to the Stylesheet page, find the variant in the list, and click the on/off icon on the right side of the row. If the Status column says "Active now", it's live. If you still see the old design in your store, wait a little and try again, because finished pages are cached for up to four hours.

Is the variant's CSS added on top of my regular stylesheet?

No. As long as the variant is active, only the variant's CSS is used. The main stylesheet is paused, not deleted. That's why the "Make a variant of this" button exists: it copies your entire current stylesheet into the new variant. If you start with "New variant" instead and only write a single rule, all your other rules are gone for as long as the variant runs.

Can I make my Christmas styling switch itself off?

Yes, and that's one of the best reasons to use variants. Put your Christmas CSS in a variant, set "Visible from" to the day it should go live, and set "Visible until" to the last day. Both days are included, and the period ends at midnight. The campaign then switches on and off by itself, even if the Online field isn't switched on.

I've messed up a variant, and now my store looks wrong. What do I do?

Click the on/off icon next to the variant in the list so it goes offline. The store falls back to the main stylesheet, which hasn't been changed, so you don't have to figure out what went wrong in the CSS first. If the variant has dates, clear them at the same time, or it will go live again within its period.

Can I make variants of the color-coding in the order list?

No. Variants only apply to what customers see in the store. CSS for the admin itself, meaning the color-coding of orders, buttons, and menus, is under Company → Admin appearance, and it exists in only one version. On the other hand, it applies to all users on the account, so the whole team sees the same colors on the same orders.

I have several stores. Does a variant apply to all of them?

No. Both the main stylesheet and the variants belong to the individual store, so you have to create them in each store separately. If several stores need the same campaign styling, copy the CSS over manually. You can, however, color-code your stores differently in the admin, as described in the section on store-specific styling above.

What happens if I leave the CSS field empty in an active variant?

Then the store runs entirely without your own CSS, and only the theme's own design remains. That sounds like a mistake, but you can use it on purpose: if you suspect one of your own rules is breaking something, you can put an empty variant live for a moment and see whether the problem goes away. It's also how you split test "with my CSS" against "without my CSS".

How many variants can be active at the same time?

As many as you like, but only one is shown at a time. If several are active, the one with the highest priority wins, and if they have the same priority, the newest one wins. The exception is a running split test, where visitors are intentionally split between two or more variants.

Need help? Contact us at support@shoporama.dk.

Related features