Please use
$condition = db_quote(" (?p ?p ?p ?p) ", (!empty($user_data['email']) ? db_quote('email = ?s', $user_data['email']) : '0'), (empty($user_data['user_login']) ? '' : db_quote(" OR user_login = ?s", $user_data['user_login'])), (empty($user_data['s_phone']) ? '' : db_quote(" OR s_phone = ?s", $user_data['s_phone'])), (empty($user_data['b_phone']) ? '' : db_quote(" OR b_phone = ?s", $user_data['b_phone'])));
Please use
$condition = db_quote(" (?p ?p ?p ?p) ", (!empty($user_data['email']) ? db_quote('email = ?s', $user_data['email']) : '0'), (empty($user_data['user_login']) ? '' : db_quote(" OR user_login = ?s", $user_data['user_login'])), (empty($user_data['s_phone']) ? '' : db_quote(" OR s_phone = ?s", $user_data['s_phone'])), (empty($user_data['b_phone']) ? '' : db_quote(" OR b_phone = ?s", $user_data['b_phone'])));
I try this but after i complete the register form i get server error.
Unknown column 'b_phone' in 'where clause' (1054)
SDAD
August 29, 2016, 12:00am
23
I use phone in the billing and shipping section.
app/functions/fn.users.php
Try to add this code
if (empty($is_exist) && !empty($user_data['b_phone'])) {
$is_exist = db_get_field("SELECT user_id FROM ?:user_profiles WHERE b_phone = ?s AND user_id != ?i", $user_data['b_phone'], $user_id);
}
if (empty($is_exist) && !empty($user_data['s_phone']) && empty($b_phone_is_exist)) {
$is_exist = db_get_field("SELECT user_id FROM ?:user_profiles WHERE s_phone = ?s AND user_id != ?i", $user_data['s_phone'], $user_id);
}
if (empty($is_exist) && !empty($user_data['phone'])) {
$is_exist = db_get_field("SELECT user_id FROM ?:users WHERE phone = ?s AND user_id != ?i", $user_data['phone'], $user_id);
}
after this:
$is_exist = db_get_field("SELECT user_id FROM ?:users WHERE $condition");
and change "error_user_exists" language variable.
app/functions/fn.users.php
Try to add this code
if (empty($is_exist) && !empty($user_data['b_phone'])) {
$is_exist = db_get_field("SELECT user_id FROM ?:user_profiles WHERE b_phone = ?s AND user_id != ?i", $user_data['b_phone'], $user_id);
}
if (empty($is_exist) && !empty($user_data['s_phone']) && empty($b_phone_is_exist)) {
$is_exist = db_get_field("SELECT user_id FROM ?:user_profiles WHERE s_phone = ?s AND user_id != ?i", $user_data['s_phone'], $user_id);
}
if (empty($is_exist) && !empty($user_data['phone'])) {
$is_exist = db_get_field("SELECT user_id FROM ?:users WHERE phone = ?s AND user_id != ?i", $user_data['phone'], $user_id);
}
after this:
$is_exist = db_get_field("SELECT user_id FROM ?:users WHERE $condition");
and change "error_user_exists" language variable.
Sorry but i try also this and the phone not checked. You can create over one account with the same phone
I try this but after i complete the register form i get server error.
Unknown column 'b_phone' in 'where clause' (1054)
PM me temporary FTP access, we will make this modification on your server with tests
There is any way customer can not change Billing And Shipping address Fields (is visible But Not Editable) once he register.but administer can change.
To disable e-mail you need to find design/themes/YOUR_THEME/templates/views/profiles/components/profiles_account.tpl and replace this code:
{__("email")}
with this one:
{__("email")}
and clear cache.
I want Same Change in Checkout Page Customer Not avail to change billing address Info If He want mail administrator and we make all changes as per as his mail.
design/themes/THEME/templates/views/profiles/components/profile_fields.tpl
Try to add the following code to the beginning of the file
{if $user_data.b_address}
{$disabled_by_default = true}
{/if}
Then clear cache and check the result
(!) Not tested