Mailchimp Action Url box for brooklyn

New Member
1 0 1

Ive integrated my store with mailchimp. The problem is whenever somebody subscribes to my newsletter via mailchimp provided pop up, it adds it to my mailchimp list. But when someone suscribes through my newletter box (provided in the brooklyn theme), it only adds it to shopify customers. 

After talking to number of gurus and researching for a week, I came across this guide that tells me to paste mailchimp action url in the action url box in my themes>customize>Newsletter but that box is not there. I wonder If i have to code in the action url via edit code because I do see a newsletter.liquid file under sections

Somebody help me out with this. This is the guide I followed:

https://help.shopify.com/manual/using-themes/change-the-layout/theme-newsletter#sectioned-themes

1 Like
Highlighted

In the latest updates they removed this feature. But you can do it yourself. Here are some steps that can help you:

1.From your Shopify admin, go to Online Store > Themes (Brooklyn).

2.Choose "Edit code" from the "Actions" drop-down menu.

3.On the Edit HTML/CSS page, you can edit the sections /newsletter.liquid file.

4.You should find the following lines in the file (the code is about 19 line). The code will look something like this:

{% form 'customer' %}
      {{ form.errors | default_errors }}
      {% if form.posted_successfully? %}
        <div class="newsletter--form">
          <div class="note form-success">{{ 'general.newsletter_form.newsletter_confirmation' | t }}</div>
        </div>
      {% else %}
        <label for="Email" class="newsletter__label hidden-label">{{'general.newsletter_form.newsletter_email' | t }}</label>
        <input type="hidden" name="contact[tags]" value="newsletter">
        <div class="newsletter--form">
          <div class="input-group">
            <input type="email" value="{% if customer %}{{ customer.email }}{% endif %}" placeholder="{{ 'general.newsletter_form.newsletter_placeholder' | t }}" name="contact[email]" id="Email" class="input-group-field newsletter__input" autocorrect="off" autocapitalize="off">
            <span class="input-group-btn">
              <button type="submit" class="btn newsletter__submit" name="commit" id="Subscribe">
                <span class="newsletter__submit-text--large">{{ 'general.newsletter_form.submit' | t }}</span>
                <span class="newsletter__submit-text--small">
                  <span class="icon icon-arrow-right" aria-hidden="true"></span>
                </span>
              </button>
            </span>
          </div>
        </div>
      {% endif %}
    {% endform %}

Replace these lines by the following lines of code:

{% assign form_action = YOUR-form-action-url %}
              {{ form.errors | default_errors }}
              {% if form.posted_successfully? %}
                <div class="newsletter--form">
                  <div class="note form-success">{{ 'general.newsletter_form.newsletter_confirmation' | t }}</div>
                </div>
              {% else %}
              <form action="{{ form_action }}" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" target="_blank" class="input-group" id="contact_form" class="contact-form">
                <label for="Email" class="newsletter__label hidden-label">{{ 'general.newsletter_form.newsletter_email' | t }}</label>
                <input type="email" value="{% if customer %}{{ customer.email }}{% endif %}" placeholder="{{ 'general.newsletter_form.newsletter_email' | t }}" name="EMAIL" id="mail" class="input-group-field" aria-label="{{ 'general.newsletter_form.newsletter_email' | t }}" autocorrect="off" autocapitalize="off">
                <span class="input-group-btn">
                  <button type="submit" class="btn newsletter__submit" name="commit" id="Subscribe">
                    <span class="newsletter__submit-text--large">{{ 'general.newsletter_form.submit' | t }}</span>
                    <span class="newsletter__submit-text--small">
                      <span class="icon icon-arrow-right" aria-hidden="true"></span>
                    </span>
                  </button>
                </span>
              </form>
    		  {% endif %}

Paste your mailchimp action url to this line:
{% assign form_action = YOUR-form-action-url %}

Knowledge of HTML and CSS will help you customize new form if the appearance of the new code slightly changes.

In general, you should test changes in a theme copy first vs editing the live theme (unless you are really sure you know it will work). Duplicate the theme and test things in the copy.

Best,
Arthur

Shopify subject matter expert | Founder at GenovaWebArt | Full-services shopify agency | info@genovawebart.com
1 Like
New Member
1 0 0

Hi Arthur,

This method worked for me! I have been looking for this response for a while, so THANK YOU!

The only thing is after I replaced the code, the newsletter box changed. The field where you input your email address now says "Join our mailing list" (I swear it said "email address" before??) and it says it twice :/ I've attached a screenshot of it.

Do you know how I can remedy this?

Thanks in advance!

-- Izzy

 

0 Likes

Hello Dizzy,

You can see the following line in your form:

{{ 'general.newsletter_form.newsletter_confirmation' | t }}

 

These are translation keys and the translation filter (https://help.shopify.com/themes/development/internationalizing/translation-filter) You can change the default text in your theme by using the language editor (https://help.shopify.com/manual/using-themes/change-wording).

In the code I have pasted before, you need to change pleceholder value in <input> -

placeholder="{{ 'general.newsletter_form.newsletter_email' | t }}"

=> Edit theme/ General/ Newsletter form / Newsletter email

 

Hope it helps!)

Best,
Arthur

Shopify subject matter expert | Founder at GenovaWebArt | Full-services shopify agency | info@genovawebart.com
0 Likes
Explorer
76 1 4

Hi,

I am trying to adapt this to my Minimal theme. However, I am getting an error in the Shopify edit code section. 

 {% assign form_action = https://smeelah.us12.list-manage.com/subscribe/post?u=c76f492b2d27c208a0737b14e&amp;id=3bc6802dbe %}

 

This file contains the following errors:

0 Likes