group pricing based on domain name
hi ,
i been trying to get the domain info from email address during registration and pass it to the field - domain ,which i created in customer table...
($userName, $mailDomain) = split("@", $email_address);
$sql_data= 'customers_domain' => $maildomain;
can some please guide on this ....
i tried its not updating the domain colum ....
Re: group pricing based on domain name
Are you using that *exact* code?
If so, you have a typo:
Code:
($userName, $mailDomain) = split("@", $email_address);
$sql_data= 'customers_domain' => $maildomain;
Re: group pricing based on domain name
Quote:
Originally Posted by
Ajeh
Are you using that *exact* code?
If so, you have a typo:
Code:
($userName, $mailDomain) = split("@", $email_address);
$sql_data= 'customers_domain' => $maildomain;
hi,
oh mistype but still doesn't work ..do i need to connect to database directly after passing these values.. is that safe ?
Re: group pricing based on domain name
Where are you when you get the $email_address?
Re: group pricing based on domain name
Quote:
Originally Posted by
Ajeh
Where are you when you get the $email_address?
The email address from the createaccount.php , registrion page ..
basically i want to get the email address and pass it to another column , so that i can use that from group pricing to give discount to client instantely after they register ...
Re: group pricing based on domain name
Try this instead and I put this in the:
/includes/modules/create_account.php
Code:
list($userName, $mailDomain) = split('@', $email_address);
echo 'username: ' . $userName . '<br>domain: ' . $mailDomain . '<br>';
die('I AM HERE!');
zen_db_perform(TABLE_CUSTOMERS, $sql_data_array);
It is running just before anything is committed this way so you can test things and then alter what you need properly ...