Jump to content

[SOLVED] What is secure_key? How to import current SQL DB into PS?


Recommended Posts

I have the customers' info, passwords in my current DB, I would like to export them and adjust them for PS. But in the PS DB, I found secure_key column, I do not find this column in my current DB, How can I import the current data to PS DB?

Thank you!

Link to comment
Share on other sites

  • 1 month later...
  • 3 years later...

Hai i am new to prestashop ,

i have inserted a customer using database,when i enable and disable a customer in back office customer page it showing a error message

[PrestaShopException]

 

Property Customer->secure_key is not valid

at line 837 in file classes/ObjectModel.php

 

831.

832. $message = $this->validateField($field, $this->$field);

833. if ($message !== true)

834. {

835. if ($die)

836. throw new PrestaShopException($message);

837. return $error_return ? $message : false;

838. }

839. }

840.

841. return true;

 

 

Thanks

Link to comment
Share on other sites

Hai i am new to prestashop ,

i have inserted a customer using database,when i enable and disable a customer in back office customer page it showing a error message

[PrestaShopException]

 

Property Customer->secure_key is not valid

at line 837 in file classes/ObjectModel.php

 

831.

832. $message = $this->validateField($field, $this->$field);

833. if ($message !== true)

834. {

835. if ($die)

836. throw new PrestaShopException($message);

837. return $error_return ? $message : false;

838. }

839. }

840.

841. return true;

 

 

Thanks

Link to comment
Share on other sites

  • 3 weeks later...

I'm currently working on an osCommerce Import module with Tomer. The secure_key is just a random key. Use the following code to generate it:

 

md5(uniqid(rand(), true))

 

Where should I put this? Thank you very much

Link to comment
Share on other sites

  • 1 year later...

I used this in my case to convert all corrupted orders.

 

 

UPDATE
  ps_orders
SET
  secure_key = md5(date_format(date_add( sysdate(), INTERVAL FLOOR( 1 + (RAND() * 998)) MICROSECOND),"%Y%m%d%H%i%s%f"))
WHERE
  secure_key = -1;

Does the same just a random secure key for each order.

  • Like 1
Link to comment
Share on other sites

  • 3 months later...
  • 8 months later...
  • 1 month later...

Same here, can anyone help?  I successfully put a random key into the field for each imported customer, but results in error 500 when customer attempts to reset password.

 

They can successfully use the forgot password to mail themselves a reset link, but the reset link then presents them with error 500.

 

HELP!!!  If I can't import customers, this is a no-go and I'll be sad.

Link to comment
Share on other sites

I figured out how to turn on dev mode in config\defines.inc.php

define('_PS_MODE_DEV_', true);

which gave me a clue that it had something to do with the customer siret field.  I then did a search and found a post where someone deleted that column (bad move) and it "fixed" their issue.  Well, for me, I realized that the imported data put a text value of "null" there instead of a real null.  Set all fake "null" to null and I'm in business.

Link to comment
Share on other sites

  • 3 months later...

Same here, can anyone help?  I successfully put a random key into the field for each imported customer, but results in error 500 when customer attempts to reset password.

 

They can successfully use the forgot password to mail themselves a reset link, but the reset link then presents them with error 500.

 

HELP!!!  If I can't import customers, this is a no-go and I'll be sad.

Hi, how did you solve it? Thanks

Link to comment
Share on other sites

  • 2 weeks later...
×
×
  • Create New...