adding a field to Thanks page

Discussion in 'Customization & add-ons' started by juniorm, Jun 17, 2009.

  1. juniorm

    juniorm aMember Pro Customer

    Joined:
    Nov 13, 2005
    Messages:
    47
    I am trying to integrate PAP4 into my site, with their currency module, so i can record what currency products are sold in for my affiliates.

    what i am trying to do is get amember to pass the currency to PAP4 on the thanks page, but I'm not sure what the variable is called.

    This is the portion of the thanks page:


    PHP:
    <!-- display payment receipt -->
    {if 
    $payment.amount "0.0"}


    <
    script id="pap_x2s6df8d" src="http://localhost/pap/scripts/salejs.php" type="text/javascript">
    </
    script>
    <
    script type="text/javascript">
    var 
    sale PostAffTracker.createSale();
    sale.setTotalCost('{/literal}{$payment.amount}');
    sale.setOrderID('{$payment.payment_id}');
    sale.setProductID('{$payment.product_id}');

    PostAffTracker.register();
    </
    script>


    #_TPL_THX_PAYPROC# <br />
    #_TPL_THX_ORDERREF|{$payment.payment_id}|{$payment.receipt_id}#<br />
    #_TPL_THX_DATETIME|{$payment.tm_completed|date_format:$config.time_format}#<br />

    <br /><br />

    {include 
    file="receipt.inc.html"}
    <
    br /><br />


    {/if}{* 
    END Of receipt display *}

    I'm hoping to add somthing like:
    PHP:
    sale.setCurrency('{$vars.currency}');
    after:
    PHP:
    sale.setProductID('{$payment.product_id}');
    where the currrency value should be soemthing like "USD" or "GBP" or "EUR" etc.

    Any ideas would be greatful
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    What payment plugins you have enabled?
  3. juniorm

    juniorm aMember Pro Customer

    Joined:
    Nov 13, 2005
    Messages:
    47
    I use a variety, including paypal, monebookers.

    all the products i sell have a 'currency' value that you set in the amember control panel, so i hoped i could extract this
  4. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Sure you can use this but this depends on payment system.
    For paypal this will work {$product.paypal_currency} for moneybookers: {$product.moneybookers_currency} etc... If currency for all plugins per product is the same you can just use {$product.paypal_currency}
  5. juniorm

    juniorm aMember Pro Customer

    Joined:
    Nov 13, 2005
    Messages:
    47
    Thanks! This looks like what i need

    I set {$product.paypal_currency} in all products, so I should be able to get that info

Share This Page