MrBaseball34 Posted August 18, 2010 Share Posted August 18, 2010 In the product.tpl, there are two links below the image, "Print" and "View Full Size".I'd like to add another called "View Sample Report".Now, I know how to add the HTML, but what is throwing me is where to add the js in product.jsto actually launch the sample report (a PDF file).Can anyone help out here as I can't even figure out how the "View Full Size" calls tb_show function in thickbox.js?I have gone through several files and cannot see where it is being done. Link to comment Share on other sites More sharing options...
rocky Posted August 21, 2010 Share Posted August 21, 2010 You could avoid using Javascript by uploading the sample report as an attachment then setting the link of "View Sample Report" to "{$base_dir}attachment.php?id_attachment=1". Change 1 to the ID of the attachment you want to download. Link to comment Share on other sites More sharing options...
MrBaseball34 Posted August 21, 2010 Author Share Posted August 21, 2010 Doesn't ps_attachments also take a id_product that is supposed to link the two? Link to comment Share on other sites More sharing options...
rocky Posted August 21, 2010 Share Posted August 21, 2010 Yes, the ps_attachments table links attachments to products, but no link is required to download an attachment. The file attachment.php only requires an id_attachment. It's how I created "Download" buttons on my website for my free modules. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now