Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Configuring the Zen Cart Admin / Managing Customers and Orders / How can I show delivery city and state on the order history page?

How can I show delivery city and state on the order history page?

Started by mello_me on 18 Apr 2014, 9:20 PM · Views: 1,133

Results 1 to 2 of 2
18 Apr 2014, 9:20 PM
#1
mello_me avatar

mello_me

New Zenner

Join Date:
Apr 2014
Posts:
6
Plugin Contributions:
0

Post #1 by mello_me

I have been trying all sorts of combinations to get this done but nothing works. :frusty: Can someone please help me figure out what I need to add to tpl_account_history_default.php in order to display a customer's city and state. Each customer will need to shipped to different cities and states. It would be easier for them to find their orders by city, state or street, city, state.

Even better would be an order history search mod for customers if you can recommend one.

Thanks a mill!:smile:

Mel

18 Apr 2014, 10:10 PM
#2
mello_me avatar

mello_me

New Zenner

Join Date:
Apr 2014
Posts:
6
Plugin Contributions:
0

Post #2 by mello_me

Solved!! :D Here is the solution:

IN:

includes/modules/pages/account_history/header_php.php

FIND:

o.delivery_name,

ADD:

o.delivery_city, o.delivery_state,

FIND:

$products = $db->Execute($products_query);

ADD:

  $order_city = $history->fields['delivery_city'];
  $order_state = $history->fields['delivery_state'];

IN:

includes/templates/YOUR_TEMPLATE/tpl_account_history_default.php

ADD (format as needed):

<?php echo '<strong>City: </strong>' . zen_output_string_protected($history['order_city']). ', <strong>State: </strong>' . zen_output_string_protected($history['order_state']) . '<br />'; ?>