Overview
For most websites, the Buy Button Profile designer is the best place to manage styling. It keeps your setup consistent, easier to support, and easier to update later.
Advanced HTML overrides are available when a supported setting cannot be achieved in the standard designer. Because these changes live in the page code rather than the saved profile, use them selectively, document them, and make sure the person maintaining your website knows they are there.
You do not need to be a developer to read the options below, but you should be comfortable editing HTML. If you are unsure whether an attribute is supported—or whether it changes checkout behavior rather than appearance—check with your dedicated PSM before publishing it.
When to use advanced customization
Start with the standard Buy Button Profile. Use HTML overrides only for a supported setting the designer cannot provide. If an override causes a problem, remove it and confirm the standard profile works before troubleshooting anything else.
Supported HTML attributes
Attribute | Accepted value or purpose |
data-gift-note | String value “true” or “false”. |
data-button-text | Text shown on the Buy Button. |
data-button-width | Numeric pixel value passed as a string. |
data-button-corners | Numeric corner-radius value passed as a string. |
data-checkout-text-1 | Your optional cart-window message. |
data-checkout-text-2 | Reserved compliance text; do not override without approval. |
data-button-font-size | Numeric font-size value passed as a string. |
data-button-font-type | A valid CSS font-family value. |
data-button-text-color | Six-character hexadecimal color prefixed with #. |
data-button-background | Six-character hexadecimal color prefixed with #. |
data-button-font-weight | normal, bold, bolder, or lighter. |
data-button-border-color | Six-character hexadecimal color prefixed with #. |
data-button-border-width | Numeric border width in pixels. |
data-button-show-quantity | String value “true” or “false”. |
data-button-layout-vertical | left, center, or right. |
data-button-letter-spacing | Numeric character-spacing value. |
data-button-text-transform | none, lowercase, or uppercase. |
data-cart-text-letter-spacing | Numeric spacing for cart line-item and footer text. |
data-toggle-button-background | Six-character hexadecimal toggle background color. |
data-toggle-button-border-color | Six-character hexadecimal toggle border color. |
data-checkout-button-background | Six-character hexadecimal checkout-button background color. |
data-checkout-button-border-color | Six-character hexadecimal checkout-button border color. |
data-checkout-button-corners | Numeric checkout-button corner value. |
data-button-padding-top / data-button-padding-bottom | Numeric Buy Button padding values. |
data-checkout-button-padding-top / data-checkout-button-padding-bottom | Numeric checkout-button padding values. |
data-subtotal-text-transform | uppercase, lowercase, or none. |
data-cart-title-padding-top / data-cart-title-padding-bottom | Numeric Cart title padding values. |
Add the attributes
Locate the product-component div in the generated Buy Button HTML.
Keep the existing product ID, profile ID, timestamp, and div ID unchanged.
Add only the supported attributes you need inside the opening div tag.
Use quoted string values exactly as shown in the table above.
Save the page and test on staging before publishing.
Example
<div id="product-component-1740907796-8318086906009"
data-product-id="8318086906009"
data-profile-id="3d7ce72ccdfb1441"
data-timestamp="1740907796"
data-gift-note="false"
data-button-text="Purchase Now"
data-button-width="30"
data-button-corners="20"
data-button-text-color="#FFFFFF"
data-button-background="#FF8C00">
</div>
Test the button, cart, checkout, mobile layout, and analytics after every code change. Flaviar cannot reliably diagnose errors introduced by unsupported custom HTML, theme CSS conflicts, or third-party scripts until the standard generated button is confirmed to work.
Before you finish
If an override does not behave as expected, remove it and test the original generated code with the standard profile. Once the baseline works again, reintroduce one customization at a time so you can identify the setting that caused the conflict.
Related Help Center articles
Create and design a Buy Button Profile
Manage and update live Buy Buttons
Troubleshoot Buy Buttons and checkout behavior
Questions? Please email your dedicated PSM or [email protected] for assistance. |
