Jump to content

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

Add Password Filed To Vendor Application Form Rate Topic   - - - - -

 
  • ameerme90
  • Advanced Member
  • Members
  • Join Date: 26-Jun 18
  • 55 posts

Posted 03 July 2020 - 07:05 PM #21

Hello

 

Please check in table cscart_profile_fields_data is there any saved password you entered when filling out the form.

 

Best regards

Robert

Hello, the field is exists in table in filled with password, here where i put your code to get password from table and set instead of generated password

function fn_generate_password($length = USER_PASSWORD_LENGTH)
{
    $chars = 'abcdefghijkmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
    $nums = '1234567890';
    $i = 0;
    $password = '';
    while ($i < $length) {
        if ($i%2) {
            $password .= $chars {
                mt_rand(0, strlen($chars) - 1)
            };
        } else {
            $password .= $nums {
                mt_rand(0, strlen($nums) - 1)
            };
        }
        $i++;
    }
    
   $field_id =user_data[field_id] ;
   $company_id = user_data[company_id];
   $password  = db_get_field("SELECT value FROM ?:profile_fields_data WHERE object_type = ?s AND field_id = ?s AND object_id =?i", "V", $field_id, $company_id);

   
    
    return $password;
}


 
  • soft-solid
  • Junior Member
  • Authorized Reseller
  • Join Date: 19-Apr 10
  • 1204 posts

Posted 04 July 2020 - 06:59 PM #22

Hello

 

You can connect to a hook, e.g. "update_profile" and call it with the function passing the parameter $user_data.

 

Best regards

Robert


Team of SoftSolid
cs-cart.pl, marketplace

We specialize in creating the highest quality addons, safe, useful and flexible


 
  • ameerme90
  • Advanced Member
  • Members
  • Join Date: 26-Jun 18
  • 55 posts

Posted 04 July 2020 - 07:41 PM #23

Hello You can connect to a hook, e.g. "update_profile" and call it with the function passing the parameter $user_data. Best regards Robert Thanks for answer, can explain more with some example. Thanks Robert Sent from my iPad using Tapatalk

 
  • soft-solid
  • Junior Member
  • Authorized Reseller
  • Join Date: 19-Apr 10
  • 1204 posts

Posted 05 July 2020 - 11:04 AM #24

Hello

 

In this place you have explain hooking.

 

https://docs.cs-cart.../php_hooks.html

 

However, a better solution would be to use the "create_company_admin" hook

 

Best regards

Robert


Team of SoftSolid
cs-cart.pl, marketplace

We specialize in creating the highest quality addons, safe, useful and flexible


 
  • soft-solid
  • Junior Member
  • Authorized Reseller
  • Join Date: 19-Apr 10
  • 1204 posts

Posted 05 July 2020 - 05:05 PM #25

Hello

 

We've made an addon that solves your problem. You can check it at demo.multi-vendor.pl

 

Best regards

Robert


Team of SoftSolid
cs-cart.pl, marketplace

We specialize in creating the highest quality addons, safe, useful and flexible


 
  • ameerme90
  • Advanced Member
  • Members
  • Join Date: 26-Jun 18
  • 55 posts

Posted 06 July 2020 - 10:00 PM #26

Hello

 

We've made an addon that solves your problem. You can check it at demo.multi-vendor.pl

 

Best regards

Robert

Ok, But you did not help me with the hook and with getting filed from database.



 
  • soft-solid
  • Junior Member
  • Authorized Reseller
  • Join Date: 19-Apr 10
  • 1204 posts

Posted 06 July 2020 - 10:07 PM #27

Hello

 

https://docs.cs-cart.../php_hooks.html

 

We use hook "create_company_admin"

 

 SQL Query

$password_form  = db_get_field("SELECT value FROM ?:profile_fields_data WHERE object_type = ?s AND field_id = ?i AND object_id = ?i", "S", $field_id, $company_data['company_id']);

Best regards

Robert


Team of SoftSolid
cs-cart.pl, marketplace

We specialize in creating the highest quality addons, safe, useful and flexible


 
  • ameerme90
  • Advanced Member
  • Members
  • Join Date: 26-Jun 18
  • 55 posts

Posted 07 July 2020 - 10:21 AM #28

Hello

 

https://docs.cs-cart.../php_hooks.html

 

We use hook "create_company_admin"

 

 SQL Query

$password_form  = db_get_field("SELECT value FROM ?:profile_fields_data WHERE object_type = ?s AND field_id = ?i AND object_id = ?i", "S", $field_id, $company_data['company_id']);

Best regards

Robert

Thanks very much , 

but where exactly i wrote this code in the php file? 



 
  • ameerme90
  • Advanced Member
  • Members
  • Join Date: 26-Jun 18
  • 55 posts

Posted 07 July 2020 - 12:15 PM #29

Hello

 

We've made an addon that solves your problem. You can check it at demo.multi-vendor.pl

 

Best regards

Robert

 i cant find price?