You'll need to make a template-override version of the create_account.php module. If you don't already have the file /includes/modules/YOUR_TEMPLATE/create_account.php, copy /includes/modules/create_account.php to /includes/modules/YOUR_TEMPLATE/create_account.php.
Look for this section (towards the middle of the file) and add the code in red to check for the state being Texas and the city being either Amarillo or Canyon:
Code:
if ( !($zone_name == 'Texas' && (strtolower ($city) == 'amarillo' || strtolower ($city) == 'canyon') ) ) {
$error = true;
$messageStack->add('create_account', "We're sorry, but we are only accepting accounts in Amarillo and Canyon at the moment.");
}
if ($error == true) {
// hook notifier class
$zco_notifier->notify('NOTIFY_FAILURE_DURING_CREATE_ACCOUNT');
} elseif ($antiSpam != '') {
$zco_notifier->notify('NOTIFY_SPAM_DETECTED_DURING_CREATE_ACCOUNT');
$messageStack->add_session('header', (defined('ERROR_CREATE_ACCOUNT_SPAM_DETECTED') ? ERROR_CREATE_ACCOUNT_SPAM_DETECTED : 'Thank you, your account request has been submitted for review.'), 'success');
zen_redirect(zen_href_link(FILENAME_SHOPPING_CART));
} else {
$sql_data_array = array('customers_firstname' => $firstname,
'customers_lastname' => $lastname,
'customers_email_address' => $email_address,
'customers_nick' => $nick,
'customers_telephone' => $telephone,
'customers_fax' => $fax,
'customers_newsletter' => (int)$newsletter,
'customers_email_format' => $email_format,
'customers_default_address_id' => 0,
'customers_password' => zen_encrypt_password($password),
'customers_authorization' => (int)CUSTOMERS_APPROVAL_AUTHORIZATION
);