Results 1 to 2 of 2

postaffiliatepro code compatability ?

This is a discussion on postaffiliatepro code compatability ? within the osCmax v2 Customization/Mods forums, part of the osCmax v2.0 Forums category; Hi I want to use PostAffiliatePro for affiliates. It has an integration guide for oscom ..see below ..but will this ...

      
  1. #1
    New Member
    Join Date
    Oct 2005
    Location
    Plymouth UK
    Posts
    11
    Rep Power
    0


    Default postaffiliatepro code compatability ?

    Hi

    I want to use PostAffiliatePro for affiliates.

    It has an integration guide for oscom ..see below ..but will this work on oscmax ?

    Thanks

    Roy


    1. Find and open file checkout_success.php

    2. Inside the file find this line
    if ($global['global_product_notifications'] != '1') {
    ...

    3. insert the following code just above that line

    //--------------------------------------------------------------------------
    // integration code
    //--------------------------------------------------------------------------
    // get order id
    $sql = "select orders_id from ".TABLE_ORDERS.
    " where customers_id='".(int)$customer_id.
    "' order by date_purchased desc limit 1";
    $pap_orders_query = tep_db_query($sql);
    $pap_orders = tep_db_fetch_array($pap_orders_query);
    $pap_order_id = $pap_orders['orders_id'];

    // get total amount of order
    $sql = "select value from ".TABLE_ORDERS_TOTAL.
    " where orders_id='".(int)$pap_order_id.
    "' and class='ot_subtotal'";
    $pap_orders_total_query = tep_db_query($sql);
    $pap_orders_total = tep_db_fetch_array($pap_orders_total_query);
    $pap_total_value = $pap_orders_total['value'];

    // draw invisible image to register sale
    if($pap_total_value != "" && $pap_order_id != "")
    {
    $img = '<script id="pap_licencecode" src="http://www.mysite.com/scripts/sale.js" type="text/javascript"></script>
    <script type="text/javascript"><!--

    var TotalCost="'.$pap_total_value.'";
    var OrderID="'.$pap_order_id.'";
    var ProductID="";
    papSale();
    --></script>';
    print $img;
    }
    //--------------------------------------------------------------------------
    // END of integration code
    //--------------------------------------------------------------------------

  2. #2
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,501
    Rep Power
    567


    Default Re: postaffiliatepro code compatability ?

    Should work fine. Give it a shot and post back any problems.
    Michael Sasek
    osCMax Developer


    osCmax installation service - Have our professionals install osCmax on your server - same day service!
    osCmax 2.0 User Manual - the must have beginners guide to osCmax v2.0

    Stay Up To Date with everything osCMax:
    Free osCMax Newsletters - Security notices, New Releases, osCMax News
    osCMax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

Similar Threads

  1. need help locating this line of code
    By technoboy in forum osCmax v2 Customization/Mods
    Replies: 3
    Last Post: 02-09-2006, 01:01 PM
  2. Where to get colour code
    By tyz6970 in forum osCommerce 2.2 Modification Help
    Replies: 4
    Last Post: 08-02-2004, 09:46 AM
  3. bookmark code
    By modom in forum osCommerce 2.2 Modification Help
    Replies: 3
    Last Post: 01-03-2003, 08:33 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •