Home › Forums › Porto – Responsive HTML5 Template › Mailchimp / Newsletter Signup
- This topic has 6 replies, 2 voices, and was last updated 10 years, 5 months ago by
orbitmansion. This post has been viewed 2212 times
-
AuthorPosts
-
December 15, 2014 at 10:22 am #10005619
orbitmansion
ParticipantHi,
I seem to be having some issues with the Newsletter Signup functionality in the footer – .
I’ve followed the instructions and have input all of my mailchimp credentials correctly, however when I submit an email address to subscribe, it opens up the newsletter-subscribe.php file and displays “{“response”:”error”,”message”:”You must specify a email_address value for the listSubscribe method”}” in the browser.
Can you take a look please as to what’s wrong?
Please navigate to /sitemap.html after main website url and you’ll see the porto template version of the site. I’m working on the new one whilst the old one is still live!
December 15, 2014 at 3:26 pm #10005623Support
KeymasterHello, looks like there’s a problem in the file js/custom.cs (as you can see in the browser console), please fix the script, use the following js code:
$('.nav-main .dropdown-submenu > a:not(a[href="#"])').on('click', function() { self.location = $(this).attr('href'); });
(Please check if it looks exactly like that when you paste the code).
Please try that and let me know if you need further assistance.
Kind Regards, Jonas
December 15, 2014 at 4:04 pm #10005627orbitmansion
ParticipantHi, okay so it looks like that is the cause of the issue, however, if you recall, that line of custom JS was to enable the top level of a ‘sub-menu’ item to be clicked through to!
In any case, we fixed that by adding a portion of the code (above) to line 2076 of theme.js – which then looked like this:
self.$wrapper.find('li.dropdown > a:not(.disabled), li.dropdown-submenu > a:not(.enabled)').on('click', function(e) {
So, now we know this affects the mailchimp sign up the issue is how do I enable both (top level sub-menu item to be clicked through and mailchimp signup)…
Well, simple – I deleted everything from custom.js…so it’s blank and then removed a portion of the code from line 2076 of theme.js – so now it looks like this:
self.$wrapper.find('li.dropdown > a:not(.disabled)').on('click', function(e) {
Now both mailchimp signup and top level sub-menu work.
Take a look on sitemap.html and see. Just ignore the mailchimp message telling you FName is mandatory along with the fact that ‘meet-the-team.html’ doesn’t actually go anywhere!
🙂
December 15, 2014 at 4:34 pm #10005629Support
KeymasterHello, yes, I got the message “FIRSTNAME must be provided – Please enter a value” – the JS problem is gone now 🙂
Let me know if you need further assistance.
Kind Regards, Jonas
December 15, 2014 at 9:38 pm #10005633orbitmansion
Participantokay, I do have a follow up question…
How do I make the alert boxes fade out after 5 seconds? So, the “newsletterSuccess” or “newsletterError” boxes specifically.
I’ve tried all manner of JS but nothing seems to want to work?
I’m back to square one now and have removed all custom JS and thought to ask you to see if you have an easy way to do it?
It’s driving me nuts!
December 16, 2014 at 10:01 am #10005643Support
KeymasterHello, please try to add this:
setTimeout(function() { $success.fadeOut('slow', function() { $success.addClass('hidden').removeAttr('style'); }); }, 5000);
Right there:
The first problem was actually related to a wrong character in the file js/custom.js that was causing an error and blocking all the scripts.
Regards,
Jonas
December 16, 2014 at 1:24 pm #10005657orbitmansion
Participantfantastic!! it works perfectly now!
I even added fade out to the ‘else’ statement below it so that it fades out the ‘warning/error’ messages :
} else { $error.html(data.message); $error.removeClass('hidden'); $success.addClass('hidden'); setTimeout(function() { $error.fadeOut('slow', function() { $error.addClass('hidden').removeAttr('style'); }); }, 5000);
thanks again for your help 🙂
-
AuthorPosts
This topic is marked as "RESOLVED" and can not rceive new replies.