Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

eStore – Loading function "wp_aff_set_affiliate_id_form()" behind the scenes

by

Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › eStore – Loading function "wp_aff_set_affiliate_id_form()" behind the scenes

  • This topic has 2 replies, 2 voices, and was last updated 13 years, 1 month ago by halmobi.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • May 4, 2012 at 1:13 am #6234
    halmobi
    Spectator

    Hello,

    We are using eStore, eMember and the Affiliate Platform, all recent builds.

    I got the new build of wp-affiliate-platform v5.1.4 this morning, for the great new shortcode feature [wp_aff_set_affiliate_id].

    What I would really like to be able to do is load the affiliate_id that appears in the shortcode with wp_wp_eStore_coupon_tbl.coupon_code behind the scenes.

    We have created our own custom coupon codes and stored them in a new column in the wp_wp_eStore_coupon_tbl as ‘my_coupon_code’. We issue these coupons, and new buyers enter them during checkout in the “Enter Coupon Code:” box in the shopping cart. The discount is successfully applied, the rest of the sales cycle works great. Now we need to reward affiliates who give out these unique codes that have a one to one relationship with their affiliate ID.

    If our homework is correct, then we need to understand how to modify the code in estore_cart.php in the function eStore_cart_display_enter_coupon_part(). The steps as I see it would be:

    a) Select coupon_code from wp_wp_eStore_coupon_tbl.coupon_code where my_coupon_code = (the value entered in the field .ESTORE_ENTER_COUPON_CODE. of eStore_cart_display_enter_coupon_part())

    b) load the affiliate id in [wp_aff_set_affiliate_id] with the returned value from the SELECT. Maybe this can be a type=”hidden” input?

    c) Hopefully this would trigger the commission award process for the affiliate as if the new buyer had entered the affiliate ID (coupon_code) directly in the form.

    Any help you can provide is greatly appreciated, please let me know if you require any additional info.

    Thanking you in advance,

    Peter

    May 4, 2012 at 6:55 am #44737
    admin
    Keymaster

    If you are using eStore then a better alternative is probably to use the feature eStore offers under the following settings section:

    WP eStore Settings -> AddOn Settings -> Allow Affiliate ID Entry
    WP eStore Settings -> AddOn Settings -> Link Affiliate ID with Coupons Table

    Read the help text for those options and it will explain what they do.

    May 6, 2012 at 2:11 pm #44738
    halmobi
    Spectator

    Thank you so much for your fast and accurate response! We have followed through and were able to successfully get the functionality that we needed.

    These are really great plugins, and you have terrific support. Truly top-notch and totally appreciated!

    Cheers

    Peter

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ