Jump to content

How changing the link display order ?


Recommended Posts

Good morning,

I wish changing the display order of some site links

Thus, as far as products are concerned, I would have to replace this


by this


Same for the category:

I found class and functions allowing to change the links displaying as I want (class Link, functions getProductLink(), getCategoryLink()) but when I go to the pages with the new links, I have the following error message: "this product is no longer available

Yet I tried to change the rules in the .htaccess but apparently I had to make mistakes

Here the line of .htaccess before the update:

RewriteRule ^([a-zA-Z0-9-]*)\-([0-9]+)\.html(.*)$ /nom_du_site/product.php?id_product=$3$1 [L,E]

RewriteRule ^lang-([a-z]{2})/([a-zA-Z0-9-]*)/([a-zA-Z0-9-]*)\-([0-9]+)\.html(.*)$ /nom_du_site/product.php?id_product=$5&isolang;=$1$3 [L,E]

RewriteRule ^lang-([a-z]{2})/([a-zA-Z0-9-]*)\-([0-9]+)\.html(.*)$ /nom_du_site/product.php?id_product=$4&isolang;=$1$2 [L,E]

RewriteRule ^([a-zA-Z0-9-]*)/([a-zA-Z0-9-]*)\-([0-9]+)\.html(.*)$ /nom_du_site/product.php?id_product=$4$2 [L,E]

After my update

RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /nom_du_site/product.php?id_product=$1$3 [L,E]

RewriteRule ^lang-([a-z]{2})/([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /nom_du_site/product.php?id_product=$3&isolang;=$1$5 [L,E]

RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /nom_du_site/product.php?id_product=$2&isolang;=$1$4 [L,E]

RewriteRule ^([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /nom_du_site/product.php?id_product=$2$4 [L,E]

Thanks !

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More