Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

162
Vistas
PRESTASHOP - Link to redirect after login

hello

I need to make a link that sends to the login page. As soon as the person has logged in, he/she should be redirected to another page (of his/her account for example).

I was using this link before: https://arnauddevilleneuve.shop/connexion?back=https://arnauddevilleneuve.shop/fr/module/allinone_rewards/sponsorship but it doesn't work anymore.

Did you have any ideas ? Thanks in advance, if you need more precision, ask me !

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

I don't know any prestashop but here's a normal PHP code solution.

Login page: <button type="submit" class="btn btn-light">Login</button>

PHP file:

<?php
session_start();
if(!isset($_POST['email'])){
    header('Location:../index.php');
}
$e=$_POST['email'];
$p=$_POST['pass'];

include('dbdata.php');

$con=new mysqli($dbservername,$dbusername,$dbpassword,$dbname);

$sql="SELECT * FROM users WHERE email='$e' AND password='$p'";

$result=$con->query($sql);
if($result->num_rows>0){
    $con->close();
    $_SESSION['user']=$e;
    header('Location:../home.php');
}else{
    header("Location:../index.php?invalid");
}
$con->close();
?>

in here home.php is the page user is redirected to after login. index.php is the login page. Hope this works

about 4 years ago · Juan Pablo Isaza Denunciar

0

So i found a solution using the back= parameter :

{if $logged}
  <script type="text/javascript">
      $('#reduclink').on('click', function(ev){
        window.open("https://arnauddevilleneuve.shop/connexion?back=https://arnauddevilleneuve.shop/fr/reduction","Reductions", "width=1000, height=700"); 
    });
  </script>

  {else}
    <script type="text/javascript">
      $('#reduclink').on('click', function(ev){ 
        window.open("https://arnauddevilleneuve.shop/fr/reduction","Reductions", "width=1000, height=700"); 
    });
  </script>
{/if}
      <p class="collapse-button" id="reduclink" style="padding-left: 1.25rem;
    display: inline-block; color: black; cursor:pointer">Voir les réductions disponibles</p>

{if $logged} allows to know if the client is connected and to redirect on a link according to yes or no.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda