Zen Cart Logo
Forums / All Other Contributions/Addons / Need variables for idevaffiliate variable pass ons?

Need variables for idevaffiliate variable pass ons?

Locked

Views: 1,959

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
31 May 2009, 2:57 PM
#1
s2kinteg916 avatar

s2kinteg916

New Zenner

Join Date:
May 2009
Posts:
1
Plugin Contributions:
0

Need variables for idevaffiliate variable pass ons?

Im trying to use the optional variable pass on but im having a bit of confusion where to find the variables.

Directions

This feature allows you to pass additional information to your commission records. In addition to the (default) order number, you can pass other items such as the customer name, IP address, street address, item(s) purchased, etc. You can pass up to 3 additional items.

Integration Profile: Zen Cart
For information about which variables are available, consult your shopping cart provider.
When entering the variable name, enter it exactly as it was given to you by your provider

Any help would be greatly appreciated.

31 May 2009, 3:24 PM
#2
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Need variables for idevaffiliate variable pass ons?

s2kinteg916:

Im trying to use the optional variable pass on but im having a bit of confusion where to find the variables.
<snip>
Any help would be greatly appreciated.

The variables available to you will depend very much on the code that is running at the time you wish to use them. For example, many of the shipping module variables won't be available during the checkout procedure, and most of the checkout variable won't be avialable unless you are on one of the checkout pages, and so on.

Most good IDE's will have means to show what variables are available at any given time, but if you want a VERY CRUDE method to show all the variables (and values) available at any given time simply insert the following code snippet into you code at the point you wish to use them.

var_dump(get_defined_vars()) ; exit

Cheers
Rod

31 May 2009, 6:41 PM
#3
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Need variables for idevaffiliate variable pass ons?

This takes me back several years, but I've had this on my hard drive since 2006 or so... I was considering IDEV at the time.

I am NOT SURE if this is relevant, but here it is anyway:

--------------------------------------------
Add iDevAffiliate to your Zen Cart-
--------------------------------------------

1. Login to your iDevAffiliate Admin Center and click on Cart Integration.

2. Pick the Automatic Integration Method and continue to the next page.

3. Choose Zen Cart in the dropdown menu then click Update And Continue To Next Page.

4. Follow the instructions on the next page (Processing Code).

--------------------------------------------
These instructions are listed below as well.
--------------------------------------------

1. Copy this file: /includes/templates/template_default/templates/tpl_checkout_success_default.php.

2. Find the following code which already exists in the file.
 
  <?php echo TEXT_YOUR_ORDER_NUMBER . $zv_orders_id; ?>
 
3. Cut/Paste the following code into the file (under the code above).
 
<?
$idev = $db->Execute("select * from " . TABLE_ORDERS_TOTAL . " where orders_id = '".(int)$orders->fields['orders_id']."' AND class = 'ot_subtotal'");
$idev_zen_1 = (number_format($idev->fields['value'],2));
$idev_zen_2 = $idev->fields['orders_id'];
print "<script language=JavaScript type=text/javascript src=http://www.yoursite.com/idevaffiliate/sale.php?idev_zen_1=$idev_zen_1&idev_zen_2=$idev_zen_2></script>";
?>

4. Save the file to your custom template. /includes/templates/YOUR_TEMPLATE/templates/

--------------------------------------------
Notes.
--------------------------------------------
Be sure to adjust the path in step #3 so it correctly points to your iDevAffiliate installation location.