X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Simple mod for adding PDF files to product pages. (https://forum.x-cart.com/showthread.php?t=4116)

B00MER 08-25-2003 04:32 PM

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:

View PDF

:!: 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 ;)


All times are GMT -8. The time now is 02:00 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.