Forums / General Questions / Jrox affiliate and currency convertions

Jrox affiliate and currency convertions

Locked

Started by nellie on 1 Apr 2008, 11:21 AM · Views: 1,192

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
1 Apr 2008, 11:21 AM
#1
nellie avatar

nellie

New Zenner

Join Date:
Sep 2005
Posts:
49
Plugin Contributions:
0

Jrox affiliate and currency convertions

I use jrox affiliate software to generate leads for my zencart 1.3.8 sites. Some sites have there default currency set to pounds, others euros and others dollars. I need to convert the commission values to one common currency in jrox. I found the info below on the jrox forums, but as I am not a developer, I am not sure what the currency variable is and how to use it, see below:

JAM allows you to convert diffferent currency payments to the appropriate amount when triggering commissions in JAM.

To do this, follow these steps:

  1. Make sure to send the "currency" variable to sale.php when triggering a commission. For example:
    http://www.domain.com/affiliates/sale.php?amount=$amount&trans_id=$trans_id&currency='USD'
  2. If you have a currency variable that gets set dynamically, you can use this:
    http://www.domain.com/affiliates/sale.php?amount=$amount&trans_id=$trans_id&currency=$currency
  3. Edit the /includes/currencies.php file to either add or edit the conversion table for your currency.

When JAM processes the commission, it will first lookup the currency conversion amount from the /includes/currencies.php file, then convert it to the proper amount.

Any help would be greatly appreciated.

1 Apr 2008, 3:00 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Jrox affiliate and currency convertions

You probably have added this code to your footer at some point (this is part of the JAM code):echo "<script language=\"JavaScript\" type=\"text/javascript\" src=\"http://www.mydomain.com/affiliates/sale.php?amount=$commissionable_order&trans_id=$orders_id\"></script></td></tr>To send the currency code, alter it as shown:```
echo "<script language="JavaScript" type="text/javascript" src="http://www.mydomain.com/affiliates/sale.php?amount=$commissionable_order&trans_id=$orders_id[B]&currency=$_SESSION['currency'][/B]"></script></td></tr>

.
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.

5 Jun 2008, 6:47 PM
#3
nellie avatar

nellie

New Zenner

Join Date:
Sep 2005
Posts:
49
Plugin Contributions:
0

Re: Jrox affiliate and currency convertions

Hi, sorry been away...

I tried your code, but it did not work, I currently have the code below, how would I need to change it:

[code]
##########################################

START JAM INTEGRATION WITH ZEN CART

ZC Integration code by DrByte 8/2006

##########################################

if (isset($zv_orders_id) && (int)$zv_orders_id > 0 && isset($order_summary) && is_array($order_summary)) {
if (!isset($_SESSION['affiliate_order_id']) || $_SESSION['affiliate_order_id'] != $zv_orders_id ) {
$_SESSION['affiliate_order_id'] = $zv_orders_id;
$commissionable_order_formatted = number_format($order_summary['commissionable_order'], 2, '.', '');
$jamintegrate = file_get_contents('http://www.mydomain.com/jamaffiliates/sale.php?amount=' . $commissionable_order_formatted . '&trans_id=' . $order_summary['order_number'] . '&custom_mid=' . $_COOKIE['jrox']);
}
}

#######################################

END JAM INTEGRATION WITH ZEN CART

#######################################
[code]

10 Jun 2008, 3:00 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Jrox affiliate and currency convertions

You would alter it using the very same approach

 $jamintegrate = file_get_contents('http://www.mydomain.com/jamaffiliates/sale.php?amount=' . $commissionable_order_formatted . '&trans_id=' . $order_summary['order_number'] . '&custom_mid=' . $_COOKIE['jrox'] . **"&currency=$_SESSION['currency']"**);

.
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.

10 Jun 2008, 6:38 AM
#5
nellie avatar

nellie

New Zenner

Join Date:
Sep 2005
Posts:
49
Plugin Contributions:
0

Re: Jrox affiliate and currency convertions

Thanks, all sorted.