What do I need to change to have the customers/orders show the Company Name before the Customer Name in admin orders?
Thanks,
Tina
What do I need to change to have the customers/orders show the Company Name before the Customer Name in admin orders?
Thanks,
Tina
You mean like this? http://www.zen-cart.com/forum/showth...address_format
.
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.
YES! and I even looked at the thread BEFORE I posted this.
Senior moments are happening more and more often!
Tina
Let's start this over....
I would like the COMPANY Name (not the CUSTOMER name)to display when viewing Best Customers Orders -Total page in admin.
The file referred to is admin/stats_customers.php
Thanks,
Tina
Got it!~
Made two changes to the admin / stats_customers.php and all is good.
Changed this:
to this:?>
<tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href='<?php echo zen_href_link(FILENAME_CUSTOMERS, 'cID=' . $customers->fields['customers_id'], 'NONSSL'); ?>'">
<td class="dataTableContent" align="right"><?php echo $customers->fields['customers_id']; ?> </td>
<td class="dataTableContent"><?php echo '<a href="' . zen_href_link(FILENAME_CUSTOMERS, 'cID=' . $customers->fields['customers_id'], 'NONSSL') . '">' . $customers->fields['customers_firstname'] . ' ' . $customers->fields['customers_lastname'] . '</a>'; ?></td>
<td class="dataTableContent" align="right"><?php echo $currencies->format($customers->fields['ordersum']); ?> </td>
</tr>
and then changed this:?>
<tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href='<?php echo zen_href_link(FILENAME_CUSTOMERS, 'cID=' . $customers->fields['customers_id'], 'NONSSL'); ?>'">
<td class="dataTableContent" align="right"><?php echo $customers->fields['customers_id']; ?> </td>
<td class="dataTableContent"><?php echo '<a href="' . zen_href_link(FILENAME_CUSTOMERS, 'cID=' . $customers->fields['customers_id'], 'NONSSL') . '">' . $customers->fields['entry_company'] . '</a>'; ?></td>
<td class="dataTableContent" align="right"><?php echo $currencies->format($customers->fields['ordersum']); ?> </td>
</tr>
to this:<?php
if (isset($_GET['page']) && ($_GET['page'] > 1)) $rows = $_GET['page'] * MAX_DISPLAY_SEARCH_RESULTS_REPORTS - MAX_DISPLAY_SEARCH_RESULTS_REPORTS;
$customers_query_raw = "select c.customers_id, c.customers_firstname, c.customers_lastname, sum(op.products_quantity * op.final_price)+sum(op.onetime_charges) as ordersum from " . TABLE_CUSTOMERS . " c, " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_ORDERS . " o where c.customers_id = o.customers_id and o.orders_id = op.orders_id group by c.customers_firstname, c.customers_lastname order by ordersum DESC";
$customers_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS_REPORTS, $customers_query_raw, $customers_query_numrows);
// fix counted customers
$customers_query_m = $db->Execute("select customers_id
from " . TABLE_ORDERS . " group by customers_id");
Tina<?php
if (isset($_GET['page']) && ($_GET['page'] > 1)) $rows = $_GET['page'] * MAX_DISPLAY_SEARCH_RESULTS_REPORTS - MAX_DISPLAY_SEARCH_RESULTS_REPORTS;
$customers_query_raw = "select c.customers_id, c.customers_firstname, c.customers_lastname, b.entry_company, sum(op.products_quantity * op.final_price)+sum(op.onetime_charges) as ordersum from " . TABLE_CUSTOMERS . " c, " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_ORDERS . " o, " . TABLE_ADDRESS_BOOK . " b where c.customers_id = o.customers_id and o.orders_id = op.orders_id and c.customers_default_address_id = b.address_book_id group by b.entry_company order by ordersum DESC";
$customers_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS_REPORTS, $customers_query_raw, $customers_query_numrows);
// fix counted customers
$customers_query_m = $db->Execute("select customers_id
from " . TABLE_ORDERS . " group by customers_id");
Last edited by charmedbytina2; 4 Jan 2009 at 07:01 PM.
Bookmarks