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

How to create a link in product.tpl

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-22-2005, 03:44 AM
 
weckie weckie is offline
 

eXpert
  
Join Date: Feb 2005
Location: Netherlands
Posts: 220
 

Default How to create a link in product.tpl

I would like to know how to create a link in product.tpl.
What i want: we sell Weck canners and i want the possibility for the customer to download the manual in pdf. I can create an extra field in which the name of the manual is. But how te create the download link i dont know.

I hope anyone can help me...

Regards
__________________
Herman Steijn

Using: X-cart 4.5.4
AT: http://www.weckonline.com LIVE
Reply With Quote
  #2  
Old 02-22-2005, 03:56 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

hard code the full link into the extra field value

ie

Code:
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #3  
Old 02-22-2005, 04:27 AM
 
weckie weckie is offline
 

eXpert
  
Join Date: Feb 2005
Location: Netherlands
Posts: 220
 

Default

thanks for the suggestion, but it doesn't work for me, every product has a different manual. the link must take the name from the product manual out of the database.....

Regards
__________________
Herman Steijn

Using: X-cart 4.5.4
AT: http://www.weckonline.com LIVE
Reply With Quote
  #4  
Old 02-22-2005, 05:11 AM
 
weckie weckie is offline
 

eXpert
  
Join Date: Feb 2005
Location: Netherlands
Posts: 220
 

Default

sorry, the solution works for me. BUT

xcart removes the coding in the extra fields...
__________________
Herman Steijn

Using: X-cart 4.5.4
AT: http://www.weckonline.com LIVE
Reply With Quote
  #5  
Old 02-22-2005, 06:07 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

try a search for trusted variables.

xcart will strip code out of certain things as a security measure

you could also hard code something like this into your page

Code:
{if $extra_field[0].field_value} <a href="http://yourstore.com/filesdir/{$product.productid}.pdf ">Download PDF</a> {/if}

this will check if the first extra field has anything in it (such as Y) and if it does it will show the download link for the pdf which you must name as the product id number with the pdf extension

ie

productid = 456

would turn into

Code:
<a href="http://yourstore.com/filesdir/456.pdf ">Download PDF</a>
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #6  
Old 02-22-2005, 07:49 AM
 
weckie weckie is offline
 

eXpert
  
Join Date: Feb 2005
Location: Netherlands
Posts: 220
 

Default

all right, this is it.

i will try it later on tonight

Thanks.
__________________
Herman Steijn

Using: X-cart 4.5.4
AT: http://www.weckonline.com LIVE
Reply With Quote
  #7  
Old 04-08-2006, 06:28 AM
 
mlowrey mlowrey is offline
 

Member
  
Join Date: Mar 2005
Posts: 28
 

Default

Can someone please explain me how to do this in a few steps and in wich files do i have to modify it ?

this would be very helpfull and would be the first clear "how to add a pdf file post "

thx
__________________
4.0.16 stable and testing 4.10 rc4 - ALL THE QUESTIONS ARE FOR 4.1
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 02:10 PM.

   

 
X-Cart forums © 2001-2020