Muhammad Mustafa Posted March 7, 2010 Share Posted March 7, 2010 I am trying to achieve this without any success, lets assume I have the product A which is in category 1 whenever product A links appear in Prestashop (i.e: featured products, new products, cart ...etc) the link refer you to product's A page, I want to change it so whenever you click that link you forwarded to category 1 instaedIs it possible?? any idea how to achieve this?? Link to comment Share on other sites More sharing options...
Muhammad Mustafa Posted March 30, 2010 Author Share Posted March 30, 2010 I found my way out, in case anyone wanna do it, just go to classes/link.phpfind and replace getCategoryLink function with this one public function getCategoryLink($id_category, $alias = NULL) { if (is_object($id_category)) return ($this->allow == 1) ? (_PS_BASE_URL_.__PS_BASE_URI__.$id_category->link_rewrite.'/') : (_PS_BASE_URL_.__PS_BASE_URI__.'category.php?id_category='.intval($id_category->id)); if ($alias) return ($this->allow == 1) ? (_PS_BASE_URL_.__PS_BASE_URI__.$alias.'/') : (_PS_BASE_URL_.__PS_BASE_URI__.'category.php?id_category='.intval($id_category)); return _PS_BASE_URL_.__PS_BASE_URI__.'category.php?id_category='.intval($id_category); } update associated .htaccess and bingo Link to comment Share on other sites More sharing options...
cinziadm Posted January 20, 2011 Share Posted January 20, 2011 hi, i've inverse problem and i don't undestand your explanation.Can you help me please???I'd like to see product page from category link.. thank you 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