WordPress Affiliate Manager

Affiliates Management Plugin for WordPress

  • Home
  • Features
    • Screen Shots
  • Download
  • Documentation
  • Addons
  • Support
    • Support Forum
    • Forum Login
    • Forum Registration
    • Contact
    • Premium Addon/Plugin Support
You are here: Home

Group Of Oceninfo

  • Profile
  • Topics Started
  • Replies Created
  • Engagements
  • Favorites

Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • September 25, 2017 at 5:25 am in reply to: How to Track Affiliate Commissions? #2947
    Group Of Oceninfo
    Participant

    I think you are using this theme http://wprentals.org/ you can track affiliate easily using this plugin on any WordPress theme.

    You have to use below code on your thank you page where $booking_data[‘booking_no’], $booking_data[‘total_price’]; value will be changed according to your theme parameter.

    Supply booking no and total price value dynamically from the thank you page after booking, It’ll take affiliate ID dynamically via cookies value, so leave aff_id code as it is.

    $args = array();
    $args['txn_id'] = $booking_data['booking_no'];
    $args['amount'] = $booking_data['total_price'];
    $args['aff_id'] = $_COOKIE['wpam_id'];  //not $aff_id = $_COOKIE['wpam_id'];
    do_action('wpam_process_affiliate_commission', $args);

    After supplying this code on thank you page with all the value then you can track affiliate booking easily and affiliate can also see the booking in affiliate dashboard.

    FYI>> It won’t work if you are sending user to book on third party website.

    July 26, 2017 at 10:32 am in reply to: How to Track Affiliate Commissions? #2846
    Group Of Oceninfo
    Participant

    Hello All,

    I have found the solution, It was not picking up value from the cookies Code updated under /wp-content/plugins/affiliates-manager/classes/CommissionTracking.php

    From
    //$aff_id = $args['aff_id'];
    To
    $aff_id = $_COOKIE['wpam_id'];

    It’s working smoothly now.

    Thank you,

    July 26, 2017 at 8:42 am in reply to: How to Track Affiliate Commissions? #2845
    Group Of Oceninfo
    Participant

    Please see logs wpam-log.txt file record as below.

    [07/26/2017 8:12 AM] - SUCCESS : Affiliate Application for Testing Affiliate Website
    [07/26/2017 8:12 AM] - SUCCESS : Sending an email to [email protected]
    [07/26/2017 8:12 AM] - SUCCESS : Email was sent successfully by WordPress
    [07/26/2017 8:12 AM] - SUCCESS : New Affiliate Registration
    [07/26/2017 8:12 AM] - SUCCESS : Sending an email to [email protected]
    [07/26/2017 8:12 AM] - SUCCESS : Email was sent successfully by WordPress
    [07/26/2017 8:22 AM] - SUCCESS : handle_commission_tracking_hook() - Txn ID : 86796, Amount: 100.90, Affiliate ID: 

    Affiliate ID field is coming up blank, I have cross checked Affiliate ID value is present under cookies.

    I feel if we get affiliate ID from cookies then it’ll sort this out commission tracking issue.

    July 26, 2017 at 7:12 am in reply to: How to Track Affiliate Commissions? #2843
    Group Of Oceninfo
    Participant

    Thank you for your reply, Yup I am adding this code into confirmation page .php file called booking-confirmation.php I have added right after payment confirmation code that’s why it’s picking up value dynamically but not showing any commission into affiliate commission section. Nothing recorded.

    So, How I can supply value in do_action('wpam_process_affiliate_commission', $args);

    July 26, 2017 at 5:26 am in reply to: How to Track Affiliate Commissions? #2840
    Group Of Oceninfo
    Participant

    I am using below code to trigger into wpam_process_affiliate_commission but it’s not showing anything into WP Backend.

    if(strpos($_SERVER['REQUEST_URI'], 'accommodation-booking-confirmation/?booking_no') !== false){
    	$args = array();
    	$args['txn_id'] = $booking_data['booking_no'];
    	$args['amount'] = $booking_data['total_price'];
    	$aff_id = $_COOKIE['wpam_id'];
    	do_action('wpam_process_affiliate_commission', $args);
    }

    I have tested using below code and it’s showing correct value into front-end.

    if(strpos($_SERVER['REQUEST_URI'], 'accommodation-booking-confirmation/?booking_no') !== false){
    		$args = array();
    		$args['txn_id'] = $booking_data['booking_no'];
    		$args['amount'] = $booking_data['total_price'];
    		$aff_id = $_COOKIE['wpam_id'];
    		do_action('wpam_process_affiliate_commission', $args);
    	echo "<pre>";
    	print_r($args['txn_id']);
    	echo '<br/>';
    	print_r($args['amount']);
    	echo '<br/>';
    	print_r($aff_id);
    	echo '<br/>';
    	echo 'Booking Confirmed';
    	} else {
    	echo 'Booking Is Not Confirmed';
    }

    Can you please let me know where I am doing wrong? How I can trigger and supply this value into Affiliate Commissions

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)

Featured Addons

  • WooCommerce Coupon Tracking
  • WooCommerce Product Specific Commission

Copyright © 2026 | WordPress Affiliate Manager | Privacy Policy