Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2012
    Location
    Bangkok, Thailand
    Posts
    2
    Plugin Contributions
    0

    help question what loads tpl_checkout_success_default.php

    is there any structural document out there . .to identify what files are executed ?

    my current problem is that (sometimes) in tpl_checkout_success_default.php the variable $zv_orders_id is empty or holds a wrong value.

    the confirmation email to the customer is sent correctly, also the order is correct.

    it would be nice to know which files are between "send confirmation email" and tpl_checkout_success_default.php

  2. #2
    Join Date
    Aug 2012
    Location
    Bangkok, Thailand
    Posts
    2
    Plugin Contributions
    0

    Default Re: what loads tpl_checkout_success_default.php

    i have learned that modules/pages/checkout_success/header_php.php does find the order id

    my code seems slightly different (but i can not really see how there a "different order-id could come up"
    Code:
    // 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
    if ((!isset($orders_id))&&($orders_id!="")) {
    	$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']);
    }
    if ((!isset($zv_orders_id))||($zv_orders_id =="")) {
    	$zv_orders_id = $orders->fields['orders_id'];
    }
    the other question .. in what file is the email beeing send (because in the email and the order, the ID is always correct)

  3. #3
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    1,979
    Plugin Contributions
    21

    Default Re: what loads tpl_checkout_success_default.php

    The "order confirmation" email is sent by the checkout_process "page", just before that page redirects to checkout_success.

    You can use your admin's Tools->Developers Tool Kit to search for all the files that use the value $zv_orders_id.

 

 

Similar Threads

  1. Only /index.php loads
    By lindasdd in forum Installing on a Windows Server
    Replies: 1
    Last Post: 10 Aug 2009, 04:11 AM
  2. Replies: 13
    Last Post: 2 Nov 2008, 11:42 PM
  3. Storefront loads fast; admin loads very slow
    By TheHYPO in forum General Questions
    Replies: 4
    Last Post: 28 Sep 2008, 04:19 AM
  4. Replies: 5
    Last Post: 2 Jun 2008, 10:38 AM
  5. tpl_checkout_success_default.php File Location?
    By ClixCustCare in forum Built-in Shipping and Payment Modules
    Replies: 5
    Last Post: 18 Apr 2007, 03:44 AM

Bookmarks

Posting Permissions

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