Most changes don't need code: each widget's Style card sets colors, sizes, borders, and spacing. See Customize widget styles. For anything else, Crownsale has two places for code.
CSS for one widget
- Open the widget's Style card and click Advanced.
- In Custom CSS, start each rule with the selector shown in the help text, such as
[data-cs-widget="…"], so it applies only to this widget. - Save the widget or its promotion.
CSS and JavaScript for all of Crownsale
- Open Widgets and click Custom code at the top.
- Custom CSS: applied after Crownsale's styles, so your rules win.
- Custom JavaScript: runs once on each page, after Crownsale has started.
- Click Save. The page says Custom code saved and published.
Both apply to every storefront page where Crownsale runs. Each field holds up to 32,000 characters.
Good to know
- Changes reach your live store as soon as you save, on every theme where Crownsale runs. Keep a copy of your code before you change it.
- If the page says Custom code saved but not published, your store still has the previous code. Save again.
- Custom code stops when the app embed and app blocks are off.