Forum Replies Created
-
AuthorPosts
-
September 24, 2015 at 11:52 am in reply to: Transfer php parameters to external affiliate program with thank you page #71430erfolg2Member
We have another affiliate programm which have to be integrated into eStore. We want to track the sales outside of WordPress with this program.
Instructions
We need an add-on for wp-eStore.
Functions:
Display an echo-command on the thank-you-page.
On the thank-you-page is the shortcode [wp_eStore_display_transaction_result].
We need the add-on either to expand the shortcode if set or we create a new shortcode for this add-on, which makes displaying our echo-command.
The echo-command should be like this:
<?php
echo “<img src=’http://[partnerurl]/verkauft.php?preis=” . [price variable] . “&order_id=” . [trans_id] . “&remark_admin=” . [first name] . ” ” . [last name] . ” ” . [email] . ” ” . [customer id] . “‘ height=’1′ width=’1′ border=’0’>”;
?>
[partnerurl] – domain/url to the partnerprogram location anythin like [http://domain.tld]
[price variable] – variable of price either total_minus_total_tax or any aquivalent (price with/-out taxes)
[trans_id] – $transaction_id, means eStores transaction id from for instance paypal or whatever
At the remark admin area – the partnerprogram is coded into iso, so I think we would need a rawurlencode?
[first name] – rawurlencode($firstname)
[last name] – rawurlencode($lastname)
[/email][email] – rawurlencode($buyer/customer_email)
[customer id] – the unique customer id of eStore for this customer
What do we need within the add-on?
– The possibility to set the url to the program
– the choice between price parameters (total with tax, total minus tax)
– the possibility to do remark admin by choice (check boxes) for above variables
A shortcode or an automated integration in the specified thank-you-page.
What we have tried:
We used this function and created:
– a new custom template for the wordpress tahnk-you-page
– integrated this function into the page
– used only the echo-command and integrated into the page
<?php
add_action(‘eStore_product_database_updated_after_payment’, ‘custom_log_commission’, 10, 2);
function custom_log_commission($ipn_data, $cart_items)
{
$sale_amt = $ipn_data;
$trans_id = $ipn_data;
$customvariables = get_custom_var($ipn_data);
//Do something here
echo “<img src=’http://[partnerurl]/verkauft.php?preis=” . [price variable] . “&order_id=” . [trans_id] . “&remark_admin=” . [first name] . ” ” . [last name] . ” ” . [/email][email] . ” ” . [customer id] . “‘ height=’1′ width=’1′ border=’0’>”;
}
?>
Only the echo-command integrated into the thank-you-page triggered the partner program and counted a sale, but we had no prices or other variables transmitted (price has been shown as 0)
Please help and tell us, if you can do this – and please tell us what costs we should expect.
Thanks in advance
Alexander
[/email]
-
AuthorPosts