Hello. I hope you are well. I am using a PayPal button that takes the user off site to process payment. I would like to load a modal on the user return from PayPal. So, rather than have it launch on page load, I would like it to launch only on a conditional basis, when the user returns from PayPal. Is this possible with the included modal? Thank you.
Modal load on specific occasion
2 replies · opened Jan 30, 2021
NnoornajJan 30, 2021
SSemicolon WebSTAFFJan 31, 2021
Hello,
This is Possible but not included out of the box and will require JS Customization. You can consider using the following code to Trigger the Modal:
[ch_pre]
jQuery( window ).on( 'load', function() {
// if( your conditions here ) {
jQuery.magnificPopup.open({
items: { src: '#paypal-success-modal' },
type: 'inline',
mainClass: 'mfp-no-margins mfp-fade',
closeBtnInside: false,
fixedContentPos: true,
removalDelay: 500
});
// }
});
[/ch_pre]
Use #paypal-success-modal ID for your modal, then add the Condition required in the your conditions here space and then uncomment the codes.
This should definitely work fine. Hope this Helps!
Let us know if we can help you with anything else or if you find any further issues.
NnoornajJan 31, 2021
Thank you! I appreciate it.
Have the same question, or something new?
Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.
Reply on the dashboard