Jump to content

Importing Virtuemart customers & password verification


Recommended Posts

I am new to PrestaShop and have been using virtuemart. I have imported the virtuemart customers information into the Prestashop database. However the password is proving a problem

Is is possible to run some php that when a returning customer types their password it will be verifyed against Virtuermart format and automatically converted to Prestashop format on their first login.


I have come across a similar solution for Zen-Cart to Virtuemart

//AKS> Check for ZC password
               $query = "SELECT password FROM #__users WHERE username = '$username'";
               $this->_db->setQuery( $query );
               $this->_db->loadObject( $aks);

               $aks_stack = explode(':', $aks->password);
               if (sizeof($aks_stack) == 2) {
                   $orgpasswd     = strval( mosGetParam( $_POST, 'passwd', '' ) );
                   if (md5($aks_stack[1] . $orgpasswd) == $aks_stack[0]) {    // Valid password
                       $query = "UPDATE #__users SET password = '$passwd' WHERE username = '$username'";
                       $this->_db->setQuery( $query );
                       $this->_db->query();
                   }
               }
//AKS<
           // query used for login via login module

Link to comment
Share on other sites

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...