The message to display in the notification. This can also be a locale key, e.g. "cancel_subscription_success". The default notifications.liquid implementation will attempt to look up the entry for the key in the notifications locale object.
Optional target?: anyAn optional target object related to the notification. This can be used to make the locale entry dynamic, e.g. notify('change_one_time_quantity_success', { target: { quantity: 3 } })
Optional type?: "error" | "success"The type of notification, either 'error' or 'success'. Defaults to 'success'.
og.smi.notify('Your subscription has been updated successfully.', { type: 'success' });
og.smi.notify('There was an error updating your subscription.', { type: 'error' });
og.smi.notify('cancel_subscription_success');
og.smi.notify('change_one_time_quantity_success', { target: { quantity: 3 } });
Add a entry to the SM
notificationsstate. In the default template, this will show a toast notification to the user.