Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    1,731
    Plugin Contributions
    27

    bug [Not a Bug] tpl_account_history_info & header_php lacks global order total module

    tpl_account_history_info_default.php & header_php.php lacks global order total module

    It looks like this page was not included when the checkout pages went global...

    tpl_account_history_info_default.php

    HTML Code:
    <div id="orderTotals">
    <?php
      for ($i=0, $n=sizeof($order->totals); $i<$n; $i++) {
    ?>
         <div class="amount larger forward"><?php echo $order->totals[$i]['text'] ?></div>
         <div class="lineTitle larger forward"><?php echo $order->totals[$i]['title'] ?></div>
    <br class="clearBoth" />
    <?php
      }
    ?>
    Should look more like this:
    HTML Code:
    <?php
      if (MODULE_ORDER_TOTAL_INSTALLED) {
        $order_totals = $order_total_modules->process();
    ?>
    <div id="orderTotals"><?php $order_total_modules->output(); ?></div>
    <?php
      }
    ?>

    header_php.php
    PHP Code:
    require(DIR_WS_CLASSES 'order.php');
    $order = new order($_GET['order_id']); 

    Should look more like this:

    PHP Code:
    require(DIR_WS_CLASSES 'order.php');
    //$order = new order;
    $order = new order($_GET['order_id']);

    // load the selected shipping module
    require(DIR_WS_CLASSES 'shipping.php');
    $shipping_modules = new shipping($_SESSION['shipping']);


    require(
    DIR_WS_CLASSES 'order_total.php');
    $order_total_modules = new order_total;
    $order_total_modules->collect_posts();
    $order_total_modules->pre_confirmation_check();

    // load the selected payment module
    require(DIR_WS_CLASSES 'payment.php'); 

    Now account history info can see and display the status of the active order total modules.

    NOTE: this is NOT a fix, this fixes every other element on the page except sub-total.

    In the morning I'll sort out the $0.00 sub-total and post my findings.
    Twitch.
    https://www.twitchtoo.com Do you work for free? Please donate.
    Twitch Base8 - Obsidian - This, is what's new.

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,883
    Plugin Contributions
    96

    Default Re: tpl_account_history_info_default.php & header_php.php lacks global order total mo

    The account_history_info page uses the order information (including the totals) that's stored in the database when the customer places the order. That's why the page uses the $order->totals values instead of calculating the totals again.

    The customer, for example, might have purchased the product when the sales tax for their Florida county was 6.0%, two days before the tax increased to 6.25%. For the order's history to display the proper values, you want to display the order-total values as calculated for the order, not how they'd calculate today.

    Your $0.00 sub-total is not "core" Zen Cart behavior (unless the products in the order are free!).

  3. #3
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    1,731
    Plugin Contributions
    27

    Default Re: tpl_account_history_info_default.php & header_php.php lacks global order total mo

    You're right lat9, I'm developing the page for a completely different purpose.

    I realized the 'history' needs to be 'what happened' not 'what is happening' this morning... some nights I should just go to bed ;)

    However, there are currently two pages account & account history that click through to the actual order - account history info.

    I've changed this to:
    - My Account - management/dashboard page
    - Show Recent Invoices - invoice chart quick tax/totals view for monthly/yearly taxes
    - Show All Invoices - detailed invoice blocks for a quick view of many orders and their product details
    - Account History Info - the original invoice

    I'll need the code for creating invoices with Zen Cart.

    Forum admin - please move/remove this thread it's not a bug.
    Twitch.
    https://www.twitchtoo.com Do you work for free? Please donate.
    Twitch Base8 - Obsidian - This, is what's new.

 

 

Similar Threads

  1. Replies: 2
    Last Post: 7 Jun 2012, 12:01 AM
  2. v139h Table rate (price) not using prices changed by order total module
    By flexiblefine in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 25 May 2012, 04:05 PM
  3. I want an order-total module to display total w/o tax
    By ivanc in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 4
    Last Post: 31 Oct 2009, 12:11 PM
  4. Replies: 2
    Last Post: 5 Dec 2007, 04:28 PM
  5. [not a bug] Checkout Shipping's header_php.php
    By conor in forum Bug Reports
    Replies: 4
    Last Post: 29 Mar 2007, 09:41 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