Jump to content
xt:Commerce Community Forum

Problem Bei ?nderung Der Adressebuch-eintr?ge


gswkaiser

Recommended Posts

Mir ist aufgefallen, dass beim Erstaufruf der ?nderung der Adressbuchdaten ("Ihr Konto" -> "Adressbucheintr?ge bearbeiten") keine Kombobox zur Auswahl des Bundeslandes angeboten wird, sondern nur ein normales Eingabefeld (nicht wirklich ein Problem, aber doch sehr unsch?n).

Um das zu ?ndern, die folgenden ?nderungen durchf?hren:

Modul address_book_process.php

Vor


if (isset($_GET['edit']) && is_numeric($_GET['edit'])) {


einf?gen

else 

{

	if (ACCOUNT_STATE) {

 if (isset($customer_country_id)) 

 {

 	$country = $customer_country_id;

 	$zone_id = $customer_zone_id;

 }

 else 

 {

 	$country = STORE_COUNTRY;

 	$zone_id = 1;

 }

 $check_query = xtc_db_query("select count(*) as total from " . TABLE_ZONES . " where zone_country_id = '" . $country . "'");

 $check = xtc_db_fetch_array($check_query);

 $entry_state_has_zones = ($check['total'] > 0);

	}

}


==================================================== Modul includes/modules/address_book_details.php

	if ($process == true) {

 if ($entry_state_has_zones == true) {

 	$zones_array = array();

 	$zones_query = xtc_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . xtc_db_input($country) . "' order by zone_name");

 	while ($zones_values = xtc_db_fetch_array($zones_query)) {

  $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']);

 	}

 	$state_input= xtc_draw_pull_down_menu('state', $zones_array);

 } else {

 	$state_input= xtc_draw_input_field('state');

 }

	} else {

 $state_input= xtc_draw_input_field('state', xtc_get_zone_name($entry['entry_country_id'], $entry['entry_zone_id'], $entry['entry_state']));

	}


ersetzen durch

	//if ($process == true) {

 if ($entry_state_has_zones == true) {

 	$zones_array = array();

 	$zones_query = xtc_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . xtc_db_input($country) . "' order by zone_name");

 	while ($zones_values = xtc_db_fetch_array($zones_query)) {

  $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']);

 	}

 	$state_input= xtc_draw_pull_down_menu('state', $zones_array);

 } else {

 	$state_input= xtc_draw_input_field('state');

 }

	/* 

	} else {

 $state_input= xtc_draw_input_field('state', xtc_get_zone_name($entry['entry_country_id'], $entry['entry_zone_id'], $entry['entry_state']));

	}

	*/


Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
  • Create New...