Please Help

<?php require_once('easy_affiliate.class.php'); // add this line if you havent already included this file $easy_affiliate->markBuy($id_user, $id_order, $price, $is_paid); ?>

Here is a description of the variables:

$id_user: some kind of unique id of the user, integer or user ip
$id_order: some kind of unique id of the order, if left empty, a unique id from the page address will be generated
$price: what is the total sum of the order, from this price the earning for the affiliate will be calculated
$is_paid: if the purchase is paid right (credit card, paypal) away enter 1, if not (wire) then enter 0

I need help making that code work with my site, this is what I tried using and it gave me this error:

Parse error: syntax error, unexpected ‘1’ (T_LNUMBER), expecting variable (T_VARIABLE) or ‘$’

<?php $easy_affiliate->markBuy($transaction_slug, $id_order, $accepted_offer, $1); ?>

You can not have a variable that is numeric. Therefore, $1 will not work. You can rename it with a letter at
the beginning, but, $1 will not work.

<?php $easy_affiliate->markBuy($transaction_slug, $id_order, $accepted_offer, 1);

Hi Jim,

This issue has been bugging me all night long…

I tried that and got this error:

[code]

A PHP Error was encountered

Severity: Notice

Message: Undefined variable: easy_affiliate

Filename: sale/track_order.php

Line Number: 2

[/code]

The page has gone all white now with a 1 in it. This is my current code:

<?php require_once('../macmetro/affiliates/easy_affiliate.class.php'); $easy_affiliate->markBuy($transaction_slug, $id_order, $accepted_offer, 1); ?>

While developing you should display all errors, start your script(s) with this:

[php]<?php
error_reporting(E_ALL);
ini_set(‘display_errors’, 1);[/php]

[hr]

A white page is usually a fatal error / internal server error.

Sponsor our Newsletter | Privacy Policy | Terms of Service