zebuloin Posted February 4, 2011 Share Posted February 4, 2011 Bonjour,Je demande votre aide pour un petit problème.Lorsque je supprime un produit dans la BDD et lorsque je retourne ( par le biais de google ) sur la page du produit que j'ai supprimé, la redirection 404 ne se fait pas.Je tombe sur la page de mon produit qui est vide avec juste le message d'erreur suivant :Il y a 1 erreur : 1. ce produit n'est plus disponibleCela m'embête, car lorsque les clients arrivent par le biais de google sur cette page, celle-ci n'est pas très " belle ".Je souhaiterai qu'une fois l'article supprimé nous puissions tomber directement sur la page d'accueil.( je précise que j'ai déjà fait un .htaccess pour rediriger les pages 404 vers la page d'accueil )J'espère que je me suis bien exprimé pour vous faire comprendre mon problème.Merci à l'avance pour vos réponses Link to comment Share on other sites More sharing options...
dadj2408 Posted February 17, 2011 Share Posted February 17, 2011 meme probleme quelqu'un a une reponse ?? Link to comment Share on other sites More sharing options...
Patrick21 Posted February 19, 2011 Share Posted February 19, 2011 Bonjource n'est pas une erreur mais une fonction dans le fichier product.phpentre les lignes 110 et 115donc si vous voulez un retour sur la page accueil ou autres c'est la ligne 112 et 114 qu'il faut modifierPatrick Link to comment Share on other sites More sharing options...
zebuloin Posted February 19, 2011 Author Share Posted February 19, 2011 Bonjour,Merci beaucoup pour cette réponse.Effectivement, je veux tomber sur la page d'accueil.Voici les lignes 114 et 115 de product.php114 header('HTTP/1.1 404 page not found');115 $errors[] = Tools::displayError('product is no longer available');Que dois-je changer exactement ?Merci à l'avance Link to comment Share on other sites More sharing options...
Patrick21 Posted February 19, 2011 Share Posted February 19, 2011 Bonjourj'ai cela moi sous la version 1.2.5$product = new Product(intval($_GET['id_product']), true, intval($cookie->id_lang)); if (!Validate::isLoadedObject($product) OR !$product->active)112 $errors[] = Tools::displayError('product is no longer available'); (ce produit n’est plus disponible ) elseif (!$product->checkAccess(intval($cookie->id_customer)))114 $errors[] = Tools::displayError('you do not have access to this product'); elsec'est la 112 qui faut modifier mais je ne connais pas le code qui renvoi sur l'accueilPatrick Link to comment Share on other sites More sharing options...
zebuloin Posted February 19, 2011 Author Share Posted February 19, 2011 Merci Patrick.Tu me donnes la piste de mon problème.Maintenant, il n'y a plus qu'à trouver ce fameux code.Le Php = je connais pas du tout. Link to comment Share on other sites More sharing options...
dadj2408 Posted February 20, 2011 Share Posted February 20, 2011 Quelqu'un conait t-il ce fameux code qui renvoie sur la page d'accueil ??????? Link to comment Share on other sites More sharing options...
Patrick21 Posted February 20, 2011 Share Posted February 20, 2011 Bonsoiren cherchant un peu remplacer ligne 112$errors[] = Tools::displayError('product is no longer available');parTools::redirect('index.php');Patrick Link to comment Share on other sites More sharing options...
dadj2408 Posted February 21, 2011 Share Posted February 21, 2011 bonjourje lai tester et tout fonctionne seulement cela me fait une redirection de type 302ya til un moyen de la mettre en 301 ?? Link to comment Share on other sites More sharing options...
dadj2408 Posted April 6, 2011 Share Posted April 6, 2011 une idee pour prestashop 1.4.0.17 ???? Link to comment Share on other sites More sharing options...
dadj2408 Posted May 1, 2011 Share Posted May 1, 2011 je me repond a moi memeil fo modifier le fichier ProductController.php qui se trouve dans le fichier controllers Link to comment Share on other sites More sharing options...
Patrick21 Posted July 19, 2011 Share Posted July 19, 2011 Bonjouret tu as fait qu'elle modif dans le ProductController ?MerciPatrick Link to comment Share on other sites More sharing options...
Patrick21 Posted July 19, 2011 Share Posted July 19, 2011 BonjourUps, j'ai trouvé, désolé mais j'avais pas bien cherché dans le fichiertout est okMerciPatrick Link to comment Share on other sites More sharing options...
diabolyo Posted August 21, 2011 Share Posted August 21, 2011 Bonjour<br/><br/>Ups, j'ai trouvé, désolé mais j'avais pas bien cherché dans le fichier<br/>tout est ok<br/><br/>Merci<br/>Patrick Bonjour à tous, si tu pouvais partager ce que tu as trouvé … Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now