Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi!
Thanks for the great module.
Can you explain how to display a particular popup via Rules? Does the popup-onload action allow this?
Thanks
Geoffrey
Comments
Comment #1
jordan8037310 CreditAttribution: jordan8037310 commentedyes, this is rather confusing as I'm not sure what to set for the data selectors for both the conditions and actions for this module. Subscribing.
Comment #2
TechnoTim2010 CreditAttribution: TechnoTim2010 commentedHi
I got this to work and the solution was surprisingly simple. Assuming you know which popup on load content you want, then the popup is an entity and as such has an entity_id.
Happy Drupalling
Tim
Comment #3
TechnoTim2010 CreditAttribution: TechnoTim2010 commentedDamn, when I remove the rule "Display a popup on page load" from the equation (as I don't want the rule to work on any page load) It does not work anymore.
Digging deeper.
I am aware that this is not what it was originally intended for, i.e. show a popup based on some rules event (in this case "add a product to a cart" but I need it for two situations one to show the popup when accessing a page (on page_load) and also to show the popup when the "Add a Product to Cart" event triggers.
Will suss how this works and if there is a workaround.
Tim
Comment #4
d.novikov CreditAttribution: d.novikov commentedHey guys, did you try to set "Disable normal popup processing" checkbox at admin/config/user-interface/popup_onload?
Comment #5
TechnoTim2010 CreditAttribution: TechnoTim2010 commentedYes and I am not getting anywhere with this.
The onload works irrespective of if you check
" Disable normal popup processing
If set, popup_onload module will stay enabled, but popup display will be invoked only as a Rules module action."
It seems to call the onload process (based on the paths you declare in the UI in admin-userinterface-popup_onload), so if you enter in a path other than the path of the page you want rules to show the popup on (the rules target as it were), the popup fails to load on the event, if you make the path that of your rules target(s) it loads when the page loads AND loads when the rule is run.
So if you check that and
Have no paths - it runs on every page load
Have a path other than one the rules event runs on - it fails to run
Have the path that the rules event runs on - it runs on loading the page AND when the event runs.
Does that make sense?
Tim
Comment #6
jordan8037310 CreditAttribution: jordan8037310 commentedYes, after my own testing it seems that this implementation isn't sophisticated enough to be triggered by events other than the base event, "Display a popup on page load". Currently having our developers take a look at cost / effort to extend this functionality to a true rules implementation, triggered by any event.
Comment #7
TechnoTim2010 CreditAttribution: TechnoTim2010 commentedHi
I found another solution for a popup based on the "Add to Cart Event" the solution was via the module nice_messages.
This is a great module in principle, it fulfils a need but only in a limited use case.
Keep up the good work.
Regards
Tim
Comment #8
Dor@ CreditAttribution: Dor@ commentedHi, I do not get it: does #2 require Popup On Load Display? Which also requiers Features(not mentioned in the module page)
Comment #9
ivnish CreditAttribution: ivnish commented