elvizgz Posted December 11, 2013 Share Posted December 11, 2013 (edited) Hello, Maybe this question is very obvious or it's already answered but I can't find the solution... How can I change the URLs for pagination so they display the page number in a friendly way? Example: Prestashop default URL: http://demo-store.prestashop.com/en/10-furniture?p=2 Desired URLs: http://demo-store.prestashop.com/en/10-furniture/page/2 or http://demo-store.prestashop.com/en/10-furniture/page-2 I'm using Prestashop 1.5.5.0. Thanks in advance. Edited December 11, 2013 by elvizgz (see edit history) Link to comment Share on other sites More sharing options...
Orange35 Posted December 12, 2013 Share Posted December 12, 2013 Did you see that? http://www.presto-changeo.com/en/content/6-prestashopseotips Link to comment Share on other sites More sharing options...
elvizgz Posted December 13, 2013 Author Share Posted December 13, 2013 Hello Orange35, thanks for your response but I don't see how it can help... I'm already using friendly URLs but with pagination, the page parameter shows in a non friendly way: http://demo-store.prestashop.com/en/10-furniture?p=2 I need to change the format of the URL to get one of these: http://demo-store.prestashop.com/en/10-furniture/page/2 or http://demo-store.prestashop.com/en/10-furniture/page-2 Thanks again for your time. Link to comment Share on other sites More sharing options...
NemoPS Posted December 13, 2013 Share Posted December 13, 2013 I have not tried this, but you can have a look at the category rule of the dispatcher 'category_rule' => array( 'controller' => 'category', 'rule' => '{id}-{rewrite}', 'keywords' => array( 'id' => array('regexp' => '[0-9]+', 'param' => 'id_category'), 'rewrite' => array('regexp' => '[_a-zA-Z0-9-\pL]*'), 'meta_keywords' => array('regexp' => '[_a-zA-Z0-9-\pL]*'), 'meta_title' => array('regexp' => '[_a-zA-Z0-9-\pL]*'), ), ), Maybe something like this: 'category_rule' => array( 'controller' => 'category', 'rule' => '{id}-{rewrite}{page:/}{p}', 'keywords' => array( 'id' => array('regexp' => '[0-9]+', 'param' => 'id_category'), 'rewrite' => array('regexp' => '[_a-zA-Z0-9-\pL]*'), 'meta_keywords' => array('regexp' => '[_a-zA-Z0-9-\pL]*'), 'meta_title' => array('regexp' => '[_a-zA-Z0-9-\pL]*'), 'p' => array('regexp' => '[0-9]+', 'param' => 'p'), ), ), Again, I've not tested this 1 Link to comment Share on other sites More sharing options...
elvizgz Posted December 13, 2013 Author Share Posted December 13, 2013 Ok, thank you very much. I'll try and let you know the result. Link to comment Share on other sites More sharing options...
mauroagr Posted March 31, 2014 Share Posted March 31, 2014 Hi, The suggestion from Nemo1 work for you elvizgz? Thanks Mauro Link to comment Share on other sites More sharing options...
elvizgz Posted April 2, 2014 Author Share Posted April 2, 2014 Hi, The suggestion from Nemo1 work for you elvizgz? Thanks Mauro I didn't try it. I left that kind of URLs in the way prestashop generates them. If I change them, I'll post the result here. Link to comment Share on other sites More sharing options...
ramherfer Posted November 20, 2014 Share Posted November 20, 2014 I have not tried this, but you can have a look at the category rule of the dispatcher 'category_rule' => array( 'controller' => 'category', 'rule' => '{id}-{rewrite}', 'keywords' => array( 'id' => array('regexp' => '[0-9]+', 'param' => 'id_category'), 'rewrite' => array('regexp' => '[_a-zA-Z0-9-\pL]*'), 'meta_keywords' => array('regexp' => '[_a-zA-Z0-9-\pL]*'), 'meta_title' => array('regexp' => '[_a-zA-Z0-9-\pL]*'), ), ), Maybe something like this: 'category_rule' => array( 'controller' => 'category', 'rule' => '{id}-{rewrite}{page:/}{p}', 'keywords' => array( 'id' => array('regexp' => '[0-9]+', 'param' => 'id_category'), 'rewrite' => array('regexp' => '[_a-zA-Z0-9-\pL]*'), 'meta_keywords' => array('regexp' => '[_a-zA-Z0-9-\pL]*'), 'meta_title' => array('regexp' => '[_a-zA-Z0-9-\pL]*'), 'p' => array('regexp' => '[0-9]+', 'param' => 'p'), ), ), Again, I've not tested this In that file you have to make these changes. I am interested and looking to change the url of the page? P = 2. Thank you. Link to comment Share on other sites More sharing options...
NemoPS Posted November 21, 2014 Share Posted November 21, 2014 the file is Dispatcher.php, found in classes/ Link to comment Share on other sites More sharing options...
carceron Posted July 28, 2015 Share Posted July 28, 2015 Hello, I have a problem with Friend URL. When I enable it the paginations goes to error ( error 404). The URL's goes something like: http://www.mydomain.com/damas/bolsos/?p=2 But if I disable Friendly URL then the paginations works fine . The URL in that case is : http://www.mydomain.com/index.php?category_rewrite=bolsos&controller=category&p=2 How can I enable Friendly URL's and that the pagination works? I have PS 1.6.0.14 Thank you. Link to comment Share on other sites More sharing options...
NemoPS Posted July 29, 2015 Share Posted July 29, 2015 The first one looks right to me, it's odd it dies to 404. Do you have any other issue?Also, are you using the layered navigation module? Link to comment Share on other sites More sharing options...
Rul-ex Posted September 16, 2016 Share Posted September 16, 2016 Hello Carceron and NemoPS, I have this similar problem. When I enable URL Friendly, and navigate to some product category, I can go to page 1, but obtain 404 error from second page to final page. The same occurs if I search for a product and click in the search result in order to open the product detail. I have tried to renew .htaccess disabling and enabling URL Friendly after deleting that file, but the problem continues. Can you help me? Thanks a lot. Link to comment Share on other sites More sharing options...
NemoPS Posted September 17, 2016 Share Posted September 17, 2016 Rule-ex, can you share your site's url? Link to comment Share on other sites More sharing options...
Rul-ex Posted September 19, 2016 Share Posted September 19, 2016 Hello NemoPS, This is the URL: http://www.calderamania.com. Thanks. Link to comment Share on other sites More sharing options...
NemoPS Posted September 19, 2016 Share Posted September 19, 2016 I have a plain error 500 if I try to access the site Link to comment Share on other sites More sharing options...
Rul-ex Posted September 19, 2016 Share Posted September 19, 2016 Ok NemoPS, I have been restoring a backup. Sorry. You can try now. Thanks. Link to comment Share on other sites More sharing options...
NemoPS Posted September 21, 2016 Share Posted September 21, 2016 Looks like all category pages lead to 404 now Link to comment Share on other sites More sharing options...
Rul-ex Posted September 21, 2016 Share Posted September 21, 2016 Yes NemoPS, I have been doing some tests. Finally I have found the solution. The problem was a "Clean URL" free module I was using for removing IDs from URLs. Now I have installed this one: https://github.com/ZiZuu-store/zzCleanURLs and everything is right. Thanks for all. Link to comment Share on other sites More sharing options...
Recommended Posts