Jump to content

Bewat

Members
  • Posts

    4
  • Joined

  • Last visited

Bewat's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi Thanks very much for your answer. I have tried as much as I can your suggestion but it seems the variable values I get for the new customer in customer.php are empty, not matter where I place the code. Could you please let me know if it is not too much effort the code to insert and where in customer.php? Is there any other file that should I edit?
  2. - When a new customer register in Prestashop 1.7 I need the user to be also registered in another external system, it is a feedback system called phpBack. - Basically when he registers I need to insert his new customer values: $id_customer, $firstname, $lastname, $email and $password_hash, into phpBack database called "external" in a table called "users" - I am successfully able to insert values manually to that database via classes/customer.php, but the thing is I need to retrieve the new user variables like in the following code: <?php $servername = "localhost"; $username = "external"; $password = "example"; $dbname = "external"; // Create connection $conn = mysqli_connect($servername, $username, $password, $dbname); // Check connection if (!$conn1) { die("Connection failed: " . mysqli_connect_error()); } $sql1 = "INSERT INTO `users` (`id`, `name`, `email`, `pass`, `votes`, `isadmin`, `banned`) VALUES ($id_customer, '$firstname $lastname', '$email', '$passwordhash', 20, 0, 0);"; $result1 = mysqli_query($conn1, $sql1); ?> Where and how in classes/customer.php can I take the new customer variables $id_customer, '$firstname $lastname', '$email', '$passwordhash' to insert them in external database? Thanks in advance
  3. Necesito integrar Prestashop con un sistema externo de Feedback (phpBack), para que cuando un usuario se registre en Prestashop también se registre automáticamente en el otro sistema de Feedback. Prestashop (v1.7) y Feedback system están en el mismo servidor. Prestashop database se llama: shopdatabase y Feedback database se llama: feedbackdatabase Básicamente necesito que Prestashop ejecute la siguiente SQL query en la base de datos de Feedback con los datos del usuario correctos (cogidos de la base de datos de Prestashop o del query del formulario de registro) una vez que el usuario se registra: USE feedbackdatabase GO INSERT INTO `users` (`id`, `name`, `email`, `pass`, `votes`, `isadmin`, `banned`) VALUES (1, 'testuser', 'test@test.com', '$2a$08$QIdsfasdfUMh_testhash', 20, 0, 0); `id`, `name`, `email`, `pass` tienen que ser cogidos de la base de datos de Prestashop o del query del formulario de registro `votes`, `isadmin`, `banned` values son siempre iguales 20, 0, 0 Muchas gracias de antemano
  4. I need to integrate Prestashop registration with an external Feedback System (phpBack), so when a user register into Prestashop he is automatically registered (insert sql values) into the Feedback system. Prestashop (v1.7) and Feedback system are both in the same server. Prestashop database is called: shopdatabase and Feedback database is called: feedbackdatabase Basically I need to make Prestashop run this SQL query in Feedback database with correct user values (taken from Prestashop database or registration query) once the user register: USE feedbackdatabase GO INSERT INTO `users` (`id`, `name`, `email`, `pass`, `votes`, `isadmin`, `banned`) VALUES (1, 'testuser', 'test@test.com', '$2a$08$QIdsfasdfUMh_testhash', 20, 0, 0); So `id`, `name`, `email`, `pass` should be taken from Prestashop database or registration query `votes`, `isadmin`, `banned` values are allways the same 20, 0, 0 Thanks in advance
×
×
  • Create New...