Quirk when adding links to custom variables


Found a little quirk while setting up invoice notifications. I’m writing the email template and instead of using VIEW and PAY buttons (variables $viewButton and $paypalButton) I am using links instead (variables $viewLink and $paypalLink) so I can customize their texts.

If I select a text and then click on the LINK button on the text editor, and then type in the variable name in the URL popup, the editor automatically adds http:// before it, which is fine with regular URLs but causes trouble with variables since they add their own prefix “https://”.

So if I do this, the URL that is saved in the template gets to be “http://$viewLink”, and when the template is viewed the URL gets to be “https//<urlofmywebsite>.com/<invoicekey>/<etc>”. Since this URL is missing the “:”, it won’t open.

Also, the link popup will lowercase everything, so typing “$viewLink” will change it to “$viewlink” which will make the variable not get replaced dynamically with the correct URL.

Check it out: http://prntscr.com/hdphbk

The solution so far is to edit the raw code and add <a> manually, such as in <a href="$viewLink"> That way, it will work as expected.

My suggestion: make the link URL popup look out for special variables typed in there, and treat them accordingly.

Thanks for pointing this out, we’ll see if we can fix it.

Gawd, someone please edit my post! It created a $viewLink link! :smiley: