Do you have custom scripts needed to incorporate into your zen-cart store template, but not sure where to customize it?
Zen-cart has the built-in template over-ride system that lets your add your own template file without changing the default template. You can add the corresponding files to the relevant zen-cart template folder, and the changes will override the default values.
If you need to add the script before </body> tag, you can make the modifed tpl_main.php from source and then put the file in the template custom folder.
The above will apply the code on site-wide basis. For custom script on specific pages, you will need to create the page folder just like custom template for containing the modified php file.
For instance, a folder called checkout_shipping in /templates/your_template/templates/ will be like this: /templates/your_template/templates/checkout_shipping/
Make sure you use the original file before you make modifications.