Connecting Tech Pros Worldwide Help | Site Map

php/affiliate integration question

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 17th, 2005, 11:29 AM
max@maxconsulting.us
Guest
 
Posts: n/a
Default php/affiliate integration question

I don't know much about PHP, but I have a small task I need help with.

Could someone tell me how to modify the line after <!--NEW--> in the
code below (paypal.php) in order to get the order number and the
grand_total passed?
as in:

http://www.yourdomain.com/affiliate/...OrderID=XXXXXX

I think this returns the ordervalue:
<?=$SC[order][grand_total] ?>

And this is for order number:

..$order['number'];

but how do I string it all together?

Thank you in advance!

[CODE paypal.php]
<?
// File modified on 12/09/2004 for v1.6.0 - to support change of
PayPal_Email field name to Payment_Email_Address

$paypal_email =
get_field_val("Payment_Methods","Payment_Email_Add ress","Name =
'PayPal'");
$store_info = get_records("Store_Information",0,"record_number =
\"1\"",0,0);
$item_name = $store_info[0][Company_Name]." order # ".$order['number'];
$url = $store_info[0][url];
$PayPal_Button = get_image("Cart_Images","PayPal Button",0,0,1);

// tell the cart to empty, and thank the customer
$SC['complete_order'] = 1;
?>


<span class="header"><?=$Final_Payment_Image?></span><br><br>
Your order has been placed, and is in our database. <br>
To continue, click the button below to submit payment via PayPal. <br>

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="<?=$paypal_email ?>">
<input type="hidden" name="item_name" value="<?=$item_name?>">
<input type="hidden" name="amount" value="<?=$SC[order][grand_total]
?>">
<input type="hidden" name="shipping" value="">
<!-- WRP:MOD --OLD-->
<input type="hidden" name="return" value="<?=$url ?>">
<!--NEW-->
<input type="hidden" name="return"
value="http://www.whiterabbitpress.us/affiliate/scripts/sale.php?...">
<!--MOD END-->
<input type="hidden" name="cancel_return" value="<?=$url ?>">
<input type="hidden" name="no_note" value="1">
<input type="image" src="<?=$PayPal_Button?>" border="0" name="submit"
alt="Make payments with PayPal - it's fast, free and secure!">
</form>
[code]


  #2  
Old July 17th, 2005, 11:30 AM
David Karn
Guest
 
Posts: n/a
Default Re: php/affiliate integration question

If those are the correct variables, you should just be able to do this:
<?='Order Number: '.$order['number'].', Grand Total:
'.$SC[order][grand_total];?>

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.