Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Simple mod for adding PDF files to product pages.

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #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
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 05:58 AM.

   

 
X-Cart forums © 2001-2020