View Single Post
  #1  
Old 08-25-2003, 04:32 PM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default Simple mod for adding PDF files to product pages.

First create a new extra field, I'm assuming you have no extra fields yet, so i'm using param00... Open customer/main/product.tpl and insert:

Code:
{literal} <SCRIPT language=JavaScript1.2> <!-- function productpdf(param) { var w = "420"; //width var h = "420"; //height window.open(param,"productpdf","width="+w+",height="+h+",resizable,scrollbars=yes"); } --> </SCRIPT> {/literal}

Now add the following button to your product page:

Code:

NOTE: If you have extra fields already you'll need to adjust {$product.param00} to reflect the correct extra field with the pdf location you specify below...

I use the files area to upload the PDF files to a newly created directory, then reference the file in the products extra field...

Code:
/xcart/files/pdfs/my.pdf

Simple, but it works... kudos
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote