Skip to main content

Styling Your Product Points Calculator

Written by Kris - Mage Loyalty
Updated over 2 weeks ago

This block appears on product pages and shows customers how many points they'll earn for that specific product.

You can add custom CSS in your theme's CSS file or via the Shopify theme editor.

How It Works

All product points calculator elements use CSS classes prefixed with .mage-product-points-calculator. The block also carries the .mage-block class on its root element.

The block has two display styles β€” inline and badge β€” and the modifier class on the root element tells you which mode is active. Colors set via the theme customizer are applied as inline styles; to override them with CSS, use !important.

Tips

  • Disable customizer styles to take full control. Enable the "Disable customizer styles" option in the theme block settings. This suppresses all inline color styles and lets your CSS apply without needing !important.

  • Target the display style you want. Use .mage-product-points-calculator--inline or .mage-product-points-calculator--badge to target a specific display mode without affecting the other.

  • The multiplier note is optional. The __multiplier element only renders when a VIP tier or bonus campaign is active. Style it independently to keep it visually secondary to the main message.


CSS Class Reference

Root

Class

Description

.mage-product-points-calculator

Root container for both display styles

.mage-product-points-calculator--inline

Applied when the block is in inline display mode

.mage-product-points-calculator--badge

Applied when the block is in badge display mode

.mage-block

Shared class present on all storefront blocks

Inline Display

Class

Description

.mage-product-points-calculator__message

The points earn message text

.mage-product-points-calculator__multiplier

Multiplier note (e.g. "3x bonus as a Gold member")

.mage-product-points-calculator__multiplier--inline

Inline variant of the multiplier note

Badge Display

Class

Description

.mage-product-points-calculator__badge

Badge container (receives background and text color from customizer)

.mage-product-points-calculator__message--badge

The points earn message text inside the badge

.mage-product-points-calculator__multiplier--badge

Multiplier note shown below the badge

Did this answer your question?