Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jun 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation Please help, how do i embed a discount code into a link?

    Please help, how do i embed a discount code into a link? i am trying to add a discount code into a link on my site so people will get a discount from another site when clicking it. I am guessing this is easy to do but i have no idea.

    Any help would be really appreciated.

    Rob

  • #2
    Regular Coder LearningCoder's Avatar
    Join Date
    Jan 2011
    Location
    The Pleiades
    Posts
    912
    Thanks
    76
    Thanked 28 Times in 28 Posts
    Good afternoon Robert,

    In your link instead of creating a basic link like 'index.html', you can add the discount code into the link by concatenating it onto the end of the link value via an ampersand.

    If the voucher code never changes, you can hardcode this into the link. Let's say the discount code is Xp91dMe, you could do:
    Code:
    <a href='index.html&code=Xp91dMe'>Click here for a discount!</a>
    Then, whatever page that directs to, you will need to use a serverside language to process the link (i.e - make sure the discount code in the URL matches the actual discount code), then you can decide what to do from there depending on the value.

    Are you doing something similar to affiliate marketing?

    Hopefully someone else can add to my advice!

    Kind regards,

    LC.

  • #3
    New Coder
    Join Date
    May 2009
    Posts
    34
    Thanks
    0
    Thanked 3 Times in 3 Posts
    Like LearningCoder stated, you'll need to create a query string based on the Vendor's requirements. The Vendor might have a parameter of "coupon-code" where they provide you a dedicated code for your business.

    Code:
    Link: http:www.vendor.com&parameter=12345
    Parameter: They supply the parameter.
    12345= The value for that parameter given to you so you get credit.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •