Results 1 to 10 of 13

Hybrid View

  1. #1
    Join Date
    Jul 2006
    Posts
    84
    Plugin Contributions
    0

    Default Re: Shopzilla Tracking Code Help

    Coming back ... Andy, I applied the code exactly as given above, and the customer type and units ordered did NOT parse ... see below (taken from the source code of the checkout_success page after I successfully placed an order)

    <script language="javascript">
    <!--
    /* Performance Tracking Data */
    var mid = '000000';
    var cust_type = '';
    var order_value = '26.48';
    var order_id = '4638';
    var units_ordered = '0';
    //-->

    </script>
    <script language="javascript" src="https://www.shopzilla.com/css/roi_tracker.js"></script>

  2. #2
    Join Date
    Jun 2008
    Posts
    187
    Plugin Contributions
    0

    Default Re: Shopzilla Tracking Code Help

    Hi fmckinnon,

    apologies on the delay coming back to you been on 'holiday'.

    i had actually completely forgotten about this, so much so i went back into checkout confirmation page and found that i had actually removed it :O.

    Apologies if the code i suggested did not give you the outcome you were looking for.

    Just been told i need to relook at this anyway so as soon as i come up up with a solution ill update this thread :)

    Andy.

  3. #3
    Join Date
    Jun 2008
    Posts
    187
    Plugin Contributions
    0

    Default Re: Shopzilla Tracking Code Help

    Hey again,

    right i think i've done some code that seems to work for me.


    PHP Code:
    <?php 
    //Zilla ROI Code
    $zilla_oid = (int)$orders->fields['orders_id'];

    $cn_orders "SELECT count( orders_id ) AS zilla FROM orders WHERE customers_id = '" . (int)$_SESSION['customer_id'] . "'"
    $cn_orders_result $db->Execute($cn_orders); 


    if (
    $cn_orders_result->fields['zilla'] <= '1'){ 
    $cn_orders_final '1'

    else{ 
    $cn_orders_final '0'


    $cn_items "SELECT count( orders_id ) AS zitems FROM orders_products WHERE orders_id = '" $zilla_oid ."'"
    $cn_items_result $db->Execute($cn_items); 
    $zitems =  $cn_items_result->fields['zitems']; 


    ?> 
    <script language="javascript"> 
    <!-- 
        /* Performance Tracking Data */ 
        var mid            = '000000'; 
        var cust_type      = '<?php echo $cn_orders_final?>'; 
        var order_value    = '<?php echo round($orders->fields['order_total'], 2); ?>'; 
        var order_id       = '<?php echo $zilla_oid?>'; 
        var units_ordered  = '<?php echo $zitems?>';
    //--> 
    </script> 
    <script language="javascript" src="https://www.shopzilla.com/css/roi_tracker.js"></script>
    I'm not really sure what i was thinking with that code i posted before (brain dead moment).

    hope this helps
    Andy.

  4. #4
    Join Date
    Jul 2006
    Posts
    84
    Plugin Contributions
    0

    Default Re: Shopzilla Tracking Code Help

    Thanks a ton .. I'll try it!

  5. #5
    Join Date
    Jan 2006
    Posts
    6
    Plugin Contributions
    0

    Default Re: Shopzilla Tracking Code Help

    Andy_GS,

    Tried your fix - but I get an error message:

    1146 Table 'cb_zc1.orders' doesn't exist
    in:
    [SELECT count( zen_orders_id ) AS zilla FROM orders WHERE customers_id = '1']


    cb_zc1 is the correct database, however I note that the "orders" table is titled "zen_orders". I am not that good at this? Any ideas how to fix?

    Thanks
    nuin

  6. #6
    Join Date
    Feb 2007
    Posts
    1,704
    Plugin Contributions
    0

    Default Re: Shopzilla Tracking Code Help

    this code works for me :-)

  7. #7
    Join Date
    Nov 2007
    Posts
    21
    Plugin Contributions
    0

    Default Re: Shopzilla Tracking Code Placement?

    I get the problem as Nuin - an error based around table selection. This appears on the order success page:


    1146 Table 'xxxxxxx.orders' doesn't exist
    in:
    [SELECT count( orders_id ) AS zilla FROM orders WHERE customers_id = '189']

    xxxxx is the proper name of the full database. The code isn't selecting the orders table within that database.

    Does anyone know the correct code to do that?

    It has to be in this part I guess:

    $cn_items = "SELECT count( orders_id ) AS zitems FROM orders_products WHERE orders_id = '" . $zilla_oid ."'";
    $cn_items_result = $db->Execute($cn_items);
    $zitems = $cn_items_result->fields['zitems'];

    Any help appreciated.

  8. #8
    Join Date
    Jun 2008
    Posts
    187
    Plugin Contributions
    0

    Default Re: Shopzilla Tracking Code Placement?

    Hey all,

    @nuin & @peterdd

    Do you guys have a table prefix on your zen-cart installation?

    @nuin try:

    PHP Code:
    SELECT countzen_orders_id ) AS zilla FROM zen_orders WHERE customers_id '1' 

    @peterdd: do you also have table pre-fixes? - i can't see any in your example but i suspect that you may have?

    Andy.

 

 

Similar Threads

  1. v138a Facebook and Twitter tracking code placement
    By 007mcfod in forum General Questions
    Replies: 1
    Last Post: 24 Aug 2014, 01:48 AM
  2. v150 How to install Shopzilla revenue tracking script?
    By sephowin in forum General Questions
    Replies: 4
    Last Post: 16 Jan 2014, 10:54 PM
  3. Script for Shopzilla "performance tracking"
    By marvin in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 10 Nov 2009, 04:28 AM
  4. Shopzilla tracking in Worldpay integration
    By crazycucumber in forum Addon Payment Modules
    Replies: 1
    Last Post: 24 Apr 2007, 09:13 AM
  5. Tracking Code placement - Shopzilla
    By crazycucumber in forum General Questions
    Replies: 0
    Last Post: 3 Apr 2007, 08:29 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