php/affiliate integration question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • max@maxconsulting.us

    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:



    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_A ddress

    $paypal_email =
    get_field_val(" Payment_Methods ","Payment_Emai l_Address","Nam e =
    'PayPal'");
    $store_info = get_records("St ore_Information ",0,"record_num ber =
    \"1\"",0,0);
    $item_name = $store_info[0][Company_Name]." order # ".$order['number'];
    $url = $store_info[0][URL];
    $PayPal_Button = get_image("Cart _Images","PayPa l Button",0,0,1);

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


    <span class="header"> <?=$Final_Payme nt_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="<?=$payp al_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.whiterabbit press.us/affiliate/scripts/sale.php?...">
    <!--MOD END-->
    <input type="hidden" name="cancel_re turn" 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]

  • David Karn

    #2
    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];?>

    Comment

    Working...