RE: Multiple Stores
mdfst13 <[email protected]>
| Newsgroups | gmane.comp.web.oscommerce.suggestions |
|---|---|
| Message-ID | <fa39215b1342b2f4d3c212f4cd8912f7@osCommerce-Forums> |
This message was sent from: Suggestions and Proposals
http://forums.oscommerce.com/viewtopic.php?p=189573#189573
----------------------------------------------------------------
It's not set up to do this through the configuration, but you could do it relatively easily by changing [code]if ($error == false) {
$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));
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);[/code]to read [code]if ($error == false) {
$customers_group_id = 0;
if ($country == '38') { // 38 is the code for Canada
$customers_group_id = 1; // I made this up; set it appropriately
}
$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_group_id' => $customers_group_id);
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);[/code]The added lines are 2-5. Note: you would also have to manually change the group for any Canadian customers when you installed the module. This just makes sure that new customers are assigned to the appropriate group.
Depending on how you feel about PHP coding, you could also modify the separate price contribution to use country and/or currency to determine which pricing group to use.
Hth,
Matt