Skip to content

Instantly share code, notes, and snippets.

@cgi-caesar
Created January 28, 2020 14:32
Show Gist options
  • Save cgi-caesar/be7aa111baa3895a47ce4b9826201206 to your computer and use it in GitHub Desktop.
Save cgi-caesar/be7aa111baa3895a47ce4b9826201206 to your computer and use it in GitHub Desktop.
aMember (site.php): Add popup window to Thank you page
<?php
Am_Di::getInstance()->blocks->add('thanks/success', new Am_Block_Base(null, 'thanks-popup', null, function (Am_View $v) {
/* @var Invoice $invoice */
$invoice = $v->invoice;
/* @var User $user */
$user = $invoice->getUser();
return <<<CUT
<div id="thanks-popup">Any Content within Popup</div>
<script type="text/javascript">
jQuery(function(){
jQuery('#thanks-popup').amPopup({
title: 'Popup Title'
});
});
</script>
CUT;
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment