THis module is very easy and runs as expected but when you want to set a mailchimp popup you will always want it to popup and this module do not do that.
How can I change the module to open on page load with a few seconds delay?

This is part of the setting on the Mailchimp popup form. Will it be implemented into the form at some point?

Thanks for any help on this.

Comments

Jens Peter created an issue. See original summary.

szeidler’s picture

Title: Popup should open as default » Option: Popup should open as default instead of onclick
Version: 8.x-1.0 » 8.x-1.x-dev

Hi,

thanks for your feedback. The current purpose of the module is to trigger the popup only manually onclick. For your use-case I would probably have added the Mailchimp Popup code directly.

But I see, that this feature could improve this module. Just to understand your use-case:

1. You would like add the Mailchimp block with automatic popup into a random region (maybe with additional visibility settings). Random region, because the block actually will not display anything, but just attach the required javascript for the Popup.
2. When the page (according to the visibility settings) is loaded, the Mailchimp popup will open automatically.

What would happen, when you reopen this page again? Should the popup appear again, or should it (as it's Mailchimp default) hide the popup for an specific amount of time / or when the user clears the cookie?

jens peter’s picture

Hi Szeidler,

Thanks for getting back to me.

Your first example would be the one most useful I think.
Adding a block that can be invisible that will show the pop up defined on Mailchimp.
Basically it could be as it is today with the option to hide the button and when hidden it will open on page load.

I thought of doing it directly but then I need to make the changes on the server files and not from the administration area.
When you have clients that love making changes and adding new list it would just be much more simple to use your module.
It is wonderful logic and easy to use.

On revisit it could maybe be an option where it opens everytime or after a set number of times based on a cookie.

Do let me know if I can help with any further.

szeidler’s picture

Thanks for your detailed response, that's really valuable.

I would love to see this feature in the module. As I/my company don't have a business value in that feature right now, I cannot promise you anything :) But would I try to include it into the next contribution day, that we get once a month my employer.

If others like to jump in, I'm happy for any kind of contribution.

szeidler’s picture

Assigned: Unassigned » szeidler

Hi,

I'm planning to add a patch for review for this feature early next week.

jens peter’s picture

@szeidler
Sounds great. I have solved my issue on the site I was working on and it has gone live.
I will be happy to help testing your patch as I think this module seems more elegant.
Let me know if I can help any further.

szeidler’s picture

Status: Active » Needs review
StatusFileSize
new8.9 KB

Here's an initial patch for the automatic popup opening method. In the block configuration you can now choose between the manual and automatic method. When using the automatic method, the popup will load automatically and the block itself will be hidden with CSS.

On revisit it could maybe be an option where it opens everytime or after a set number of times based on a cookie.

I tried to play around with the cookies, but didn't had success. By default Mailchimp shows the Popup again only after a year, which I think is quite a huge offset. Until now I haven't found a good way to play with the cookies, so that we can make it configurable, e.g. reappear of the popup after 7 days.

szeidler’s picture

Here's a try with a configurable expiry, that is can "overwrite" the default "1 year" coming from Mailchimp. It's a bit complex, because I needed to introduce control cookies and remove the Mailchimp cookie at the right time.

jens peter’s picture

Sorry for the delay getting back to you.
I have installed a test site so I could play around with this a bit more safely.

And it works amazingly. Perfect.
I tried with time changes, with or without pictures and different locations.
All worked perfectly.

I only tested with a very short time between show but since that matched the time I assume it will work correct even if I set a longer time.

Only issue I have is that the X do not always work - I cannot close the popup always - but I think that is more related to MailChimp.

This is really well done! All worked on first go.
It should really be added the module.

jens peter’s picture

Didnt see the interdiff-3030727-7-8.diff.txt.
Is this a variantion of the patch?

If so I will test this tomorrow.

ikeigenwijs’s picture

Does this also allow for slide option?

szeidler’s picture

Does this also allow for slide option?

You mean, that the popup is sliding in. That will be done in your Mailchimp signup popup configuration and applies automatically, when using the module and configured it correctly. Please correct me, if you see that I'm wrong.

  • szeidler committed f3eafc1 on 8.x-1.x
    Issue #3030727 by szeidler, Jens Peter: Option: Popup should open as...
szeidler’s picture

Status: Needs review » Fixed

Thanks for the contribution. It will be part of the next release.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.