Skip to main content

Advanced sign-up form customisation

Use the app's sign-up form settings for standard changes. For a custom theme, add JavaScript configuration to the window.BISAData object before the Back in Stock Alerts storefront script runs.

Override storefront settings​

  1. Open BigCommerce Script Manager.
  2. Create an Essential script placed in the page header.
  3. Initialise window.BISAData, then set the values you need to override.

For example, change the successful-unsubscribe heading:

<script>
window.BISAData = window.BISAData || {};
window.BISAData.unsubscribe_success_heading = "You've successfully unsubscribed";
</script>

Header script in BigCommerce Script Manager

Customise unsubscribe messages​

When a customer follows an unsubscribe link from an email, the storefront shows a modal confirming whether the request succeeded. Override its text with:

<script>
window.BISAData = window.BISAData || {};
window.BISAData.unsubscribe_success_heading = 'Success';
window.BISAData.unsubscribe_success_message = 'You have been unsubscribed from back-in-stock alerts.';
window.BISAData.unsubscribe_failure_heading = 'There was a problem';
window.BISAData.unsubscribe_failure_message = 'We could not unsubscribe you from back-in-stock alerts.';
window.BISAData.unsubscribe_button_label = 'Continue';
</script>

Show the sign-up form manually​

Call forceShowFormForProduct after the Back in Stock Alerts storefront script has loaded. Pass a product ID:

window.BISAData.forceShowFormForProduct({id: 97});

For a particular variant, include its variant ID:

window.BISAData.forceShowFormForProduct({id: 97, variantId: 134});

Configuration reference​

The app writes the active configuration to window.BISAData on page load. Values set by your header script can override these fields.

FieldTypePurpose
api_domainstringAPI origin. The current production origin is https://backinstockalerts.hypaapps.com.
store_hashstringBigCommerce store hash.
channel_idnumberCurrent storefront channel ID.
currency_idnumberCurrent storefront currency ID.
customer_idnumberLogged-in customer ID.
customer_first_namestringLogged-in customer's first name.
customer_last_namestringLogged-in customer's last name.
customer_emailstringLogged-in customer's email address.
enable_newsletter_signupbooleanShows the newsletter-consent option.
form_typestringForm display: inline or modal.
button_settings.button_classstringSpace-separated CSS classes for the trigger and submit buttons.
button_settings.override_stylesbooleanEnables the custom button style values.
button_settings.modal_textstringModal trigger button text.
button_settings.submit_textstringForm submit button text.
button_settings.background_colorstringButton background colour.
button_settings.text_colorstringButton text colour.
button_settings.hover_background_colorstringButton hover background colour.
button_settings.hover_text_colorstringButton hover text colour.
button_settings.border_radiusstringButton border radius.
subscribe_messagestringForm heading.
success_messagestringSuccessful-submission message.
newsletter_labelstringNewsletter checkbox label.
privacy_textstringConsent guidance shown near the submit button.
enable_first_namebooleanCollects the customer's first name.
enable_last_namebooleanCollects the customer's last name.
form_element_selectorstringAdd-to-cart form selector.
product_id_element_selectorstringProduct ID input selector.
option_input_element_selectorstringVariant option input selector.
option_select_element_selectorstringVariant option select selector.
add_to_cart_button_element_selectorstringAdd-to-cart button selector.
quickview_modal_element_selectorstringQuick View modal selector.
replace_add_to_cart_buttonbooleanReplaces the original add-to-cart button with the alert experience.
unsubscribe_success_headingstringSuccessful-unsubscribe modal heading.
unsubscribe_success_messagestringSuccessful-unsubscribe message.
unsubscribe_failure_headingstringFailed-unsubscribe modal heading.
unsubscribe_failure_messagestringFailed-unsubscribe message.
unsubscribe_button_labelstringButton that dismisses the unsubscribe modal.
forceShowFormForProductfunctionOpens the alert form for a product and optional variant.
enable_alert_requestsbooleanEnables or disables the storefront sign-up experience.

Avoid overriding store, customer and API values unless you are implementing a custom storefront flow and understand how those values are supplied.