HELP! Subscribe button not working.

KelleyHPC
New Member
5 0 0

Hello! I'm working on a site for a client. We are using the Narrative Theme and Seguno for email. A prior developer installed Privy, which might be contributing to my issue.

When you enter your email and hit subscribe, nothing happens. No message, no capture, nothing. Here's the site: https://myroomblooms.com/

I think there must be an error in the code somewhere but I am at a loss.

Any help with this would be appreciated!

0 Likes
Wahab_Ahmad
Shopify Partner
693 110 158

Hello @KelleyHPC,

1. Go to Online Store->Theme->Edit code
2. Asset->theme.js->paste below code at bottom of file

$('.btn--newsletter__submit').off('click');


Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Hire me: https://www.fiverr.com/share/XXjwYk
Email: wahabahmadghori@gmail.com

 

0 Likes
KelleyHPC
New Member
5 0 0
Thank you so much for your quick reply. I tried you above instructions but
unfortunately it did not work. Any other suggestions?
0 Likes
Wahab_Ahmad
Shopify Partner
693 110 158

@KelleyHPC,

Replace previous code with this code

setTimeout(function(){$('.btn--newsletter__submit').off('click');},3000);

 

0 Likes
KelleyHPC
New Member
5 0 0

Thanks, but that isn't working either.

 

Oddly if I hit the subscribe button with nothing in the field, I get this:

Screen Shot 2020-10-13 at 11.28.22 AM.png

 

If it helps, this is my current js newsletter code:

Newsletter Section
--------------------------------------------------------------------------------
Overrides default HTML5 error checking for the newsletter section.

*/

// Libs
var selectors$21 = {
emailField: '#EmailField',
inputGroup: '.input-group--underline',
submitButton: '.btn--newsletter__submit',
newsletterMessage: '.newsletter__message'
};

var errors$1 = {
blankError: theme.strings.newsletter && theme.strings.newsletter.blankError,
invalidError:
theme.strings.newsletter && theme.strings.newsletter.invalidError
};

sections.register('newsletter', {
onLoad: function() {
if ($('html').hasClass('is-ios') && Shopify.designMode) {
$(selectors$21.inputGroup, this.$container).addClass('has-animated');
}

this.$container.on(
'click',
selectors$21.submitButton,
this._checkEmail.bind(this)
);
},

_checkEmail: function() {
var emailFieldID =
selectors$21.emailField + this.$container.data('section-id');
var $emailField = $(emailFieldID, this.$container);
var $newsletterMessage = $(selectors$21.newsletterMessage, this.$container);
var errorMessage;
var emailValue = $emailField[0].value;
var emailRegExp = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;

if (emailValue === '') {
errorMessage = errors$1.blankError;
} else if (!emailRegExp.test(emailValue)) {
errorMessage = errors$1.invalidError;
}

if (typeof errorMessage !== 'undefined') {
$newsletterMessage.html('<p class="errors">' + errorMessage + '</p>');
return false;
} else {
$newsletterMessage.html('');
}
}
});

/*

0 Likes