Results 1 to 10 of 15

Hybrid View

  1. #1
    Join Date
    Aug 2009
    Posts
    31
    Plugin Contributions
    0

    Default Re: How to Integrate ShareASale tracking code?

    I put it in in two places . both show, so the tracking code is in the correct file. any other thoughts?

    ABCDEFG
    <!--ShareASale tracking code -->
    ABCDEFG

    <!--End ShareASale tracking code -->

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

    Default Re: How to Integrate ShareASale tracking code?

    What version of Zen Cart?
    What's in your /includes/modules/pages/checkout_success/header_php.php file?
    And, please post your full customized tpl_footer.php file that you've been editing.
    I'm guessing that the various "if" statements are causing the failure ... ie: the order id and order summary don't exist ... presumably because of some customization you've got on your site, or outdated versions of core files.
    .

    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.

  3. #3
    Join Date
    Aug 2009
    Posts
    31
    Plugin Contributions
    0

    Default Re: How to Integrate ShareASale tracking code?

    Thanks for responding so quickly!!

    I'm using ZenCart 1.3.8a

    here's the code:

    <?php
    /**
    * Common Template - tpl_footer.php
    *
    * this file can be copied to /templates/your_template_dir/pagename<br />
    * example: to override the privacy page<br />
    * make a directory /templates/my_template/privacy<br />
    * copy /templates/templates_defaults/common/tpl_footer.php to /templates/my_template/privacy/tpl_footer.php<br />
    * to override the global settings and turn off the footer un-comment the following line:<br />
    * <br />
    * $flag_disable_footer = true;<br />
    *
    * @package templateSystem
    * @copyright Copyright 2003-2005 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: tpl_footer.php 4821 2006-10-23 10:54:15Z drbyte $
    */
    require(DIR_WS_MODULES . zen_get_module_directory('footer.php'));
    ?>




    <?php
    if (!isset($flag_disable_footer) || !$flag_disable_footer) {
    ?>

    <!--bof-navigation display -->
    <div id="navSuppWrapper">
    <div id="navSupp">
    <ul>
    <li><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php echo HEADER_TITLE_CATALOG; ?></a></li>
    <?php if (EZPAGES_STATUS_FOOTER == '1' or (EZPAGES_STATUS_FOOTER == '2' and (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])))) { ?>
    <li><?php require($template->get_template_dir('tpl_ezpages_bar_footer.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_ezpages_bar_footer.php'); ?></li>
    <?php } ?>
    </ul>
    </div>
    </div>
    <!--eof-navigation display -->

    <!--bof-ip address display -->
    <?php
    if (SHOW_FOOTER_IP == '1') {
    ?>
    <div id="siteinfoIP"><?php echo TEXT_YOUR_IP_ADDRESS . ' ' . $_SERVER['REMOTE_ADDR']; ?></div>
    <?php
    }
    ?>
    <!--eof-ip address display -->

    <!--bof-banner #5 display -->
    <?php
    if (SHOW_BANNERS_GROUP_SET5 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET5)) {
    if ($banner->RecordCount() > 0) {
    ?>
    <div id="bannerFive" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
    <?php
    }
    }
    ?>
    <!--eof-banner #5 display -->

    <!--bof- site copyright display -->
    <div id="siteinfoLegal" class="legalCopyright"><?php echo FOOTER_TEXT_BODY; ?>
    <?php if ($_GET['main_page'] == 'checkout_shipping' || $_GET['main_page'] == 'checkout') { ?>
    <br />
    <center>FedEx service marks used by permission.</center>
    <?php } ?>
    </div>
    <!--eof- site copyright display -->

    <?php
    } // flag_disable_footer
    ?>

    ABCDEFG
    <!--ShareASale tracking code -->
    ABCDEFG
    <?php if (isset($zv_orders_id) && (int)$zv_orders_id > 0 && isset($order_summary) && is_array($order_summary)) { if (!isset($_SESSION['affiliate_order_id']) || $_SESSION['affiliate_order_id'] != $zv_orders_id ) { $_SESSION['affiliate_order_id'] = $zv_orders_id; $commissionable_order_formatted = number_format($order_summary['commissionable_order'], 2, '.', ''); echo '<img src="https://shareasale.com/sale.cfm?amount=' . $commissionable_order_formatted . '&tracking=' . $order_summary['order_number'] . '&transtype=sale&merchantID=XXXX" width="1" height="1">'; } } ?>

    <!--End ShareASale tracking code -->

  4. #4
    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.

  5. #5
    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');
    ?>

 

 

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