I am trying to get my x-cart to show a PDF Download button when there is a PDF available to download.
I have created an extra field for PDF's so that if the product has a PDF you can just put y or yes and it will show button and then created a pdf folder with a file based on the productcode.
If I leave it as hardcode text so that it just says "Download PDF" in rolloverable text it works fine, but what I want to do is create a button that appears, which to some extent works but the link doesnt?
Code:
{if $extra_fields[1].field_value} {include file="buttons/pdf_button.tpl" style="button" href="http://www.kitinfo.co.uk/kitwarehouse/pdffiles/{$products[product].productcode}.pdf"} {/if}
I have created a pdf_button.tpl and a folder to place the pdfs in named on just their productcodes.
The problem is the code seems to mess up and it brings in some coding??
[img]http://www.kitinfo.co.uk/Images/download.jpg
[/img]
if I leave it like this it works fine??
Code:
{if $extra_fields[1].field_value}
download
{/if}
Anyone any ideas??