PDA

View Full Version : Customer List Improved



michael_s
07-11-2009, 09:15 PM
this is not a complete file.

add customer addresses from the admin side

in admin/customers.php

ADD

case 'addaddress':


$sql_data_array = array('customers_id' => $HTTP_GET_VARS['cID']);
tep_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array);

$get_address_id = tep_db_query("SELECT address_book_id FROM address_book WHERE customers_id = '" . (int)$HTTP_GET_VARS['cID'] . "' ORDER BY address_book_id DESC LIMIT 1");

$address_id = tep_db_fetch_array($get_address_id);
$new_address_id = $address_id['address_book_id'];

tep_redirect(tep_href_link(FILENAME_CUSTOMERS, tep_get_all_get_params(array('cID', 'action','add_id')) . 'cID=' . $HTTP_GET_VARS['cID'] . '&action=edit&add_id=' . $new_address_id));

break;


BEFORE LINE

case 'update':

$customers_id = tep_db_prepare_input($HTTP_GET_VARS['cID']);

$customers_firstname = tep_db_prepare_input($HTTP_POST_VARS['customers_firstname']);


CHANGE LINE



TO




More... (http://addons.oscommerce.com/info/3463)