Hi,

I have been trying to get customer details displayed in a form. This is part of a customization to create new customers, new products and orders from within the zencart manager.

So far I have been able to create a customized view of 'orders.php', and create a new customer with a modified version of 'customer.php'.

Now to bring everything together, I am working on creating a new form, which contains:
  • Customer details
  • Shopping cart
  • Custom product


I have the following link from:
admin/new_sumner_order.php?origin=sumner_shop_customers.php&mode=NONSSL&selected_box=t ools&customer=Array&cID=470, and need to use that information in my new order form (new_sumner_order.php) in this format:

customer: 470 firstname surname
street_address, city, post_code state
event_type, event-date

Here is the code from the form:
HTML Code:
<!-- body //-->
<table border="0" width="100%" cellspacing="2" cellpadding="2">
  <tr>
<!-- body_text //-->
	<tr>
      <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
        <tr>
          <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
          <td class="pageHeading" align="right"><?php echo zen_draw_separator('pixel_trans.gif',
HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
        </tr></table>
	  </td>
    </tr>
    <tr>
      <td><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
    </tr>
    <tr><?php echo zen_draw_form('new_shop_order', FILENAME_NEW_SHOP_ORDER,
zen_get_all_get_params(array('action')) . 'action=add_complete', 'post');
echo zen_hide_session_id(); ?>
      <td class="formAreaTitle"><?php echo CATEGORY_CUSTOMER; ?></td>
    </tr>
    <tr>
      <td class="formArea"><table border="0" cellspacing="2" cellpadding="2"></td>
	</tr>
	<tr>
      <td class="main"><?php echo CUSTOMER_DETAILS; ?></td>
      <td class="main">
            <?php $_GET['cID']; ?>
	  </td></tr></table>
    
<!-- body_text_eof //-->
</tr></table>
<!-- body_eof //-->
I need help with the last code in '<td class "main">'. Then I want to use the customer_id for the shopping cart, so I can use it to place the custom product into.
The file loads a modified version of 'order' class.

customer arrays have been defined as:
Code:
$customers = $db->Execute("select c.customers_id, c.customers_gender, c.customers_firstname,
                                          c.customers_lastname, c.customers_dob, c.customers_event_type, 
									          c.customers_event_date, c.customers_email_address,
                                          a.entry_company, a.entry_street_address, a.entry_suburb,
                                          a.entry_postcode, a.entry_city, a.entry_state, a.entry_zone_id,
                                          a.entry_country_id, c.customers_telephone, c.customers_fax,
                                          c.customers_newsletter, c.customers_default_address_id,
                                          c.customers_email_format, c.customers_group_pricing,
                                          c.customers_authorization, c.customers_referral
                                  from " . TABLE_CUSTOMERS . " c left join " . TABLE_ADDRESS_BOOK . " a
                                  on c.customers_default_address_id = a.address_book_id
                                  where a.customers_id = c.customers_id
                                  and c.customers_id = '" . (int)$customers_id . "'");

            $cInfo = new objectInfo($customers->fields);

$customer_check = "customers_firstname, customers_lastname, entry_street_address, entry_city, entry_postcode, entry_state, entry_country_id
                                  from " . TABLE_CUSTOMERS . "
                                  where customers_id = '" . $_GET['cID'] . "'";
I hope someone can help me on the way, as I have little programming experience.

I have also noted in various forums, that more people are looking for a modification like this, I would be happy to supply anyone with my code so far, as it can than be customized for other uses.

Many thanks for your time,

Goshawk