Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21
  1. #11
    Join Date
    Feb 2005
    Posts
    27
    Plugin Contributions
    0

    Default Re: Coupon Code in URL

    We ended up implementing the method that I posted above... we capture the GET variable in the URI by using something like:

    Code:
    if (!empty($_GET['tracking_code']))
        $_SESSION['tracking_code'] = $_GET['tracking_code'];
    at the bottom of the index.php page. That will sessionize the variable so that you can access it later on. Make sure that you sanitize the variable before sessionizing it though, just to be safe! Also, be sure to not use a variable name that conflicts with core ZC variables.

    Then, in includes/modules/pages/checkout_success/header_php.php, I wrote a custom function which grabs my sessionized tracking code and writes it to a unique database table.

    You could do something similar by writing the tracking code (plus any other pertinent data) to your own db table when someone registers and then retrieve it later on. You'll just have to explore the modules to figure out where the registration happens. Make sure that you take good notes, because you'll have to re-write all of that code when you upgrade ZC.

    Good luck!

    Kevin

  2. #12
    Join Date
    Jan 2004
    Posts
    66,419
    Blog Entries
    7
    Plugin Contributions
    81

    Default Re: Coupon Code in URL

    Quote Originally Posted by gmoyle
    I have a need for capturing the Referral code on account creation as well
    Admin->Configuration->Customer Details->Customers Referral Status
    Customers Referral Status
    Customers Referral Code is created from:
    0= Off
    1= 1st Discount Coupon Code used
    2= Customer can add during create account or edit if blank

    NOTE: Once the Customers Referral Code has been set it can only be changed in the Admin->Customer->Customers area
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #13
    Join Date
    Oct 2006
    Location
    knoxville Iowa
    Posts
    21
    Plugin Contributions
    0

    Re: Coupon Code in URL

    how about option #3, can add during account creation only.
    That way they can't come back later after they've perhaps made purchases, or maybe talked to their buddy and give their buddy credit when it fact they found the site ahead of time.

  4. #14
    Join Date
    Jan 2004
    Location
    Reno, NV
    Posts
    123
    Plugin Contributions
    0

    Default Re: Coupon Code in URL

    Quote Originally Posted by DrByte View Post
    Admin->Configuration->Customer Details->Customers Referral Status
    Yes, I already use that Dr. Byte, but what I am requesting is the ability to add it to a link and have that held so that when the user DOES create the account, its already autofilled. I want to try to make it as automated as possible.

    Right now, people forget, or dont bother to enter it. If its prefilled I beleive they would be likely to leave it filled.

  5. #15
    Join Date
    Jan 2007
    Location
    Arvada, Colorado
    Posts
    2
    Plugin Contributions
    0

    Default Re: Coupon Code in URL

    I am looking for the same thing. We have our banners posted on several sites (i.e. MySpace) and I would like a way to change the linking code (i.e. <a href=bla bla bla...) to a promotional discount so when a user clicks the link they automatically get a percentage off. I can go back and turn off the "promotional discount" when I choose. Since I supply and host the banners I can edit the banner to no longer offer the discount when I turn off the discount.

    Is this possible and what would the code be?

    Thank you,
    Ryan

  6. #16
    Join Date
    Jul 2005
    Location
    UK and Ireland
    Posts
    258
    Plugin Contributions
    1

    Default Re: Coupon Code in URL

    Seems like there are a growing number of Zenners seeking some good "Advertising Tracking" services for their businesses.

    The Module “Advertizing Tracker Contribution” used to be quite helpful (and still will be to lots of people) allowing companies who advertise within different magazine publications, web ads, banner ads, search engines, etc and who were never able to determine exactly what drove customers to their site. When a client made a purchase they were asked the question "Where did you hear of us" which gave some tracking results.

    Of course, this wasn't good enough for monitor all referrals to the site i.e. those who didn't make an order or for those who did (customers were asked to select from a list of options rather than for that information being captured in the background).

    I'd really like to hear from Kevin about how he has got on with his work and more also from other Zenners who have opted for 3rd party scripts that specialise in Click Tracking (e.g. http://www.hotscripts.com/PHP/Script...ing/index.html) - Are you using any that you can recommend?

    Maybe the need for Click tracking moves outside of the ZenCart arena - Linda what's your thoughts on this? Should Zen just focus on allowing/monitoring sales (using coupons etc) or is Click Tracking now such a standard business need that it should be incorporated in the future?

    In the mean time I will keep reviewing other 3rd party scripts and post back any findings.

    Regards

    Jamie

  7. #17
    Join Date
    Feb 2005
    Posts
    27
    Plugin Contributions
    0

    Default Re: Coupon Code in URL

    Hey there Jamie. We've had pretty good luck with the bit of scripting that I inserted. It was kind of a rush job, so it's definitely not module-worthy, but it fits our needs pretty well. I wrote my own control panel for ZC because we do a lot of custom reporting. The custom db table records the order number and the tracking code, so I just added a join in my SQL queries to compile things like order total, items, and tracking codes.

    We do a lot of search engine advertising on google, yahoo and msn as well as some banners and affiliates, so it's imperative that we can trace orders back to the advertising. This concept was pretty simple to implement and so far it hasn't caused any problems other than adding a step to the ZC update process.

    Here's the over simplified logic:
    1. attach a tracking code to the url (domain.com/index.php?tracking=code)
    2. in index.php, sessionize $_GET['tracking']
    3. in checkout_success, grab the order insert id and insert the tracking code into a custom db table

    I think the concept is module worthy. I haven't written any modules yet, but it can't be that tough, right? This feature is definitely worthwhile. If anyone wants to start a 3rd party module project, I would be more than happy to help out!

    Kevin

  8. #18
    Join Date
    Feb 2005
    Posts
    27
    Plugin Contributions
    0

    Default Re: Coupon Code in URL

    I was just rereading the thread, and I should probably clarify a bit. The original method was to insert the tracking code into the coupon code field, but this is a much more elegant solution.

    The new method uses a custom database table to associate an order number with an arbitrary string to use as a tracking code. NOTE: this is not a coupon code, or anything created from within the ZC control panel, just a bit of text like "google" or "msn."

    1. When a URL arrives with "tracking=google" I sessionize it
    2. In includes/modules/pages/checkout_success/header_php.php you can locate the order id ($zv_orders_id)
    3. Write the order id and sessionized tracking code to a custom table so that you don't have to ##############ize the ZC schema

    Then, when I do my reporting I can do something like:
    Code:
    SELECT orders.order_total,custom_reporting.code FROM `orders`,`custom_reporting` WHERE custom_reporting.code = "google" and orders.orders_id = custom_reporting.orders_id;
    Which will return any orders that came from google. Of course, you can write any number of queries to list all tracking codes, search by date range, etc.

  9. #19
    Join Date
    Jul 2007
    Posts
    38
    Plugin Contributions
    0

    Default Re: Coupon Code in URL

    It's been a while since the last post to this thread, but I'm trying to achieve the following (which seems highly similar to that of previous posters) but wasnt able to find a solution as of yet:

    1. I create a customer referral coupon
    2. A potential customer receives an email saying: "Visit the website using the following link for instant 10&#37; discount: http://www.website.com/index.php?customers_referral=COUPON", where COUPON is ofcourse the actual coupon code.
    3. When the customer clicks the URL, it automatically fills the value for Customer Referral to COUPON

    I was looking at the create_account.php file, but wasnt yet able to figure it out.. It seems to be passed on to the templates at the bottom, but I have no idea where to go next..

    Appreciate anyone's thoughts or suggestions!

  10. #20
    Join Date
    Jul 2007
    Posts
    38
    Plugin Contributions
    0

    Default Re: Coupon Code in URL

    Haha, ignore my above post. This seems to be exactly what it does. Just didnt think the sessions through properly :)

    I created ref=CODE and then pull that back in the create_account.php code. Awesome solution! Thanks lots!

 

 
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. Redeeming coupon code from URL?
    By Cindy2010 in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 13
    Last Post: 2 Sep 2013, 03:58 AM
  2. how can I code in a default coupon code into checkout page redeem, then auto-refresh?
    By lankeeyankee in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 1
    Last Post: 29 Nov 2008, 04:56 AM
  3. Embedding coupon code in URL?
    By thewolf in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 2
    Last Post: 13 Jun 2008, 09:58 PM
  4. Coupon code URL
    By HardNutrition in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 2
    Last Post: 8 May 2008, 12:11 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR