Mailchimp / Newsletter Signup

Home Forums Porto – Responsive HTML5 Template Mailchimp / Newsletter Signup

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #10005619
    orbitmansion
    Participant

    Hi,

    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!


    #10005623
    Support
    Keymaster

    Hello, 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


    #10005627
    orbitmansion
    Participant

    Hi, 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!

    🙂


    #10005629
    Support
    Keymaster

    Hello, 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


    #10005633
    orbitmansion
    Participant

    okay, 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!


    #10005643
    Support
    Keymaster

    Hello, 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


    #10005657
    orbitmansion
    Participant

    fantastic!! 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 🙂


Viewing 7 posts - 1 through 7 (of 7 total)

This topic is marked as "RESOLVED" and can not rceive new replies.