Page 1 of 2 12 LastLast
Results 1 to 10 of 17
  1. #1
    Join Date
    Jun 2006
    Posts
    440
    Plugin Contributions
    0

    Default Adding Code to checkout_success.php

    Hi, in order to track sales I was given the following information: I believe i should be this page I need to alter: shop\include\languages\english\checkout_success.php
    My questions are:
    1 Am I correct in saying it is the checkout_success.php that I need to put this tracking code into?
    2 What snippet of code should I enter in the green part and what snippet of code should be entred in the orange part.

    Many Thanks
    Renz


    Please copy & paste the following code on the 'Thank you' page or the 'Order Confirmation' page within your shopping basket.


    <!-- Getprice.com.au sales tracking system -->
    <img height="1" width="1" border="0"src="https://secure.getprice.com.au/affsale.asp?shopid=1434&price=400&sid=1981">
    <!-- End Getprice.com.au -->

    Note:

    In red is your shop id number in our system (1434)
    In green is the price of the product (this should be entered by your system dynamically for each product)
    In orange is the sale id in your system (this should be entered by your system)

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

    Default Re: Adding Code to checkout_success.php

    Some questions first ...

    Which version of Zen Cart are you using?
    What addons do you have installed?
    Did you build your template using a custom override folder?
    .

    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
    Jun 2006
    Posts
    440
    Plugin Contributions
    0

    Default Re: Adding Code to checkout_success.php

    Hi Dr. Byte....Greetings From Oz

    Zen vs 138A

    Phew Add Ons one or two.
    1 Admin Log in As Customer vs 2.0
    2 Au Post
    3 Automated Currency Update V3-1
    4 Captcha TTF
    5 Enhanced Who is online 1-0-3
    6 Encrypted Master PW Vs 1.2
    7 How did you hear about us 1.3.8A
    8 Zen Cart Export All
    9 Image Handler 2.0
    10 Monthly Sales Tax Summery V 1.3
    11 Scroller
    12 Simple Bank Deposit
    12 Sitemap XML
    13 Back Up MYSQL plug in V 1.3
    14 Security Patch v138_20090619
    15 Purchase Orders V 3.12


    Yes I have Customs Overrides..(theme163) are my template files

    Regards
    Renz

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

    Default Re: Adding Code to checkout_success.php

    Okay. You won't be editing your checkout_success.php language file.

    Follow this FAQ instead: https://www.zen-cart.com/tutorials/i...hp?article=399
    .

    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
    Jun 2006
    Posts
    440
    Plugin Contributions
    0

    Default Re: Adding Code to checkout_success.php

    Hi Dr. Byte,

    So in following what you have suggested and bearing in mind my php is non existent, would the following be correct (obviously in) /includes/templates/YOUR_CUSTOM_TEMPLATE_NAME/checkout_success/tpl_footer.php

    Thanking you
    RR

    <!-- Getprice.com.au sales tracking system -->
    <img height="1" width="1" border="0"src="https://secure.getprice.com.au/affsale.asp?shopid=1434&price=<?php echo$order_summary['order_total']; ?>&sid=<?php echo $order_summary['order_number']; ?> ">
    <!-- End Getprice.com.au -->

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

    Default Re: Adding Code to checkout_success.php

    Yes, but remember to leave a space between "echo" and "$order_summary"
    .

    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.

  7. #7
    Join Date
    Jun 2006
    Posts
    440
    Plugin Contributions
    0

    Default Re: Adding Code to checkout_success.php

    Thanks a Million, this should be correct withe the space added, although I was unsure about the extra "> at the end......


    <!-- Getprice.com.au sales tracking system -->
    <img height="1" width="1" border="0"src="https://secure.getprice.com.au/affsale.asp?shopid=1434&price=<?php echo $order_summary['order_total']; ?>&sid=<?php echo $order_summary['order_number']; ?> ">
    <!-- End Getprice.com.au -->

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

    Default Re: Adding Code to checkout_success.php

    Yes, the 'extra' "> is needed. Actually, better syntax would be:
    Code:
    " />
    .

    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.

  9. #9
    Join Date
    Jun 2006
    Posts
    440
    Plugin Contributions
    0

    Default Re: Adding Code to checkout_success.php

    Hi Doctor Byte,

    A quick question if I may, I waited a couple of days to see if it was tracking succesfully, however I feel I may have made a mistake as it is not reporting that I have made sales. Would you be so kind and advise if I have entered it in the file correctly or should it be before the end..?> I'll copy the file below.

    Thanks
    Best Regards always
    Renz

    <?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 3183 2006-03-14 07:58:59Z birdbrain $
    */
    require(DIR_WS_MODULES . zen_get_module_directory('footer.php'));
    ?>
    <?php
    if (!$flag_disable_footer) {

    ?>

    <div class="footer">
    <div class="right"> <?php echo zen_image(DIR_WS_TEMPLATE.'images/carts.gif'); ?> </div>
    <div class="left">
    <div class="margin">
    <?php
    if (EZPAGES_STATUS_FOOTER == '1' or (EZPAGES_STATUS_FOOTER == '2' and (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])))) {
    ?>
    <a href="<?php echo HTTP_SERVER . DIR_WS_CATALOG; ?>"><?php echo HEADER_TITLE_CATALOG; ?></a>
    <?php require($template->get_template_dir('tpl_ezpages_bar_footer.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_ezpages_bar_footer.php'); ?>
    <?php } ?>
    <div class="copy"align="center"> <?php echo FOOTER_TEXT_BODY; ?>
    </a>
    <?php
    if (SHOW_FOOTER_IP == '1') {
    ?>
    <div id="siteinfoIP"><?php echo TEXT_YOUR_IP_ADDRESS . ' ' . $_SERVER['REMOTE_ADDR']; ?></div>
    <?php
    }
    ?>
    </div>
    </div>
    </div>
    <div class="left">
    <div class="margin1"> <?php echo zen_image(DIR_WS_TEMPLATE.'images/geotrust.jpg'); ?></div>
    </div>
    <?php
    } // flag_disable_footer
    ?>

    <!-- Getprice.com.au sales tracking system -->
    <img height="1" width="1" border="0"src="https://secure.getprice.com.au/affsale.asp?shopid=1434&price=<?php echo $order_summary['order_subtotal']; ?>&sid=<?php echo $order_summary['order_number']; ?> " />
    <!-- End Getprice.com.au -->

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

    Default Re: Adding Code to checkout_success.php

    You've added it in an acceptable place.

    Although, I'm unclear as to why you changed "order_total" to "order_subtotal". Granted, that wouldn't cause it to not send the details ... the numbers would just be bad.
    .

    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 1 of 2 12 LastLast

Similar Threads

  1. v154 PHP Code to display customers email on checkout_success
    By botanybros in forum General Questions
    Replies: 2
    Last Post: 12 Nov 2015, 03:24 PM
  2. Adding Php code to homepage
    By tracstev in forum General Questions
    Replies: 2
    Last Post: 8 Nov 2011, 01:01 PM
  3. E-commerce tracking code in checkout_success page
    By jorgebnuk in forum General Questions
    Replies: 15
    Last Post: 9 Nov 2009, 02:10 PM
  4. Adding an Image inside PHP code?
    By limelites in forum Templates, Stylesheets, Page Layout
    Replies: 12
    Last Post: 9 Oct 2009, 10:56 PM
  5. Entering HTM Code into PHP Files - Adding Live Search to search_header.php
    By Jump Network in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 23 Sep 2007, 02:47 PM

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