I'm trying to implement a feature that allows the customer to immediately download a free pdf document like a catalog or newsletter from a sidebox. I've created the sidebox, set up a clickable button that initiates the download, and set up a function in includes/functions/extra_functions to do the download. My download function is based on the code in includes/modules/pages/download/header_php.php. Everything appears to work except code following the call to my download function is not executed. The code that calls the download function is in the update method in an observer class. In my download function the call to zen_exit() in the pages/download/header_php.php original code was replaced with a return to get back to the update method, but the return never happens. Observing the comment at the end of the original code that "the script should end here and not attempt to display any template components", I'm concerned with what I have done, even though the download happens and the page is displayed properly following the download.
So, how do I get the code following the call to my download function execute, why must the script end following the download in the original code, and are there any security issues involved in continuing the script after the call to my download function?
Many thanks,
Dave


Reply With Quote
