0

So I have an affiliate account with TicketFly that will help us make a few bucks when we send someone to purchase a ticket through their system.

My question is what do you guys think is the best way to take this url http://www.ticketfly.com/purchase/event/450737/ and convert it into http://www.shareasale.com/r.cfm?u=841156&b=234786&m=27601&afftrack=&urllink=www%2Eticketfly%2Ecom%2Fpurchase%2Fevent%2F450737%2F?

I have to make sure that our Affiliate ID number 841156 and TF's ID 27601 remains part of the query as well as the urllink parameter. I'm just not sure what path to take. Do I use some concoction of Low Replace or something else?

Any help would be greatly appreciated!

2
  • Clarify how/where the URL you're mentioning is stored; is it a stand-alone text field? Is it embedded within an anchor in a WYSIWYG? – Nick Benson Jan 14 '14 at 20:30
  • It's in a stand alone text input field – Mark Busnelli Jr Jan 14 '14 at 20:36
1

I believe the only part of the original URL you need is the numeric part, which contains the event ID. You should be able to build an anchor using something like this:

http://www.shareasale.com/r.cfm?u=841156&b=234786&m=27601&afftrack=&urllink=www%2Eticketfly%2Ecom%2Fpurchase%2Fevent%2F{some regex that will extract numbers from your URL field}%2F

CE String and Low Replace both support regex, not sure on the specifics of the syntax, but, that should be enough to get you going in the right direction.

Edit - CE String Syntax

CE String's syntax for doing this would be: {exp:ce_str:ing preg_rep='[^0-9]||Us' trim}{your_field_with_numbers}{/exp:ce_str:ing}

So, I believe you could build your anchor with this:

http://www.shareasale.com/r.cfm?u=841156&b=234786&m=27601&afftrack=&urllink=www%2Eticketfly%2Ecom%2Fpurchase%2Fevent%2F{exp:ce_str:ing preg_rep='[^0-9]||Us' trim}{your_field_with_the_url}{/exp:ce_str:ing}%2F

3
  • Okay cool. That's the lines of what I was thinking too. I work through it tonight and see what happens! – Mark Busnelli Jr Jan 14 '14 at 21:31
  • 1
    Found the CE String syntax I used on an earlier project; hopefully that will be sufficient. Good luck! – Nick Benson Jan 14 '14 at 21:33
  • 1
    Thanks again! I was able to use shareasale.com/…{exp:low_replace find='[^0-9]' regex='yes'}{mycustomlink}{/exp:low_replace}%2F to get the information necessary. – Mark Busnelli Jr Jan 15 '14 at 22:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.