Custom HTML & CSS
Full control over widget appearance.
When to Use
- Templates don't match your brand
- Need specific layout changes
- Want to add icons or images
Access
- Go to Settings → Cart Widget
- Scroll to Advanced Template Editor
- Tick Enable advanced template editing
- Edit the HTML and CSS directly
HTML Variables
{{title}}: fee title{{description}}: fee description{{price}}: formatted amount{{checkboxProperties}}: the checkbox input attributes
{{checkboxProperties}}is the working variable, not{{checkbox}}. A template built with{{checkbox}}renders a toggle that does nothing and never adds a fee. Always include{{checkboxProperties}}on your<input type="checkbox">.
Example HTML
<div class="tackon-widget">
<div class="tackon-header">
<span class="tackon-icon">🎁</span>
<span class="tackon-title">{{title}}</span>
</div>
<p class="tackon-desc">{{description}}</p>
<label class="tackon-label">
<input type="checkbox" class="cartcharge-widget-checkbox" {{checkboxProperties}}>
<span>Add for {{price}}</span>
</label>
</div>
The checkbox class is a contract. TackOn wires up the toggle by looking for a recognized class name. Use one of
cartcharge-widget-checkbox,tackon-widget-checkbox,cartwrap-widget-checkbox, orgw-toggleon the<input>. Rename it to something custom and the widget renders but never applies the fee. Style it with your own additional class instead.
Example CSS
.tackon-widget {
border: 1px solid #e5e5e5;
border-radius: 8px;
padding: 16px;
margin: 16px 0;
}
.tackon-header {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 8px;
}
.tackon-title {
font-weight: 600;
}
.tackon-desc {
color: #666;
font-size: 14px;
margin-bottom: 12px;
}
.tackon-label {
display: flex;
align-items: center;
gap: 8px;
cursor: pointer;
}
Tips
- Test on desktop, tablet, mobile
- Use your brand colors
- Keep sufficient contrast
- Always include
{{checkboxProperties}}on a checkbox with a recognized class
Going deeper
For the complete template-variable reference and the advanced editor in context, see Designing the Cart Widget.