View Single Post
  #13  
Old 07-09-2010, 06:10 PM
 
Bearsnum34 Bearsnum34 is offline
 

Senior Member
  
Join Date: Jan 2010
Posts: 134
 

Default Re: Adding a .pdf page to a product description

Oh my so much to do when building a cart from scratch. Thank you for the info tal, I am just going to finish adding all my products, etc. I will put *** where the .pdf need to go and when I am ready to do it i will go back to this post. I thought I could do it all at once but I guess not.

I took a break from the cart work as it was getting too stressful. Back at it!

Thanks so much,

Quote:
Originally Posted by Tal
be careful with how you link it as well.

Lets say your site is www.domain.com and you have a folder called "pdf" in a sub-directory in the main root so it would be www.domain.com/pdf/

Theres several ways of linking. To save typing, I'll just show what goes in the href.

http://www.domain.com/pdf/file.pdf = This is not how you want it since you'll be switching TLDs (net to com). Also would produce security warnings due to http being explicitly defined, as said before.

pdf/file.pdf = If you're doing something from template files, this will not work as it will search the folder the script is called from... Which in this case will be under skin1.

/pdf/file.pdf = This will start from web-root and go down. If you put a / at the very start of any link, it will start from your webroot folder. So this would properly go to the folder.

./pdf/file.pdf = This will be a mix between the previous two. It will start within the folder its called from and then go up one directory level and then search for the folder pdf. So in this case, it would go from skin1 -> root -> pdf



Just wanted to make sure you knew incase you were thinking of a way to automatically do this within tpl files.
__________________
4.3.1
x-configurator
x-specialoffers
Reply With Quote