Forum Replies Created
-
AuthorPosts
-
Group Of Oceninfo
ParticipantI 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.
Group Of Oceninfo
ParticipantHello 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,
Group Of Oceninfo
ParticipantPlease 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.
Group Of Oceninfo
ParticipantThank 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);Group Of Oceninfo
ParticipantI 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
-
AuthorPosts