Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2008
    Posts
    36
    Plugin Contributions
    0

    Default How can I display billing company in previous orders section.

    Hi all.

    I need some help to display the billing name and billing company name instead of the shipped to name and shipped to country in the previous orders section.

    I know the information to change is in the file tpl_account_default.php in this line.
    Code:
    <td><address><?php echo zen_output_string_protected($orders['order_name']) . '<br />' . $orders['order_country']; ?></address></td>
    I just can't figure out what to call to display the required information.
    Regards

    Dave.

    beauty is in the eye of the beer holder

  2. #2
    Join Date
    Jan 2008
    Posts
    36
    Plugin Contributions
    0

    Default Re: How can I display billing company in previous orders section.

    I sorted it eventually

    Just in case anyone else is interested. Please amend the paths to suit your situation if you are using overrides.

    Also NOTE I am no expert. I just analyse and use trial and error so please use with caution.

    in file \includes\modules\pages\account\header_php.php
    Find
    PHP Code:
    $orders_query "SELECT o.orders_id, o.date_purchased, o.delivery_name,
                            o.delivery_country, o.billing_name, o.billing_country,
                            ot.text as order_total, s.orders_status_name 
    add o.billing_company to the end to look like this

    PHP Code:
    $orders_query "SELECT o.orders_id, o.date_purchased, o.delivery_name,
                            o.delivery_country, o.billing_name, o.billing_country,
                            ot.text as order_total, s.orders_status_name, o.billing_company 
    Then in the same file find
    PHP Code:
      $ordersArray[] = array('orders_id'=>$orders->fields['orders_id'],
      
    'date_purchased'=>$orders->fields['date_purchased'],
      
    'order_name'=>$order_name,
      
    'order_country'=>$order_country,
      
    'orders_status_name'=>$orders->fields['orders_status_name'],
      
    'order_total'=>$orders->fields['order_total'],
      ); 
    Change to

    PHP Code:
      $ordersArray[] = array('orders_id'=>$orders->fields['orders_id'],
      
    'date_purchased'=>$orders->fields['date_purchased'],
      
    'order_name'=>$order_name,
      
    'order_country'=>$order_country,
      
    'orders_status_name'=>$orders->fields['orders_status_name'],
      
    'order_total'=>$orders->fields['order_total'],
      
    'order_billcompany'=>$orders->fields['billing_company']
      ); 
    In \includes\templates\template_default\templates\tpl_account_default.php

    Find
    PHP Code:
        <td><address><?php echo zen_output_string_protected($orders['order_name']) . '<br />' $orders['order_country']; ?></address></td>
    Change it to

    PHP Code:
        <td><address><?php echo zen_output_string_protected($orders['order_name']) . '<br />' $orders['order_billcompany']; ?></address></td>
    Regards

    Dave.

    beauty is in the eye of the beer holder

 

 

Similar Threads

  1. How to remove all customers and previous orders from database?
    By josee225 in forum Managing Customers and Orders
    Replies: 1
    Last Post: 14 Apr 2011, 11:48 PM
  2. Can Zencart recall and reprocess previous orders?
    By webhunter in forum Managing Customers and Orders
    Replies: 0
    Last Post: 10 Jan 2011, 08:54 AM
  3. Module to display customers previous orders in admin?
    By sartor in forum General Questions
    Replies: 0
    Last Post: 17 Feb 2010, 07:25 PM
  4. Can't get billing options to display
    By sean_uk in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 13 Jul 2006, 03:11 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