> ## Documentation Index
> Fetch the complete documentation index at: https://help.experro.com/llms.txt
> Use this file to discover all available pages before exploring further.

# News letter subscribe

The implementation for the same can be found in the footer section under "footer newsletter."

```txt theme={null}
src
 └── components
      └── footer
            └── footer-newsletter
                  ├── footer-newsletter-controller.tsx
                  └── footer-newsletter.tsx

```

Integrating the [subscribeToNewsLetter](./services/ecommerce-service#subscribeToNewsLetter) of BigCommerce is as simple as implementing the /JavaScript form. Just create a simple HTML form with the input field as a text or email type, ensuring proper validations.

Upon submission of the form, you will receive the email address from the form data. Now, you just need to import `EcommerceService` from 'experro-storefront'.

`EcommerceService` provides an asynchronous method called `subscribeToNewsLetter('sample@experro.com')` which accepts the email address. It will return the response as success. If the provided email address is already registered, you will receive a valid error message in the response's `Error.message`.

For detailed implementation, refer to `footer-newsletter.tsx` and `footer-newslatter-controller.tsx`.

## signUp Handler Method

```javascript theme={null}
const signUpHandler = async (data: any) => {
  const formSubmit = await EcommerceService.subscribeToNewsLetter(data?.email);
  if (formSubmit?.Status === 'success') {
    toast.success(formSubmit.Data);
  } else {
    toast.error(formSubmit.Error.message);
  }
  setEmailValue('');
};
```
