Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

customers_default_address_id


saklay

Recommended Posts

Posted

Hi guys,

 

I'm a total newbie with osCommerce. I've installed it successfully but encountered a few bugs/errors. I did a mock-up checkout, then registered as a new user. But for each and every page during the checkout process, the shipping details doesn't appear (when in fact I did fill in values for that). By the way, I use 2Checkout as its payment gateway.

 

I checked "create_account_process.php" and found out that "customers_default_address_id" for table "customers" always gets a value of 1 everytime a user signs up. This would mean all registered users will have 1 as the value of "customers_default_address_id". Is this correct? Shouldn't the value be the same as the value of "address_book_id" for table "address_book"? If so, can someone help me fix this. Do you think this is the reason why the shipping details doesn't appear?

 

Thanks for any help.

 

saklay

 

ps. Here's a snippet of the code from "create_account_process.php".

 

$sql_data_array = array('customers_firstname' => $firstname,

'customers_lastname' => $lastname,

'customers_email_address' => $email_address,

'customers_telephone' => $telephone,

'customers_fax' => $fax,

'customers_newsletter' => $newsletter,

'customers_password' => tep_encrypt_password($password),

'customers_default_address_id' => 1);

 

if (ACCOUNT_GENDER == 'true') $sql_data_array['customers_gender'] = $gender;

if (ACCOUNT_DOB == 'true') $sql_data_array['customers_dob'] = tep_date_raw($dob);

 

tep_db_perform(TABLE_CUSTOMERS, $sql_data_array);

 

$customer_id = tep_db_insert_id();

 

$sql_data_array = array('customers_id' => $customer_id,

'entry_firstname' => $firstname,

'entry_lastname' => $lastname,

'entry_street_address' => $street_address,

'entry_postcode' => $postcode,

'entry_city' => $city,

'entry_country_id' => $country);

Posted
I checked "create_account_process.php" and found out that "customers_default_address_id" for table "customers" always gets a value of 1 everytime a user signs up. This would mean all registered users will have 1 as the value of "customers_default_address_id". Is this correct? Shouldn't the value be the same as the value of "address_book_id" for table "address_book"? If so, can someone help me fix this. Do you think this is the reason why the shipping details doesn't appear?

 

Yes this is correct, then the "1" points to the first Address in HIS Addressbook entrys(for a max of 5). When you create a new account there is only 1 address so it points to this address

Archived

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

×
×
  • Create New...