kiteman Posted May 9, 2012 Share Posted May 9, 2012 Bonjour, Je vends des produits d'occasion (uniques). Une fois vendu, le produit est d'abord désactivé puis supprimé. Et cela engendre évidemment des erreurs 404 dans GWT. J'aimerais savoir comment je peux rediriger (301) vers la page de la catégorie par défaut où était le produit plutôt que tomber sur un 404. Dans productcontroller, il y a ce code /* * If the product is associated to the shop * and is active or not active but preview mode (need token + file_exists) * allow showing the product * In all the others cases => 404 "Product is no longer available" */ if (!$this->product->isAssociatedToShop() || ((!$this->product->active && ((Tools::getValue('adtoken') != Tools::encrypt('PreviewProduct'.$this->product->id)) || !file_exists(_PS_ROOT_DIR_.'/'.Tools::getValue('ad').'/ajax.php'))))) { header('HTTP/1.1 404 page not found'); $this->errors[] = Tools::displayError('Product is no longer available.'); } else if (!$this->product->checkAccess(isset($this->context->customer) ? $this->context->customer->id : 0)) Il doit certainement y avoir une solutiuon autour de cela. Mais j'ai besoin de votre aide, ducoup. Merci PS : 1.4.5.1 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