Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PHP error when "State" not required


erikt

Recommended Posts

Dear all,

I'm working on a Norwegian translation for 2.2MS2.

We do not have "States" in Norway.

 

I get an PHP error during registration of new members when the Configuration>Customer Details> "State" flag is set to "False".

 

I can not figure out why. Anybody else that might know. Thank you.

 

Here are the errors :

 

Warning: reset() [function.reset]: Passed variable is not an array or object in /hsphere/local/home/traasdah/pda.traasdahl.org/catalog/includes/classes/email.php on line 71

 

Warning: Variable passed to each() is not an array or object in /hsphere/local/home/traasdah/pda.traasdahl.org/catalog/includes/classes/email.php on line 72

 

Fatal error: Call to a member function on a non-object in /hsphere/local/home/traasdah/pda.traasdahl.org/catalog/includes/functions/general.php on line 970

Query was empty - Query was empty

 

Query was empty

 

[TEP STOP]

 

 

Warning: Unknown(): A session is active. You cannot change the session module's ini settings at this time. in Unknown on line 0

Link to comment
Share on other sites

  • 3 weeks later...

Hi there

 

The solution to the disable-state-get-errors-when-creating-new-costumer problem is a small change in the create_account.php :

 

find:

 

...

$customer_country_id = $country;

$customer_zone_id = $zone_id;

tep_session_register('customer_id');

...

 

change to:

 

...

$customer_country_id = $country;

if (ACCOUNT_STATE == 'true') {

$customer_zone_id = $zone_id;

} else {

$customer_zone_id = 0;

}

tep_session_register('customer_id');

...

 

Enjoy.

 

Cheers

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...