• Resolved ammar7

    (@ammar7)


    I want to customize your plugin in a way that i can send my html email according to the page from where the subscriber subscribed from. like if i have 2 pages page1 and page2 and on every page load popup appears when a user subscribes email is sent with page1 respective html and page 2 respective html. For that i am modifying popup-by-supsystic/modules/subscribe/models/subscribe.php and _sendNewUserNotification().

    I have used this but failed.
    global $post;
    $pagename = $post->post_name;

    i used this and failed as well

    $url= $_SERVER[‘REQUEST_URI’];
    $parts = explode(‘/’, trim($url, ‘/’));
    $pagename = $parts[1];

    $pagename always remains empty
    Please help

    https://www.ads-software.com/plugins/popup-by-supsystic/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author supsystic

    (@supsysticcom)

    Hello.
    This is because actually URL of script that is doing subscription (therefore – email sending too) – is using different URL that page from user subscribed (it use ajax to send this notification and add subscriber).
    For now you can try second option, just replace server variable key to HTTP_REFERER, like that:

    $url= $_SERVER['HTTP_REFERER'];
    $parts = explode('/', trim($url, '/'));
    $pagename = $parts[1];

    But I think we will add such functionality so you can use simple variable from email text editor field – like [subscribe_url] – in your emails.

    Thread Starter ammar7

    (@ammar7)

    Thanks alot after working 8 hours on it finaly i have found it..

    Plugin Author supsystic

    (@supsysticcom)

    Hello!
    We released new version of popup plugin with improvement for you. Please update plugin and check it. Now you can simply add variable – [subscribe_url] in your emails.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to get page name in popup plugin’ is closed to new replies.