Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Lock Customer Profile Details Rate Topic   - - - - -

 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19041 posts

Posted 29 August 2016 - 07:22 AM #21

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'])));

GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 

Posted 29 August 2016 - 10:30 AM #22

 

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)



 
  • galtinbaeva
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 06-Dec 13
  • 3302 posts

Posted 29 August 2016 - 11:17 AM #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.


Simtech Development | sales@simtechdev.com | www.simtechdev.com
CERTIFIED CS-CART PARTNER | LICENSES | DEVELOPMENT | ADD-ONS | DESIGN | UPGRADE

Google Analytics Enhanced Ecommerce - get advanced ecommerce analytics


 

Posted 29 August 2016 - 11:47 AM #24

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



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19041 posts

Posted 29 August 2016 - 02:27 PM #25

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


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • shravan
  • Member
  • Trial users
  • Join Date: 17-Jun 15
  • 26 posts

Posted 17 June 2017 - 10:22 AM #26

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. 



 
  • shravan
  • Member
  • Trial users
  • Join Date: 17-Jun 15
  • 26 posts

Posted 17 June 2017 - 10:26 AM #27

To disable e-mail you need to find design/themes/YOUR_THEME/templates/views/profiles/components/profiles_account.tpl and replace this code: 

<div class="ty-control-group">
    <label for="email" class="ty-control-group__title cm-required cm-email cm-trim">{__("email")}</label>
    <input type="text" id="email" name="user_data[email]" size="32" maxlength="128" value="{$user_data.email}" class="ty-input-text cm-focus" />
</div>

with this one:

<div class="ty-control-group">
    <label for="email" class="ty-control-group__title cm-required cm-email cm-trim">{__("email")}</label>
    <input type="text" id="email" name="user_data[email]" size="32" maxlength="128" value="{$user_data.email}" class="ty-input-text cm-focus" disabled="disabled"/>
</div>

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.



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19041 posts

Posted 19 June 2017 - 05:35 AM #28

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


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.