Page 3 of 3 FirstFirst 123
Results 21 to 23 of 23
  1. #21
    Join Date
    Apr 2014
    Location
    Polska
    Posts
    20
    Plugin Contributions
    0

    Default Re: script for thank you page

    After checking it looks like You made some mess in your file :)
    You have pasted it wrong and barcode bracket is not closed.
    If You want sent the original (pre paste) file to my email and Ill try to paste this for You.
    Will be faster then writting whole novel here :)

  2. #22
    Join Date
    Oct 2006
    Location
    Italy
    Posts
    634
    Plugin Contributions
    0

    Default Re: script for thank you page

    Many many thanks to store-support for his helpful hand:
    PHP Code:
    <?php
    /**
     * Page Template
     *
     * Loaded automatically by index.php?main_page=checkout_success.<br />
     * Displays confirmation details after order has been successfully processed.
     *
     * @package templateSystem
     * @copyright Copyright 2003-2010 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_checkout_success_default.php 16435 2010-05-28 09:34:32Z drbyte $
     */
    ?>
    <div class="centerColumn" id="checkoutSuccess">
        <header>
            <h1 id="checkoutSuccessHeading"><?php echo HEADING_TITLE?></h1>
        </header>
        <div class="alert alert-success alert-dismissable">
            <?php echo TEXT_THANKS_FOR_SHOPPING?>
            <div id="checkoutSuccessOrderNumber"><?php echo TEXT_YOUR_ORDER_NUMBER $zv_orders_id?></div>
        </div>
        <!--bof logoff-->
        <div class="alert alert-info alert-dismissable">
            <?php
                
    if (isset($_SESSION['customer_guest_id'])) {
                    echo 
    TEXT_CHECKOUT_LOGOFF_GUEST;
                } elseif (isset(
    $_SESSION['customer_id'])) {
                    echo 
    TEXT_CHECKOUT_LOGOFF_CUSTOMER;
                }
            
    ?>
            <div class="buttonRow forward">
                <a href="<?php echo zen_href_link(FILENAME_LOGOFF'''SSL'); ?>"><?php echo zen_image_button(BUTTON_IMAGE_LOG_OFF BUTTON_LOG_OFF_ALT); ?>
                </a>
            </div>
        </div>
        <div class="alert alert-info alert-dismissable">
            <?php echo TEXT_SEE_ORDERS .'<br/>'TEXT_CONTACT_STORE_OWNER;?>
        </div>
        <!--bof -gift certificate- send or spend box-->
        <?php
        
    // only show when there is a GV balance
          
    if ($customer_has_gv_balance ) {
        
    ?>
        <div id="sendSpendWrapper">
            <?php require($template->get_template_dir('tpl_modules_send_or_spend.php',DIR_WS_TEMPLATE$current_page_base,'templates'). '/tpl_modules_send_or_spend.php'); ?>
        </div>
        <?php
          
    }
        
    ?>
        <!--eof -gift certificate- send or spend box-->
        <!--eof logoff-->
        <div class="content">
            <?php if (DEFINE_CHECKOUT_SUCCESS_STATUS >= and DEFINE_CHECKOUT_SUCCESS_STATUS <= 2) { ?>
                <div id="checkoutSuccessMainContent">
                    <?php
                    
    /**
                     * require the html_defined text for checkout success
                     */
                      
    require($define_page);
                    
    ?>
                </div>
            <?php ?>
            <!-- bof payment-method-alerts -->
            <?php
                
    if (isset($_SESSION['payment_method_messages']) && $_SESSION['payment_method_messages'] != '') {
            
    ?>
                <div>
                    <?php echo $_SESSION['payment_method_messages']; ?>
                </div>
            <?php
            
    }
            
    ?>
            <!-- eof payment-method-alerts -->
        </div>
            <?php
            
    /**
             * The following creates a list of checkboxes for the customer to select if they wish to be included in product-notification
             * announcements related to products they've just purchased.
             **/
                
    if ($flag_show_products_notification == true) {
            
    ?>
        <div class="content">
            <div id="csNotifications">
                <h4><?php echo TEXT_NOTIFY_PRODUCTS?></h4>
                <?php echo zen_draw_form('order'zen_href_link(FILENAME_CHECKOUT_SUCCESS'action=update''SSL')); ?>
                <?php foreach ($notificationsArray as $notifications) { ?>
                    <?php echo zen_draw_checkbox_field('notify[]'$notifications['products_id'], true'id="notify-' $notifications['counter'] . '"') ;?>
                    <label class="checkboxLabel" for="<?php echo 'notify-' $notifications['counter']; ?>">
                        <?php echo $notifications['products_name']; ?>
                    </label>
                    <br />
                <?php ?>
                <div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_UPDATEBUTTON_UPDATE_ALT); ?></div>
                </form>
            </div>
        </div>
                <?php
                    
    }
                
    ?>
        <!--eof -product notifications box-->
        <!--bof -product downloads module-->
        <?php
          
    if (DOWNLOAD_ENABLED == 'true') require($template->get_template_dir('tpl_modules_downloads.php',DIR_WS_TEMPLATE$current_page_base,'templates'). '/tpl_modules_downloads.php');
        
    ?>
        <!--eof -product downloads module-->
    </div>

    <?php if (MODULE_BARCODE_ORDERS_SWITCH == 'true') { ?>
    <div id="checkoutSuccessOrdersBarcode">
      <fieldset>
        <legend><?php echo TABLE_HEADING_ORDERS_BARCODE?></legend>
        <?php echo TEXT_ORDERS_BARCODE?><br />
        <?php echo '<img src="' DIR_WS_CATALOG 'barcode/barcode.php?code=' $_SESSION['orders_barcode'] . '&scale=' . (int)MODULE_BARCODE_SCALE '"></img>'?>
      </fieldset> 


    </div>
    <?php ?>
    <?php
    //-Add the tracking script only for the checkout_success page
    $customer_email_info $db->Execute ("SELECT customers_email_address FROM " TABLE_CUSTOMERS " WHERE customers_id = " . (int)$_SESSION['customer_id'] . " LIMIT 1");
    if (!
    $customer_email_info->EOF) {
      
    $customers_email_address $customer_email_info->fields['customers_email_address'];

      
    $outputCode '';
      
    $outputCode .=
      <script type="text/javascript" src="https://tracking.trovaprezzi.it/javascripts/tracking.min.js" async="true"></script>
      <script type="text/javascript">
          window._tt = window._tt || [];
          window._tt.push({ event: "setAccount", id: /* keymerchant */ });
          window._tt.push({ event: "setOrderId", order_id: "'
    .$orders_id.'"});
          window._tt.push({ event: "setEmail", email: "'
    .$customers_email_address.'"});';

      
    $products_info $db->Execute ("SELECT products_model, products_name FROM " TABLE_ORDERS_PRODUCTS " WHERE orders_id = $orders_id");
      while (!
    $products_info->EOF) {
      
    $outputCode .='
          window._tt.push({ event: "addItem", sku: "'
    .$products_info->fields['products_model'].'" , product_name: "'.$products_info->fields['products_name'].'" });';

        
    $products_info->MoveNext ();
      }
      
    $outputCode .='
      window._tt.push({ event: "orderSubmit"});
      </script>'
    ;
     echo 
    $outputCode;
    }
    ?>
    now all works fine!

  3. #23
    Join Date
    Apr 2014
    Location
    Polska
    Posts
    20
    Plugin Contributions
    0

    Default Re: script for thank you page


 

 
Page 3 of 3 FirstFirst 123

Similar Threads

  1. Replies: 10
    Last Post: 26 Mar 2016, 02:53 AM
  2. Admin Page - "Hello. Thank you for loading Zen Cart" - OH help!
    By iwalkonstars in forum Basic Configuration
    Replies: 9
    Last Post: 1 Jun 2014, 07:53 PM
  3. How do you add text to last Thank You page after purchase complete?
    By catangirl in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 24 Sep 2007, 10:25 PM
  4. Thank you page
    By DanAllkins in forum Built-in Shipping and Payment Modules
    Replies: 4
    Last Post: 15 Sep 2007, 10:40 PM
  5. Where is HTML for order confirmation/thank you page?
    By chacha-vintage in forum General Questions
    Replies: 0
    Last Post: 22 Aug 2007, 10:26 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