1 / 6
Feb 2009

I sell codes that are actually sold as hyperlinks to a web page.



I was wondering if there was a way to make the codes a hyperlink on the Thank you page.



I use something like this:



----

Thank you for your purchase! Below are links to your code(s). Please cut-n-paste the link(s) into your browser.

<br>The links have also been sent to <b>[%payer_email%]</b>.



<p><b>

[%codes%]</b>



-----



As you can see, I have to ask the buyer to cut-n-paste the links. If I can make these clickable, that would be great.

I don't think by including the anchor tag simply in front and after the codes portion would work. I.E.:



Please click on the links below:

<a href="www.example.com> <p><b>

[%codes%]</b> Code 1 </a>

  • created

    Feb '09
  • last reply

    Feb '09
  • 5

    replies

  • 1.1k

    views

  • 2

    users

  • 1

    link

If your codes are complete URLs (http://www.example.com/path/to/file.ext), then you can do something like this in your thank-you page customization fields:



<a href="[%codes%]">[%codes%]</a>



The example above would make the actual URL visible and clickable. If you just want a regular text link to your URL, you could do this instead:



<a href="[%codes%]">Click here for your code</a>



Also note that you can only use HTML in a thank-you page, not in a thank-you email; since thank-you emails are plaintext only, there you could only show the raw URL itself, so it would be up to the buyer's email program to recognize it as a URL and make it clickable.

Okay great. I just tested out a single code and it is working perfect.



Just wanted to make sure it works for multiple links. I.E. if a buyer purchased multiple codes, how does it keep track of which codes are which, or is that done automatically?



For your example,

<a href="[%codes%]">[%codes%]</a>

How does it know if the [%codes%] is for the first link, then display first link on the Thank you page, and continue with the second link, display the second hyperlink on the page, and so forth?



I would've thought that the function would show the codes as one lump, if you know what I mean, so the hyperlinks could be all messed up. Perhaps this is all taken care of internally, as some sort of do loop?

What I feared has come true. I tested out purchasing multiple codes.



When you buy multiple codes, the links come out as one big hyperlink, and are not separated into each individual links.



It does work well if only one code is purchased.



Please help!

Hm, yeah we don't have any way to support what you need for multiple codes. You could only disable the "Let buyers edit quantity" setting for the product, so buyers could only purchase one code at a time. It's either that, or present your codes as unclickable raw URLs.



I wonder if there might be some JavaScript trick that would automatically turn any raw URLs on the page, or within a given section of the page, into clickable links? I'm no JS whiz, so I can't suggest anything specific along those lines; this is just a suggestion as to one possible solution you might investigate further on your own.

I'm no whiz neither :(



What I have thought of, however, since most do buy only 1 code, I will have it hyperlinked as you showed above. And also, down below, I will show the raw URL, and I'll have a disclaimer to people who purchase more than 1 code to use the raw urls.



One code at a time will not work for me as I have set up discounts for my product :)



Thanks for the quick response. Perhaps your programmer can add this to the to-do list.