How to generate a CSV with Decrypted password
How to generate a CSV with Decrypted password
The sample project is a demonstration of CSV processing. This sample explains if you have Users CSV file with encrypted passwords and wants to generate clone of that CSV with decrypted passwords the how to do this job.The sample interface ask the user to provide the text qualifier, delimiter, password field name and source csv file. When user try to generate CSV version with decrypted password it asks the user for output csv file name and location. In order to decrypt your password you need to properly implement DecryptPassword method of the Sample.
Re: How to generate a CSV with Decrypted password
In order to create some CSV file first you need is to define is headers and then the reecords.
For example if you want to have a CSV file with UserId and UserName. In the very first line of CSV file you need to specify the headers separated by (,) and headers text quoted in double quotations and then all below lines will contain data in same format for example if you want to create a CSV file with one user record named mazhar with userid 1 then it would be something like below.
"UserId","UserName"
"1","mazhar"
Please check the attached CSV file for sample user CSV .
For example if you want to have a CSV file with UserId and UserName. In the very first line of CSV file you need to specify the headers separated by (,) and headers text quoted in double quotations and then all below lines will contain data in same format for example if you want to create a CSV file with one user record named mazhar with userid 1 then it would be something like below.
"UserId","UserName"
"1","mazhar"
Please check the attached CSV file for sample user CSV .
Re: How to generate a CSV with Decrypted password
One important thing when creating CSV data if you want to import some users for which the "UserId" field have no value (a new user and you want UserId value automatically assigned), then use the zero value for this field. Like:
"UserId","UserName"
"0","mazhar"
This way a new user record will be created and automatically a new available UserId value will be assigned.
"UserId","UserName"
"0","mazhar"
This way a new user record will be created and automatically a new available UserId value will be assigned.
Thanks for your support
Naveed Ashraf
.com
AbleCommerce Help Center
AbleCommerce Developer WIKI
Follow us on Twitter
Naveed Ashraf
.com
AbleCommerce Help Center
AbleCommerce Developer WIKI
Follow us on Twitter
Re: How to generate a CSV with Decrypted password
When using DataPort to import customers, will the UserID automatically start at the first available number and put all users in consequentially after that? In other words, if we import 1000 users, and the next available UserID after all active temporary ID's in the table is 82000, will it import the new users starting at 82001 and proceed to 83001, or will it start with the first available number (including any 'expired' user ID's that have become available), and leave gaps in the imported user ID's?
If the latter is true, then we will have to copy and paste the users into the table so that we will know each customers' ID in advance, as we also intend to import their order history from our previous software. The only disadvantage to this is that we cannot import passwords, as they will not be encrypted. This means having to default every current customer to a default password, which may upset some.
If the latter is true, then we will have to copy and paste the users into the table so that we will know each customers' ID in advance, as we also intend to import their order history from our previous software. The only disadvantage to this is that we cannot import passwords, as they will not be encrypted. This means having to default every current customer to a default password, which may upset some.
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot
Brewhaus (America) Inc.
Hot Sauce Depot
Re: How to generate a CSV with Decrypted password
If you only want to import users then it is better to use the value "ZERO" for UserId field. However as it seems you are planning to import respective orders for each user as well then it is better to use the original old value for UserId field.Brewhaus wrote: as we also intend to import their order history from our previous software.
Thanks for your support
Naveed Ashraf
.com
AbleCommerce Help Center
AbleCommerce Developer WIKI
Follow us on Twitter
Naveed Ashraf
.com
AbleCommerce Help Center
AbleCommerce Developer WIKI
Follow us on Twitter
Re: How to generate a CSV with Decrypted password
So, we can force the UserID? In other words, as long as we do not conflict with an existing UserID, we can specify the UserID that we want used? That makes life much easier.
As we do not have the encrypted password, if we leave the EncryptedPassword field blank, and put in a text password in the PlainTextPassword field, with these passwords get encrypted upon importing? If so, we can create new passwords for customers based on their last name, and not have to use a default password that will be common to all users that we import.
As we do not have the encrypted password, if we leave the EncryptedPassword field blank, and put in a text password in the PlainTextPassword field, with these passwords get encrypted upon importing? If so, we can create new passwords for customers based on their last name, and not have to use a default password that will be common to all users that we import.
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot
Brewhaus (America) Inc.
Hot Sauce Depot
Re: How to generate a CSV with Decrypted password
Even with the users.csv file above we get the same error- password field cannot be blank.
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot
Brewhaus (America) Inc.
Hot Sauce Depot
Re: How to generate a CSV with Decrypted password
That was just a sample to give you an idea of CSV. You need to tell the application about the CSV's field that keeps the password information. If the CSV contains the password information in UserPassword field then on the GUI you need to tell that field name to the application.
For example if you exported the users information from your old database in CSV format that is something like
UserId,FirstName,LastName...............................................,MyPassword
0,mazhar,mazhar.............................................................,&6777jjh
Then when you run the sample you first you need to tell the application that which field contains the encrypted password information so just specify the Password Field Name value to MyPassword.
For example if you exported the users information from your old database in CSV format that is something like
UserId,FirstName,LastName...............................................,MyPassword
0,mazhar,mazhar.............................................................,&6777jjh
Then when you run the sample you first you need to tell the application that which field contains the encrypted password information so just specify the Password Field Name value to MyPassword.
Re: How to generate a CSV with Decrypted password
When I try to run the import I have all fields in the CSV file linked to the field that DataPort should be importing them into. I believe this is what you mean. Correct me if I am wrong.
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot
Brewhaus (America) Inc.
Hot Sauce Depot