Skip to main content
Open the Mage loyalty sidebar. Use this to trigger the sidebar from custom buttons or events on your storefront.

Usage

MageSDK.openSidebar();

Parameters

None.

Returns

void — this method does not return a value.

Example: Custom loyalty button

<button onclick="MageSDK.openSidebar()">View My Rewards</button>

Example: Open after earning points

// After a customer completes an action, open the sidebar to show their updated points
MageSDK.openSidebar();