Jump to content

Adding another "Useful Link"


MrBaseball34

Recommended Posts

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.js
to 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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...