fulup56 0 Posted April 7, 2010 Posted April 7, 2010 bonjour je cherche à modifier l' url:monsite/categoriex/produitx.htmlpar:monsite/produitx.htmlLorsque je suis dans la categorie x et que je clique sur le produit x je voudrai la requete monsite/produitx.htmlj'espère être clair.j'ai cherché sur le forum mais impossible de trouver,par contre l'inverse oui.c'est pour contourner un problème avec le module newsdef.Merci de votre aide.prestashop 1.2.5 --ovh Share this post Link to post Share on other sites
fulup56 0 Posted April 8, 2010 Posted April 8, 2010 c'est urgent merci Share this post Link to post Share on other sites
fulup56 0 Posted April 8, 2010 Posted April 8, 2010 une idée?je suppose que cela se passe au niveau du fichier htaccess mais je ne trouve pas la solution Share this post Link to post Share on other sites
daYmo 14 Posted April 22, 2010 Posted April 22, 2010 Hello,c'est dans le htaccess et dans le fichier classes/Link.php je pense.Je vais bosser dessus donc je te tiens informéA+ Share this post Link to post Share on other sites
daYmo 14 Posted April 22, 2010 Posted April 22, 2010 Bon c'était facile en fait ta question.Donc oui effectivement tu n'as rien à faire dans le .htaccessdans le fichier classes/Link.php tu remplaces la fonction getProductLink(...) par celle-ci : public function getProductLink($id_product, $alias = NULL, $category = NULL, $ean13 = NULL) { if (!isset($this->allow)) $this->allow = 0; if (is_object($id_product)) return ($this->allow == 1)?(_PS_USE_SSL_.__PS_BASE_URI__.intval($id_product->id).'-'.$id_product->link_rewrite.($id_product->ean13 ? '-'.$id_product->ean13 : '').'.html') : (_PS_USE_SSL_.__PS_BASE_URI__.'product.php?id_product='.intval($id_product->id)); elseif ($alias) return ($this->allow == 1)?(_PS_USE_SSL_.__PS_BASE_URI__.intval($id_product).'-'.$alias.($ean13 ? '-'.$ean13 : '').'.html') : (_PS_USE_SSL_.__PS_BASE_URI__.'product.php?id_product='.intval($id_product)); else return _PS_USE_SSL_.__PS_BASE_URI__.'product.php?id_product='.intval($id_product); } Share this post Link to post Share on other sites
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