Jump to content
HA!*!*Y

[Override] Friendly Urls Without Id Number For V1.5

Recommended Posts

EDIT:

 

Changed /override/classes/dispatcher.php manufacturers with the one from unitv

 

'manufacturer_rule' => array(

'controller' => 'manufacturer',

'rule' => 'manufacturer/{rewrite}/',

'keywords' => array(

'id' => array('regexp' => '[0-9]+'),

'rewrite' => array('regexp' => '[_a-zA-Z0-9-\pL]*', 'param' => 'manufacturer_rewrite'),

'meta_keywords' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),

'meta_title' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),

 

Everything else is from version 23. Everything works fine now!

 

My version v23 was meant to work with:

/m/samplemanufacturer for manufacturers

/s/samplesupplier for suppliers

 

If you want to use your own prefix, change the dispatcher default route to fit your needs ('rule' => '*******/{rewrite}/'), easy.

That's basically what you did, no need to replace anything!

Share this post


Link to post
Share on other sites

Thanks for explaining. Now it's totally clear :-)

 

Share this post


Link to post
Share on other sites

I am considering to integrate this in my project, but the posts by users arguing about google issues discouraged me. Is there way to install it without theese problems, or this is the drawback of this module?

Share this post


Link to post
Share on other sites

My site is going live next week. Should I use this solution or should I wait for stable version? If I want to remove it, just delete the files in the override folder?

Share this post


Link to post
Share on other sites

Hello, I have tested it on a clean prestashop and works great. However on my localhost server if i enter a category it doesnt show images, i mean... it shows no image available image - default if u didnt uploaded, however after I apply a filter, the photos showed up.

 

Can someone help me with this? Thank you.

 

LE: I also saw that route to products for a manufacturer doesnt work, if i click on lg for example it gives me the full list of manufacturers, but not the products.The picture for manufacturer doesnt appear in here too.

 

This happens on clean too...

 

LE2: Changed from lapys version to happy's and seems like there is no issue with manufacturer, but now i still cand see the images only after i apply filters. Take a look in pics attached. Any ideas?

 

21kc701.jpg

 

2ebwe49.jpg

 

2m35utf.jpg

Edited by rusteh (see edit history)

Share this post


Link to post
Share on other sites

Hello, I have tested it on a clean prestashop and works great. However on my localhost server if i enter a category it doesnt show images, i mean... it shows no image available image - default if u didnt uploaded, however after I apply a filter, the photos showed up.

 

Can someone help me with this? Thank you.

 

LE: I also saw that route to products for a manufacturer doesnt work, if i click on lg for example it gives me the full list of manufacturers, but not the products.The picture for manufacturer doesnt appear in here too.

 

This happens on clean too...

 

LE2: Changed from lapys version to happy's and seems like there is no issue with manufacturer, but now i still cand see the images only after i apply filters. Take a look in pics attached. Any ideas?

 

 

 

 

rusteh > try this code from github

 

https://raw.github.com/iwanwan/Prestashop-1.5/master/controllers/front/ManufacturerController.php

 

worked for me..

Share this post


Link to post
Share on other sites

one last thing: can I set the root category not to remove by .htaccess

 

myshop.com/t-shirts

myshop.com/men/t-shirts

 

or it can be also

 

myshop.com/men/t-shirts/goodshirts/verygoodshirts/

 

because i have shirts also in men and women category and it redirects me from both links to one page

Edited by AndyLaci (see edit history)

Share this post


Link to post
Share on other sites

So I guess with 1.5.4 out the module doesnt work any more... :)

Share this post


Link to post
Share on other sites

It's not working for me after updating to 1.5.4. Can I just remove the override files? What are the default URL rewrite settings in the backoffice?

Share this post


Link to post
Share on other sites

great, its work perfectly,thanks a lot!

 

(users, don't forget empty the cache after install )

 

PrestaShop™ 1.5.4.0

http://www.vagyonvedelem.net

Where i must empty the cache after install?

I tryed to delete all in folder "cache" but it don't helped me...

I use last clean prestashop 1.5

 

sorry for my bad english

Share this post


Link to post
Share on other sites

Where i must empty the cache after install?

I tryed to delete all in folder "cache" but it don't helped me...

I use last clean prestashop 1.5

 

sorry for my bad english

 

Hello, my english is poor too :), but, there is a good modul, and it's free :)FREE EMPTY CACHE MODUL , simple install it, and use it.

Share this post


Link to post
Share on other sites

When i upgrade to 1.5.4 i goes to front office, product details.

 

It say me "product don't found"

 

I goes to seo & url, it forces me to add id.

 

Any solution?

 

Thanks and sorry for my english

 

Sorry, i didn't uploaded to root /override {solved}

Edited by yks16 (see edit history)

Share this post


Link to post
Share on other sites

Hello.

I have a problem with this override for prestashop 1.5.4.

When i install this files in the server, the backend and website in the front just get white screen without any content.

I have upgrade the shop from 1.5.2 to 1.5.4 and i try to remove the id´s from the prestashop but when i use your override, i just getting white screen both in the front and back end and i cant do anything. Thats why I return to the prestashop´s original files.

 

I have tried to override v.0.22.

 

Can you guys please help me solving this problem?

 

Thanks a lot.

Share this post


Link to post
Share on other sites

If someone has achieve to run this override in 1.5.4.0 version, please share it with us :)

Edited by cloder (see edit history)

Share this post


Link to post
Share on other sites

If someone has achieve to run this override in 1.5.4.0 version, please share it with us :)

Hello,

#115 I wrote, that :) I use 1.5.4.0, and its WORK CORRECTLY (thanks for developers ):) please visit my page and, test it :)

http://www.vagyonvedelem.net = no id, in the url :)

Share this post


Link to post
Share on other sites

Great work! I had to tinker slightly but the results are exactly what I was looking for.

 

Well done!

 

I attached a screenshot of my SEO settings in BO if it helps anyone...

post-306361-0-21858800-1364946628_thumb.jpg

Edited by Online Office USA (see edit history)

Share this post


Link to post
Share on other sites

Great work! I had to tinker slightly but the results are exactly what I was looking for.

 

Well done!

 

I attached a screenshot of my SEO settings in BO if it helps anyone...

I spoke too soon...white screens and errors about Dispatch.php and all of the others!

 

Installed files in wrong folder...

Edited by Online Office USA (see edit history)

Share this post


Link to post
Share on other sites

I spoke too soon...white screens and errors about Dispatch.php and all of the others!

 

So I got it working on two sites now...my silly self put files where they didn't belong! Doh!

 

However, my routing to the Manufacturers Page is not working. Instead of it displaying a prouduct list of items by manufacturer it takes my to the (uncompleted) List of Manufacturers page.

 

Getting closer...

 

Resolved!

Edited by Online Office USA (see edit history)

Share this post


Link to post
Share on other sites

EDIT:

 

Changed /override/classes/dispatcher.php manufacturers with the one from unitv

 

'manufacturer_rule' => array(

'controller' => 'manufacturer',

'rule' => 'manufacturer/{rewrite}/',

'keywords' => array(

'id' => array('regexp' => '[0-9]+'),

'rewrite' => array('regexp' => '[_a-zA-Z0-9-\pL]*', 'param' => 'manufacturer_rewrite'),

'meta_keywords' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),

'meta_title' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),

 

Everything else is from version 23. Everything works fine now!

Nice! That's one issue taken care of

Share this post


Link to post
Share on other sites

My version v23 was meant to work with:

/m/samplemanufacturer for manufacturers

/s/samplesupplier for suppliers

 

If you want to use your own prefix, change the dispatcher default route to fit your needs ('rule' => '*******/{rewrite}/'), easy.

That's basically what you did, no need to replace anything!

Greetings! Is there a different way to do this and can you explain? This way did fix the problem I was having with manufacturers. Thanks

Share this post


Link to post
Share on other sites

Hello.

I have a problem with this override for prestashop 1.5.4.

When i install this files in the server, the backend and website in the front just get white screen without any content.

I have upgrade the shop from 1.5.2 to 1.5.4 and i try to remove the id´s from the prestashop but when i use your override, i just getting white screen both in the front and back end and i cant do anything. Thats why I return to the prestashop´s original files.

 

I have tried to override v.0.22.

 

Can you guys please help me solving this problem?

 

Thanks a lot.

Not saying you'd do something as silly as I did, but I didn't install the files in override/classes and controllers. :wacko: When I put them where they belong, viola!

Share this post


Link to post
Share on other sites

Hey, i am not sure. But does this still work? and can i use it on my site?

Do i have to change the files in file manager and nothing else? :)

Share this post


Link to post
Share on other sites

I use PS 1.5.4 and the override works. Just empty the cache.

I reupload the files, i restored manufacturers and suppliers to defaults as for me the urls without id were not working.

override.zip

Edited by lapy90 (see edit history)

Share this post


Link to post
Share on other sites
lapy90, dit you make changes to the SEO/URL settings in the backoffice in 1.5.4?

Share this post


Link to post
Share on other sites

lapy90, dit you make changes to the SEO/URL settings in the backoffice in 1.5.4?

 

No, I just went to "Performance" and I changed the recompile option, that seems to clear any cache.

PS Manufacturers and Suppliers don't work, I reuploaded the override in my post above with standard Manufacturers and Suppliers from PrestaShop 1.5.4.

Before installing the one I just posted delete ManufacturerController.php and SupplierController.php from /override/controllers/front if you previously installed another module version!

Share this post


Link to post
Share on other sites

Can someone explain clearly how to update to 1.5.4?

 

My steps that DOESN'T work:

  1. Update to 1.5.4 with 1 click upgrade tool;
  2. Deleted manualy cache in cache/smarty/cache+compile;
  3. Modified in Performance -> Recompile on force recompile, then moved on recompile when changed;
  4. Uploaded lapy's override in override but no replace file poped up so maybe i put it wrong;
  5. Rolled back to 1.5.3.1 till I understand how to install this

 

Thank you very much, a detailed guide to 1.5.4 would be great.

Share this post


Link to post
Share on other sites

Suddenly I cannot add or update products. Getting an error that I am checking the forums on but they seem to relate to a version upgrade...here is the error

 

An error occurred while updating object. product ()

Share this post


Link to post
Share on other sites

The problem of remove the ID is that if a product has the same name generate parallel and therefore will not know that url prestashop load. Besides that Google will interpret it as duplicate content.17.jpg18.jpg19.jpg20.jpg

  • Like 1

Share this post


Link to post
Share on other sites

The problem of remove the ID is that if a product has the same name generate parallel and therefore will not know that url prestashop load. Besides that Google will interpret it as duplicate content.17.jpg18.jpg19.jpg20.jpg

You're better off taking the time to create unique page titles anyway. And having a category ID number > then a dash > then your item title is in no way helpful to your SEO

Share this post


Link to post
Share on other sites

Is there a way to change the URL for pictures and remove the ID?

Share this post


Link to post
Share on other sites

Tried Happy's lattest version (cleanurl_v3) after updating to 1.5.4, deleted cache and worked like a charm, all clean urls no ids involved.

 

Very simple and direct, just upload delete cache hit ctrl+f5 and you're good to go!

 

Thank you!

Share this post


Link to post
Share on other sites

Solved! I feel so HA!*!*Y

 

Thank for the help again!

 

Replace line no 661 in classes/Search.php

 

GROUP BY product_shop.id_image

with

GROUP BY product_shop.id_product

 

 

Thanks Happy, (cleanurl_v3) works great on my 1.5.4 installation, however the Tags (tag block) are not working at all, when We click a link it redirects to a page with a missing image icon, once your click on that image it redirects back to the same missing image page. any ideas?

 

Thanks for your help in advance

Edited by myrabbitvibrators (see edit history)

Share this post


Link to post
Share on other sites

v.3 works on 1.5.4. for me. What I have to do in order to make category look like www.mysite.category.html? If I change category URL to {rewrite}.html then I have 404 error.

Edited by astik1969@gmail.com (see edit history)

Share this post


Link to post
Share on other sites

I am Running Prestashop 1.5.4 or the newest version if that's not the correct number. And when I installed Clean_urls.zip as a module and installed it all my pages gave me 404 errors. I went to the psadmin to delete it and then i was redirected to

 

The website encountered an error while retrieving "my domain here"It may be down for maintenance or configured incorrectly.

Here are some suggestions:

HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request.

I removed my sites address just to be safe but yeah. Not saying its the module's fault could be bad timing. Any Ideas?

Share this post


Link to post
Share on other sites

I looked in the ftp and can not locate the module at all. I can't even log into my psadmin anymore

 

Try to delete module via ftp and check if site is working then try to install this module and clean cache (read few pages back). Hope it helps.

Share this post


Link to post
Share on other sites

I connected about 3 times now and am on the chat with technical support (my hosting) and we both can not find it yet. i went to public_html and then modules and no luck

Share this post


Link to post
Share on other sites

Copy the public_html directory to your local machine, and Search it. That will tell you where to find it on the server.

Share this post


Link to post
Share on other sites

Alright the module is gone and the site is functional but all my pages are 404 any ideas on that?

Share this post


Link to post
Share on other sites

This will sound very stupid but. my browser's cache? or the site's? If the sites then how do i do that? I did my browser and same issue

Share this post


Link to post
Share on other sites

I hope this one doesnt break the site too aha thanks ill give that a shot

Share this post


Link to post
Share on other sites

If you still want to have clean urls try this;

check if your hosting rewrite_module is turned on;

install cleanurls v3.0;

clean up cache with module

On my site it's working well.

Share this post


Link to post
Share on other sites

reinstall and all ok.

 

but if in

{category:/}{id}-{rewrite}{-:ean13}/

delete {id}

{category:/}{rewrite}{-:ean13}/

 

link to product work good without ID, but lin to category don't work - 404

Edited by baldden (see edit history)

Share this post


Link to post
Share on other sites

I noticed 1 problem, don`t know if it has something to do with url rewriting but my breadcrumb shows no subcategories!

And it seem smarty capture path isn`t working properly, because I tried to swich to default theme and the problem stays. Anybody same problem or know the solution?

 

<< didn`t select the category in product

Edited by AndyLaci (see edit history)

Share this post


Link to post
Share on other sites

i am little confused i have version 1.5.3

and i use removeURLid1.5_v0.22 and when i go to manufacture list or categories i don't see the images but when i press the filters i see the images

 

any solution ?

Share this post


Link to post
Share on other sites

Hi.

 

Thanks, worked like a charm :)

 

Just had to upload the module to the site thru the FTP and it removed the Id :)

 

Cheers.

Share this post


Link to post
Share on other sites

So everything is working great except that I'm getting several duplicate results in my webmaster tools reports. I am getting duplicate titles and descriptions for items that have been rewritten (see attached.) If there is a fix to this that would be great!

post-306361-0-85743900-1365801045_thumb.jpg

Share this post


Link to post
Share on other sites

Thank.... I use cleanurls_v3.zip - works with 1.5.4 as a module

 

Work welll in prestashop 1.5.4, very simple just install.

Thank for HA!*!*Y

Share this post


Link to post
Share on other sites

Hi. I removed the slash from categories and then my homepage & other pages gives a 404.

Is there a solution?

I use cleanurls_v3.zip with 1.5.4

 

Thanks

Share this post


Link to post
Share on other sites

For PS 1.5.3.1, the correct installation is extract removeURLid1.5_v0.22.zip in override folder?

Share this post


Link to post
Share on other sites

Hi. I removed the slash from categories and then my homepage & other pages gives a 404.

Is there a solution?

I use cleanurls_v3.zip with 1.5.4

 

Thanks

Try the settings as shown

 

I have those settings on three installs and they all seem to work except for some duplicate content results in my webmaster tools. Hope it helps...

post-306361-0-44440400-1365954457_thumb.jpg

Edited by Online Office USA (see edit history)

Share this post


Link to post
Share on other sites

So everything is working great except that I'm getting several duplicate results in my webmaster tools reports. I am getting duplicate titles and descriptions for items that have been rewritten (see attached.) If there is a fix to this that would be great!

 

Yes, try the new update it should fix this, by the way it takes about 4+ weeks for your webmaster tools reports to update

 

 

i am little confused i have version 1.5.3

and i use removeURLid1.5_v0.22 and when i go to manufacture list or categories i don't see the images but when i press the filters i see the images

 

any solution ?

I have not tested cleanurls_v0.3x with 1.5.3 in 1.5.4 the override install was changed but my code should work with it. can you send me the URL?

 

 

Hi. I removed the slash from categories and then my homepage & other pages gives a 404.

Is there a solution?

I use cleanurls_v3.zip with 1.5.4

 

Thanks

 

There has to be a pattern to know what type of page it is that is why all product pages end with .html & CMS have /info/about-us & so on...

 

see post for more info: http://www.prestasho...ost__p__1126116

Share this post


Link to post
Share on other sites

Hello

 

 

i Downloaded cleanurls_v0.3.1.zip and i install in prestashop 1.5.4 but i saw a problem in category page rest everything is OK. please look at the picture and try to solve this problem because if i disable this module then i cannot open my shop

 

Thank you

hdp2101

post-480835-0-43894700-1366114888_thumb.jpg

post-480835-0-81122800-1366114889_thumb.jpg

post-480835-0-21229500-1366114891_thumb.jpg

post-480835-0-37192300-1366114893_thumb.jpg

post-480835-0-75433400-1366114929_thumb.jpg

Share this post


Link to post
Share on other sites

Works for me in PS1.5.3.1 but the home page returns 404... :S

 

Maybe it depends on the language (2 available in my shop)?

Share this post


Link to post
Share on other sites

Hi, getting a 404 when my product name contains a dot "."

 

Please help!

Share this post


Link to post
Share on other sites

I tried clean urls and removeURLid1.5_v0.22 , cleanurls v3..1 but these versions are not working on prestshop v 1.5.4

 

I am getting the following error for remove url id:

Fatal error[PrestaShop] Fatal error in module Unk:

Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater

 

Please help us.

Share this post


Link to post
Share on other sites

Hello,

 

I have a strange problem because on local installation pages like "my-account" or "authentication" work's fine but after move to production server doesn't work... Categories work's fine, also products but normal pages like "my-account" returns 404 :o

Share this post


Link to post
Share on other sites

Hello,

 

I have a strange problem because on local installation pages like "my-account" or "authentication" work's fine but after move to production server doesn't work... Categories work's fine, also products but normal pages like "my-account" returns 404 :o

 

Make sure you did uplolad the .htaccess file and also that you did activate the module ;)

Share this post


Link to post
Share on other sites

Module is active because category URLs are now without id-s also products, htaccess is the same as on localhost (only diffrent URLs). Maybe I test on diffrent server...

 

SOLVED - Bad rewrite rules in SEO/URLs tab

Edited by Krystian Podemski (see edit history)

Share this post


Link to post
Share on other sites

Yes, try the new update it should fix this, by the way it takes about 4+ weeks for your webmaster tools reports to update

 

 

The new update doesn't work for me and the 4+ weeks seems inaccurate as the duplicates continue to increase. So it would appear that it is updating way sooner than 4+ weeks.

Share this post


Link to post
Share on other sites
Suddenly I cannot add or update products. Getting an error that I am checking the forums on but they seem to relate to a version upgrade...here is the error An error occurred while updating object. product ()

 

Hi,

I have exactly the same error, how did you resolve it ?

Share this post


Link to post
Share on other sites

Hi, getting a 404 when my product name contains a dot "."

 

Please help!

 

how did you get a dot URL?

I try to ad a dot the url gets cleaned (Products > SEO > Friendly URL) before i can save it.

 

but you would have to edit the Dispatcher.php file

 

rule for product controller rewrite because only underscore (_) letters and numbers are allowed by default

Share this post


Link to post
Share on other sites

HA!*!*Y maybe you put code on GitHub?

 

I would like to make a few improvements, for eg the test when saving product - is URL already exists.

 

I was thinking to doing that anyways, I'll try to put it up sometime today.

 

I'll PM you once I get it done

 

https://github.com/Ha99y/prestashopCleanURLs/

Edited by HA!*!*Y (see edit history)

Share this post


Link to post
Share on other sites

hello guys

i have a small problem with my url rewrite, when i have more subcategories with the same name, ex. accesories, on the 1st one it works, on the rest of them i get and url parameter ?category_rewrite=accesorii.

http://www.e-unelte.ro/aparate-de-sudura/accesorii/?category_rewrite=accesorii'>http://www.e-unelte.ro/aparate-de-sudura/accesorii/?category_rewrite=accesorii

http://www.e-unelte.ro/aparate-de-sudura/accesorii/

 

is there anyone with the same problem?!

 

thanks

Share this post


Link to post
Share on other sites

Hello,

 

I like this module a lot, it made me happy. I really didn't like the ID numbers in the 'clean' links of Prestashop.

 

Though when using I ran into a few problems, hopefully someone can help me out...

  1. How to remove the '.html' from the clean product link and instead add a '/' at the end?
  2. The module doesn't seem to clean links if you manually create them in a module. For instance, my theme uses a special footerlinks module. The links I added over there are not cleaned.
     
    This is how I inserted the link: index.php?id_cms=3&controller=cms
  3. When trying to uninstall or reset the module, I'm facing the famous white screen of death on my site. How can that be?

Kind regards,

 

Marco

Share this post


Link to post
Share on other sites

in version 1.5.4.1 don't work.

 

The folder controller of override is empty :S in a clean version of prestashop

 

thanks!

 

update: sorry with de module clean, all works! thanks!

Edited by info@pardebits.es (see edit history)

Share this post


Link to post
Share on other sites

Hi,I have a very serious problem, I installed the module cleanurls_0.3.1 and everything worked, but within minutes my site has completely stopped working: (

Share this post


Link to post
Share on other sites

How do I get this tow work on Prestashop 1.5?

 

It won't show up as a module. Do I upload it the module folder or to the override folder?

Edited by threeopus3 (see edit history)

Share this post


Link to post
Share on other sites

Hi I installed HA!*!*Y's removeURLid1.5_v0.22 on my 1.5.3.1 installation all looks fine. Only a couple of links still seem to be not rewriting correctly.

http://hellomobio.co...er=new-products

http://hellomobio.co...ler=prices-drop

 

also with the mobile site activated

 

http://hellomobio.co...&back=order-opc I get a page not found. With URL friendly off the working url is http://hellomobio.co.uk/index.php?controller=authentication&back=order-opc

 

Please help.

Edited by hellomobio (see edit history)

Share this post


Link to post
Share on other sites

How do I get this tow work on Prestashop 1.5?

 

It won't show up as a module. Do I upload it the module folder or to the override folder?

 

Its not a module but a zip. Extract the files and copy o your override folder.

Share this post


Link to post
Share on other sites

Thanks hellomobio. I got it to work (homepage no longer shows up, but I assume that there is a fix for that listed in this thread).

 

More alarmingly, my filtered nav (block layered module) no longer works, so I'll keep my eyes on this thread to see if anyone else has that issue and whether there is a fix for it.

 

Really surprising that we need to hack this out of Prestashop to begin with and that by default those silly numbers are in the urls. I'm just getting going with Prestashop - tons of functionality but some of the basics aren't there.

Edited by threeopus3 (see edit history)

Share this post


Link to post
Share on other sites

Thanks hellomobio. I got it to work (homepage no longer shows up, but I assume that there is a fix for that listed in this thread).

 

More alarmingly, my filtered nav (block layered module) no longer works, so I'll keep my eyes on this thread to see if anyone else has that issue and whether there is a fix for it.

 

Really surprising that we need to hack this out of Prestashop to begin with and that by default those silly numbers are in the urls. I'm just getting going with Prestashop - tons of functionality but some of the basics aren't there.

 

make sure your .htaccess has been updated correctly. Also this will fix your block layered module problems. Clear your cache.

Edited by hellomobio (see edit history)

Share this post


Link to post
Share on other sites

make sure your .htaccess has been updated correctly. Also this will fix your block layered module problems. Clear your cache.

 

Thanks again. Developing locally now. Will try to get this working once my site is on a server.

Share this post


Link to post
Share on other sites