Einzelnen Beitrag anzeigen
  #1 (permalink)  
Alt 24.04.2004, 13:44
Benutzerbild von mzanier
xt:mzanier mzanier ist gerade online
xt:Commerce GmbH, Geschäftsführung
 
Registriert seit: 18.04.2003
Beiträge: 27.412
Daumen runter

Wichtiger Bugfix.


Durch wechseln des Landes/Stadt wurde die country ID auf 0 gesetzt, und der Kunde sieht Netto preise bis zum n?chstem Login:



includes/application_top.php zeile 585 folgendes
Code:
 if (isset($_SESSION['customer_id'])) {
 $account_type_query=xtc_db_query("SELECT account_type FROM
                  ".TABLE_CUSTOMERS."
                  WHERE customers_id = '".(int)$_SESSION['customer_id']."'");
 $account_type=xtc_db_fetch_array($account_type_query);
 $_SESSION['account_type']=$account_type['account_type'];
  } else {
  $_SESSION['account_type']='0';
  }
durch
Code:
 if (isset($_SESSION['customer_id'])) {
 $account_type_query=xtc_db_query("SELECT
                  account_type,
                  customers_default_address_id
                  FROM
                  ".TABLE_CUSTOMERS."
                  WHERE customers_id = '".(int)$_SESSION['customer_id']."'");
 $account_type=xtc_db_fetch_array($account_type_query);

 // check if zone id is unset bug #0000169
 if (!isset($_SESSION['customer_country_id'])) {
 	$zone_query=xtc_db_query("SELECT entry_country_id
                   FROM ".TABLE_ADDRESS_BOOK."
                   WHERE customers_id='".(int)$_SESSION['customer_id']."'
                   and address_book_id='".$account_type['customers_default_address_id']."'");

  $zone=xtc_db_fetch_array($zone_query);
  $_SESSION['customer_country_id']=$zone['entry_country_id'];
 }
 $_SESSION['account_type']=$account_type['account_type'];
  } else {
  $_SESSION['account_type']='0';
  }
ersetzen.
__________________
xt:Commerce Helpdesk
xt:Commerce Blog

xt:Commerce Warenwirtschaft

###

Offene Stellen bei xt:Commerce!
xt:Commerce stellt ein
###
Mit Zitat antworten