Search  
   
Browse by Category
 
Netfirms 24/7 Support .: DATABASE MANAGEMENT .: How do I change a customer's password in my Commerce Pro shopping cart?

How do I change a customer's password in my Commerce Pro shopping cart?

To change a customer's password in your Netfirms Commerce Pro shopping cart, please follow these steps:

I. CREATE NEW PASSWORD VIA A SCRIPT

  1. Open a text editor (eg. Notepad)
  2. Copy and paste all of the code below in to your text editor:

    <?PHP

     global $password;
     $password = "YourPassword";
     
     echo tep_encrypt_password($password);
     
      function tep_encrypt_password($plain) {
        $password = '';

        for ($i=0; $i<10; $i++) {
          $password .= tep_rand();
        }

        $salt = substr(md5($password), 0, 2);

        $password = md5($salt . $plain) . ':' . $salt;

        return $password;
      }
     
      function tep_rand($min = null, $max = null) {
        static $seeded;

        if (!isset($seeded)) {
          mt_srand((double)microtime()*1000000);
          $seeded = true;
        }

        if (isset($min) && isset($max)) {
          if ($min >= $max) {
            return $min;
          } else {
            return mt_rand($min, $max);
          }
        } else {
          return mt_rand();
        }
      } 
     
      ?>

  3. On the third line of the script, change "YourPassword" to the new password.
  4. Save the file as "change_password.php".
  5. Upload change_password.php to your "www" folder.
  6. Browse to http://yourdomain.com/change_password.php to execute the script.  This should return something similar to the following: 036efb51d3f6d6a38f4be1c01184de5c:c6
  7. Copy this string of characters.  This is your new password after being encrypted.

II. UPDATE COMMERCE PRO DATABASE WITH NEW PASSWORD

  1. To identify which database your Netfirms Commerce Pro store is using, use an FTP tool (eg. Filezilla) or Netfirms File Manager (accessible from the Netfirms Control Panel) and open the configure.php file found in ../catalog/admin/includes/
  2. Note the database information is indicated under the section //define our database connection
  3. Login to your Netfirms Control Panel at http://netfirms.com/members
  4. Click Site Tools
  5. Click Database
  6. For the Commerce Pro store you wish to configure, click Admin.  If you have more than one Commerce Pro store, please be sure to update the correct database.
  7. Click phpMyAdmin
  8. Click customers table from the left menu
  9. Click the Browse
  10. Locate the customer that you would like to update the password for and click the Edit
  11. Paste the encrypted password in the customers_password field.
  12. Click Go

    The above steps should have successfully changed the customer's password to the password specified within step I. 3 above.

How helpful was this article to you?


.: Powered by Lore 1.5.6
Visit Netfirms.com Web Hosting | Copyright © 1998 - 2006 Netfirms, Inc. All Rights Reserved.