Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15
  1. #11
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: How to Integrate ShareASale tracking code?

    And how about the other file?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  2. #12
    Join Date
    Aug 2009
    Posts
    31
    Plugin Contributions
    0

    Default Re: How to Integrate ShareASale tracking code?

    here's the code from the other file:

    <?php
    /**
    * checkout_success header_php.php
    *
    * @package page
    * @copyright Copyright 2003-2007 Zen Cart Development Team
    * @copyright Portions Copyright 2003 osCommerce
    * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    * @version $Id: header_php.php 6373 2007-05-25 20:22:34Z drbyte $
    */

    // This should be first line of the script:
    $zco_notifier->notify('NOTIFY_HEADER_START_CHECKOUT_SUCCESS');

    // if the customer is not logged on, redirect them to the shopping cart page
    if (!$_SESSION['customer_id']) {
    zen_redirect(zen_href_link(FILENAME_TIME_OUT));
    }

    $notify_string='';
    if (isset($_GET['action']) && ($_GET['action'] == 'update')) {
    $notify_string = 'action=notify&';
    $notify = $_POST['notify'];

    if (is_array($notify)) {
    for ($i=0, $n=sizeof($notify); $i<$n; $i++) {
    $notify_string .= 'notify[]=' . $notify[$i] . '&';
    }
    if (strlen($notify_string) > 0) $notify_string = substr($notify_string, 0, -1);
    }
    if ($notify_string == 'action=notify&') {
    zen_redirect(zen_href_link(FILENAME_CHECKOUT_SUCCESS, '', 'SSL'));
    } else {
    zen_redirect(zen_href_link(FILENAME_DEFAULT, $notify_string));
    }
    }

    require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php'));
    $breadcrumb->add(NAVBAR_TITLE_1);
    $breadcrumb->add(NAVBAR_TITLE_2);

    // find out the last order number generated for this customer account
    $orders_query = "SELECT * FROM " . TABLE_ORDERS . "
    WHERE customers_id = :customersID
    ORDER BY date_purchased DESC LIMIT 1";
    $orders_query = $db->bindVars($orders_query, ':customersID', $_SESSION['customer_id'], 'integer');
    $orders = $db->Execute($orders_query);
    $orders_id = $orders->fields['orders_id'];

    // use order-id generated by the actual order process
    // this uses the SESSION orders_id, or if doesn't exist, grabs most recent order # for this cust (needed for paypal et al).
    // Needs reworking in v1.4 for checkout-rewrite
    $zv_orders_id = (isset($_SESSION['order_number_created']) && $_SESSION['order_number_created'] >= 1) ? $_SESSION['order_number_created'] : $orders_id;
    $orders_id = $zv_orders_id;
    $order_summary = $_SESSION['order_summary'];
    unset($_SESSION['order_summary']);
    unset($_SESSION['order_number_created']);

    // prepare list of product-notifications for this customer
    $global_query = "SELECT global_product_notifications
    FROM " . TABLE_CUSTOMERS_INFO . "
    WHERE customers_info_id = :customersID";

    $global_query = $db->bindVars($global_query, ':customersID', $_SESSION['customer_id'], 'integer');
    $global = $db->Execute($global_query);
    $flag_global_notifications = $global->fields['global_product_notifications'];

    if ($flag_global_notifications != '1') {

    $products_array = array();
    $counter = 0;

    $products_query = "SELECT products_id, products_name
    FROM " . TABLE_ORDERS_PRODUCTS . "
    WHERE orders_id = :ordersID
    ORDER BY products_name";

    $products_query = $db->bindVars($products_query, ':ordersID', $orders_id, 'integer');
    $products = $db->Execute($products_query);

    while (!$products->EOF) {
    $notificationsArray[] = array('counter'=>$counter,
    'products_id'=>$products->fields['products_id'],
    'products_name'=>$products->fields['products_name']);
    $counter++;
    $products->MoveNext();
    }
    }

    $flag_show_products_notification = (CUSTOMERS_PRODUCTS_NOTIFICATION_STATUS == '1' and sizeof($notificationsArray)>0 and $flag_global_notifications != '1') ? true : false ;

    $products_displayed = array();


    $gv_query = "SELECT amount
    FROM " . TABLE_COUPON_GV_CUSTOMER . "
    WHERE customer_id = :customersID ";

    $gv_query = $db->bindVars($gv_query, ':customersID', $_SESSION['customer_id'], 'integer');
    $gv_result = $db->Execute($gv_query);

    if ($gv_result->fields['amount'] > 0 ) {
    $customer_has_gv_balance = true;
    $customer_gv_balance = $currencies->format($gv_result->fields['amount']);
    }


    // include template specific file name defines
    $define_page = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/html_includes/', FILENAME_DEFINE_CHECKOUT_SUCCESS, 'false');

    // This should be last line of the script:
    $zco_notifier->notify('NOTIFY_HEADER_END_CHECKOUT_SUCCESS');
    ?>

  3. #13
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: How to Integrate ShareASale tracking code?

    Quote Originally Posted by pennylane View Post
    I'm using ZenCart 1.3.8a and am using PayPal Website Payments Standard for all transactions. It is set up so that the customer returns to my site, to a Thank You page, after payment on PayPal has been made.
    Oh ... I misread that you're using Standard. Now I see why you were intent on using the PayPal code they suggested, even though it's not suitable for Zen Cart sites.
    It's very complicated to get Standard to work reliably ... especially with affiliate programs.
    It's MAJORLY simpler if you're using Express Checkout. ie: if you turn off Standard and turn on Express (and configure it: http://www.zen-cart.com/getpaypal ), your affiliate code will work fine.

    What's happening now is likely that you're testing on a site that's not getting proper communication back from PayPal to release your orders, and thus the affiliate system isn't able to produce any information because there's nothing for it to pass forward. I'm pretty sure it's failing because it's seeing an order-number of 0 because PayPal's background IPN process isn't completing properly on your site.
    While you should still get the IPN process fixed (http://www.zen-cart.com/wiki/index.php/PayPal ) in order to have refunds etc reflected in your store, I strongly recommend using Express Checkout instead.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  4. #14
    Join Date
    Aug 2009
    Posts
    31
    Plugin Contributions
    0

    Default Re: How to Integrate ShareASale tracking code?

    Thank you so much!!

    I switched to PayPal Express and ShareASale is capturing the info.

  5. #15
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: How to Integrate ShareASale tracking code?

    Quote Originally Posted by pennylane View Post
    Thank you so much!!

    I switched to PayPal Express and ShareASale is capturing the info.
    I'm glad that sorted it out for you.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 22
    Last Post: 20 Sep 2021, 02:38 AM
  2. How/Where do I install Conversion Tracking Code
    By boy1da in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 15 Mar 2011, 04:33 PM
  3. Replies: 5
    Last Post: 27 May 2009, 07:50 PM
  4. How do I put a Google tracking code in my checkout-success file?
    By kevinmc3 in forum Templates, Stylesheets, Page Layout
    Replies: 10
    Last Post: 25 Jul 2008, 07:52 PM
  5. Integrate payment gateway code
    By sunny747 in forum Addon Payment Modules
    Replies: 1
    Last Post: 16 Mar 2007, 08:07 AM

Posting Permissions

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