Jump to content
HA!*!*Y

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

Recommended Posts

Hi!

 

I get this message when try to install, please help :-)

 

Regards

Share this post


Link to post
Share on other sites

I get this message when try to install, please help:-) :

 

- cleanurls :

 

Unable to install overlay: loadRoutes Method in class Dispatcher is replaced.

Share this post


Link to post
Share on other sites
Hi:

i've just installed cleanurls v0.42 over prestashop 1.5.6.2 and i realized it's failing when i have two (or more) third level categories sharing the same name (i get a 404 error)

 

By example:

 

level 1       level 2              level 3

niño           camisetas         manga_larga

bebe          camisetas         manga_larga

 

If i rename  niño-->camisetas-->manga_larga to niño-->camisetas-->another_thing, it works.

 

I've put off seo and these are two colliding urls:

 



 

I'm using

Product's route:  {categories:/}{rewrite}.html

Category's route: {categories:/}{rewrite}/

 

Any idea?

 

Best regards

Share this post


Link to post
Share on other sites

I'm facing the same problem as @gehena72 above. Multiple level 2 categories with the same name result in a blank page.

 

Also I don't know if this is a prestashop limitation but urls with a trailing slash are not redirected unless the trailing slash is defined in the rewrite rules and viceversa.

Share this post


Link to post
Share on other sites

Hi!

 

I have now get it work, but when i google a product it shows the old page link, and when click to link "no page found"...

 

Please help :-(

 

And i can see in BO SEO on products, still old frindly url showing there??

 

So my new links not seems to be read in google..

Share this post


Link to post
Share on other sites

I'm using Prestashop 1.5.6.2

 

I'm trying to input a static link (directly type in the link to the cms page eg. <a href="http://www.example.com/info/aboutus"> ) to a CMS page from my category page but I am getting a ?controller=404 error appended to the end of the URL. Copying and pasting the URL directly into the search bar brings the correct page, however clicking the link from another page doesn't. 

 

CMS links work fine when referenced from the footer or header modules. So I'm guessing it's something I don't understand about redirecting etc.

 

How do I add a static link to a CMS page from the tpl files?

Share this post


Link to post
Share on other sites

I have an 500 error after trying this, now i cannot delete module clean url, how to get my shop back in order?

Share this post


Link to post
Share on other sites

Any luck to get it working on 1.6?

 

+1 I would also like to know if it works with 1.6?

Share this post


Link to post
Share on other sites

if use Route to products: {categories:/}{rewrite}{-:ean13}.html , url is like:

 

www.mysite.com/root/home/accessories-ipod/ecouteurs-a-isolation-sonore-shure-se210-blanc.html?product_rewrite=ecouteurs-a-isolation-sonore-shure-se210-blanc

 

if use only {rewrite}{-:ean13}.html url is ok ... what is the point ?

Hi! I had the same problem. Try to disable "Automatically redirect to Canonical url"   in Back Office > Preferences > SEO & URLs. In my case it was a solution.

Share this post


Link to post
Share on other sites

i'm getting this error when trying to install v042

 

- cleanurls :
Unable to install override: directory (/home/below10/public_html/override/classes) not writable

 

i'm using v 1.5.6.1.

 

Its probably some file permission errors, but i've set the respective directories and files to the maximum permission.

 

Any help would be greatly appreciated!

Share this post


Link to post
Share on other sites

Hi! Super idea, but there is a nuance. I shop there is a long Ia would not want to remove from the product ID, but ready to do it only categories. Is it possible to remove only the ID, in category names?

Share this post


Link to post
Share on other sites

I installed removeURLid1.5_v0.22 over Prestashop 1.5.6.2 and it works perfectly.

 

Thanks for your post.

Edited by albertg (see edit history)

Share this post


Link to post
Share on other sites
Hi,

 

I installed removeURLid1.5_v0.22.zip and works well, but in my layeredblock if i click in any option, the system return to home page.

 

In SEO and URLs in "Route to Category with attribute selected_filter for the module block layered" i added {rewrite}/filter{selected_filters}

 

Any help would be appreciated.

 

 

My url shop is www.zapaline.com

 

Thanks

Share this post


Link to post
Share on other sites

How can i remove the parent category from category url?

When i use the cleanurls_v0.4.2.zip it work good but it also requires the 'categories'.

 

Now it's:

www.mysite.com/category/subcat

I want:

www.mysite.com/subcat

 

How can i do this?

Please help!

Share this post


Link to post
Share on other sites

Finally all works fine, I had added a base href in footer.tpl, this caused the error.

 

Thanks for all. Great module, I recommend removeURLid1.5_v0.22, I have tested in 1.5.6.2

Share this post


Link to post
Share on other sites

How can i remove the parent category from subcategory url?


When i use the cleanurls_v0.4.2.zip it work good but it also requires the 'categories'.


 


Now it's:


www.mysite.com/category/subcat


I want:


www.mysite.com/subcat


 


How can i do this?


Please help!


Share this post


Link to post
Share on other sites
I installed the 0.42 version on PrestaShop 1.6.0.6 and it works fine until I create a new category, then I get the following error: 

 

Warning: trim() expects parameter 1 to be string, array given in /Applications/MAMP/htdocs/prestashop/classes/Tools.php on line 1140

 

Someone has any idea what's wrong.

 

Thanks!

Edited by JavierSLM (see edit history)

Share this post


Link to post
Share on other sites

 

How can i remove the parent category from subcategory url?

When i use the cleanurls_v0.4.2.zip it work good but it also requires the 'categories'.

 

Now it's:

www.mysite.com/category/subcat

I want:

www.mysite.com/subcat

 

How can i do this?

Please help!

 

 

what prestashop version?

Share this post


Link to post
Share on other sites

what prestashop version?

I have PrestaShop 1.5.5.0

 

I think by default in prestashop it is like i want: www.mysite.com/subcat1 but when I install this module, it requires 'categories' and then keeps showing the parent category.

 

Where do i edit this module?

In /modules/cleanurl or /override or theme/modules/cleanurl ?

 

Thank you!

  • Like 1

Share this post


Link to post
Share on other sites

I have PrestaShop 1.5.5.0

 

I think by default in prestashop it is like i want: www.mysite.com/subcat1 but when I install this module, it requires 'categories' and then keeps showing the parent category.

 

Where do i edit this module?

In /modules/cleanurl or /override or theme/modules/cleanurl ?

 

Thank you!

 

I installed on 1.6

 

when you acces a product, and you don't want the category to show.. back in the BO you should do this:

 

Route to product:       {rewrite}.html

Route to category:     {categories:/}{rewrite}/

 

When you acces only the category(not the product itself), you will see the category, as it is mandatory with this module.

 

 

-----------------------

I also have a problem / question

 

So i have installed 1.6, installed the cleanurl 0.42

 

In my SEO & URL I set up like this:

 

Route to product:       {rewrite}.html

Route to category:     {categories:/}{rewrite}/

Route to category with attribute.. :   {rewrite}/filter{selected_filters}/

 

it works fine, i don't have the ID's in my link. But the next thing i want to do is to delete the .html from products

 

Route to product:       {rewrite}

 

When i do this, the problem is that my homepage isn't shown any more, i get a " TThere is 1 error

Product not found"

 

Everything else works.

 

PS: If for example I add a / after {rewrite}, or a . or anything, the homepage starts working, but a i have the / and i don't want that, because it makes the link different and gives me a 404 error

 

Anyone experimented this?

Thanks!

Edited by danr87 (see edit history)

Share this post


Link to post
Share on other sites

 

I installed the 0.42 version on PrestaShop 1.6.0.6 and it works fine until I create a new category, then I get the following error: 
 
Warning: trim() expects parameter 1 to be string, array given in /Applications/MAMP/htdocs/prestashop/classes/Tools.php on line 1140
 
Someone has any idea what's wrong.
 
Thanks!

 

I installed also on 1.6

 

I installed cleanurl

 

it works

 

I made a new category to test what you said, and it works. No errors

 

For example, I have set in BO > SEO & URL like this

 

Route to product:       {rewrite}.html

Route to category:     {categories}/{rewrite}

Route to category with attribute.. :   {rewrite}{/:selected_filters}.html

Share this post


Link to post
Share on other sites

I can't get the logo (and yes I tried the fix that is earlier in the post) but there are other image files that do not work as well as some links.  I need the entire site to be SSL compliant or my bank won't let me take credit cards.  So any help would be greatly appreciated.  I have been working on this (off and on) for three days plus!

 

Here are my site details:

 

https://capvapor.com

 

Server information

Server information: Linux #1 SMP Mon Feb 17 21:00:14 MSK 2014 x86_64

Server software version: Apache

PHP version: 5.4.27

Memory limit: 256M

Max execution time: 300

Database information

MySQL version: 5.6.16

MySQL engine: InnoDB

Tables prefix: ps_

Store information

PrestaShop version: 1.5.6.2

Shop URL: https://capvapor.com/

Current theme in use: default

Mail configuration

Mail method: You are using the PHP mail function.

Thanks in Advance!!!

-James Stepp

post-710665-0-89933100-1398462959_thumb.jpg

Edited by jstepp28 (see edit history)

Share this post


Link to post
Share on other sites

Hello

 

I have found this module very usefull for products and categories.

 

Is there a way to add categories and subcategories to CMS links?

Share this post


Link to post
Share on other sites

I installed also on 1.6

 

I installed cleanurl

 

it works

 

I made a new category to test what you said, and it works. No errors

 

For example, I have set in BO > SEO & URL like this

 

Route to product:       {rewrite}.html

Route to category with attribute.. :   {rewrite}{/:selected_filters}.html

 

 

Hi,

I have installed this on 1.6.0.6 and it seems to work almost perfect.

 

The only problem I have is the double slash in categories (http://www.mysite.co//category/product)

I am using this: Route to category:     {categories}/{rewrite}

If I use anything else, the categories links do not work anymore.

Can anyone help me romove one of the slashes?

Thanks.

Edited by coloranti naturali (see edit history)

Share this post


Link to post
Share on other sites

I have one problem with the friendly URL.

 

I'd tryed a lot of things in order to remove the ID's with guidance of this topic. I did a lot of things, combinations of the attached files en manual tweaks in the files. Never worked it as it schould. By the many trail & erros i came to the conclusion that i could use only the cleanurls_v0.42. 

So i removed all files that where put in the override directory and cleanurl module. Then i started over again by installing the 0.42 cleanurl module. This did the trick and i got no errors, beside some duplicate content, but the id's were gone and all worked well.

 

Ones i got to try further i noticed that the category/subcategory was not working.

Let me explain:

 

When i click a produck the url looks:

mysite/product =ok

 

When i click a category the url looks:

mysite/category =ok

 

A subcategory looks:

mysite/category/subcategory   but.... it shows the same content as mysite/category

 

As i manually remove the category in the url then the subcategory will show

mysite/subcategory =ok

 

My question is:

What can i do to fix this?

 

Both options are good for me

mysite/category/subcategory or mysite/subcategory

 

 

These are the conditions:

Prestashop 1.6.0.6

Module cleanurls_v0.42

 

In backoffice SEO & URL:

Procuct: {rewrite}.html

Category: {categories:/}{rewrite}/

Category Atrribute: {rewrite}/{selected_filters}

 

Tried many different settings with SEO & URL routes

Many times cleared the cache with module Empty cache v1.0.1.0 - by Samdha

 

Dispatcher.php

Link.php

 

My testsite is www.renekuenen.nl/webshop

Edited by René Kuenen (see edit history)
  • Like 1

Share this post


Link to post
Share on other sites

Solved my problem!

 

My steps to get it to work.

 

  • Delete module clean url 0.42 in BO
  • delete files as instructed in the first post
  • Clear cache with module Empty Cache 1.0.1.0
  • Press F5 in browser.

Now i'ts back in standard settings.

Then i re-installed the clean url module 0.42, empty the cache an it all worked again.

I don't know what the problem caused.

 

My url looks now like: mysite/category/subcategory-1/subcategory-2/etc....

 

When i click a product in lets say subcategory-2, the links shows:

mysite/category/product.html

 

A little strange, but no problem for me.

 

Before i did this i discovered that the blocklayerd module was not working right. It show the features u can choose from, but when u want to make a selection it didn't respond. This problem was also solved after the clean url re-install.

 

One happy user right now  :D

 

 

Share this post


Link to post
Share on other sites

Hi,

I have installed this on 1.6.0.6 and it seems to work almost perfect.

 

The only problem I have is the double slash in categories (http://www.mysite.co//category/product)

I am using this: Route to category:     {categories}/{rewrite}

If I use anything else, the categories links do not work anymore.

Can anyone help me romove one of the slashes?

Thanks.

Hi

 

Like this, it should work

 

 

Route to category:     {categories:/}{rewrite}/

 

I posted twice, and in my first post I edited, but forgot to edit in my second post...

 

I'll put a print-screen with how I have it right now.. Don't worry if the titles are in romanian :) it's the same order

 

2aiemnr.png

  • Like 1

Share this post


Link to post
Share on other sites
Warning: trim() expects parameter 1 to be string, array given in /Applications/MAMP/htdocs/prestashop/classes/Tools.php on line 1140

 

try change line 1140

 

if (!is_string($str))

    return $str;

Share this post


Link to post
Share on other sites

help me , removeURLid prestashop 1.6

Read this thread from page 1 and you will learn how to remove the id.

 

Short version:

 

Install latest CleaURL module

 

With it installed, you have access to modify SEO & URL section from presta.

 

And when you go to this section, you can set up something like this picture:

2aiemnr.png

 

 

Good luck

Share this post


Link to post
Share on other sites

If you delete that dash from settings, you will have more problems with your url's... for example your homepage will give a 404

 

And to solve this, you probably should alter the .htaccess which is pretty complicated given the fact that you already altered your URL with this module.

Edited by danr87 (see edit history)
  • Like 1

Share this post


Link to post
Share on other sites

p

 

please help me:  remove / of url

www.iroption.com/shop/women/

please help me...

Share this post


Link to post
Share on other sites

Hi

 

How to change:

 

/category/subcategory/

 

to just

 

/subcategory/

 

in Admin panel I have:

 

for product; {category:/}{rewrite}.html

for category; {categories:/}{rewrite}/    <<< need change this "categories" to "category" but i cant.

 

any other solution?

Edited by Loki666 (see edit history)
  • Like 1

Share this post


Link to post
Share on other sites

Hey, 


i'd need a little help   :)


 


using prestashop 1.6.0.6 i'd like to achieve this kind of URLS


 


categories:


 


www.nameoftheshop.com/granma-category/mother-category/child-category


and


www.nameoftheshop.com/granma-category/mother-category/child-category/


 


products:


www.nameoftheshop.com/granma-category/mother-category/child-category/name-of-the-product


and


www.nameoftheshop.com/granma-category/mother-category/child-category/name-of-the-product/


 


i've tried to use cleanurl module, and got rid of the id for both categories and products, anyway one of them still has to have a ".html" at the end, otherwise if i use this configuration

 

categories:   {categories:/}{rewrite}

products:   {categories:/}{rewrite}

 

the site just won't work, showing error message on each page  :(

 

thank you in advance

Share this post


Link to post
Share on other sites

Hi, after install this module (0.42) on Prestashop 1.6.0.6 Multistore. my home page and contact or sitemap show :

"Ta strona nie istnieje. (This site not exist)

Product sites, category and cms sites works fine (without ID).

Any idea what is wrong?

 

Update: 09.06.2014 Settings I changed: 

286smkw.jpg

Edited by nekorulez (see edit history)

Share this post


Link to post
Share on other sites

I can't update "SEO&URLS settings".

 

Error: Keyword "{id}" required for route "category_rule" (rule: "{rewrite}")

Share this post


Link to post
Share on other sites

Hi

 

How to change:

 

/category/subcategory/

 

to just

 

/subcategory/

 

in Admin panel I have:

 

for product; {category:/}{rewrite}.html

for category; {categories:/}{rewrite}/    <<< need change this "categories" to "category" but i cant.

 

any other solution?

 

Does anybody have a solution for this?  Much appreciated, thanks!

Edited by joshua_lee (see edit history)
  • Like 1

Share this post


Link to post
Share on other sites

try with 

   categories: {category:/}{rewrite}/

 

This will produce the following error:

"Keyword "{categories}" required for route "category_rule" (rule: "{category:/}{rewrite}/")"

  • Like 1

Share this post


Link to post
Share on other sites

hi, how remove id from page? prestashop 1.6

 

and if it is possible, and from the product name? 
 
Advance grace

Share this post


Link to post
Share on other sites

try with 

   categories: {category:/}{rewrite}/

error..

 

Keyword "{categories}" required for route "category_rule" (rule: "{category:/}{rewrite}/")
  • Like 1

Share this post


Link to post
Share on other sites

Tested in 1.6.0.7

 

Upgraded Shop to new Version.

 

fixed the Part >>>>http://www.prestashop.com/forums/topic/204935-override-friendly-urls-without-id-number-for-v15/page-22?do=findComment&comment=1664079

 

Reactivate the 0.42 version of Clean Urls ...

 

then Go to Preferences > SEO & URL´s.... Try to make Changes like this

hxe5oc8j.jpg

 

Get Error Keyword "{id}" required for route Bla Bla...

 

Ok whats wrong....

You can try to go here

ae2paoh6.jpg

 

and make sure your overrides not are deactivated.

 

I activate it and then get nice Clean Url´s for Prestashop 1.6.0.7 

Thx 4 this great Module Sorry for the bad English ;)

 

 

Greets Magicalname

 

 

Update: Same in 1.6.0.8

Edited by Magicalname (see edit history)
  • Like 3

Share this post


Link to post
Share on other sites

Thanks,
tried to establish cleanurls_v0.42.zip on prestashop_1.6 the version, now such mistake, who can faced?

 

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting T_FUNCTION in /var/www/s/data/www/slow/override/classes/Dispatcher.php on line 26

Share this post


Link to post
Share on other sites

Once again I thank, everything earned, but there is обна a problem

it is necessary to me that pages of a site (Page CMS) were a look: site.com/page but if I establish the rule: {rewrite} instead of info/{rewrite} - all as is necessary, office pages of a site only don't open: such as contacts, discounts, and similar

Share this post


Link to post
Share on other sites

removeURLid_v0.22.zip does not work for me. I am using 1.5.6.2. This is the error message. I am in local installation (wamp).

 

 
Notice: Undefined index: DispatcherCore in [windows_local_paht]\prestashop\classes\Autoload.php on line 115
 
Warning: require([windows_local_paht]\prestashop): failed to open stream: Permission denied in [windows_local_paht]\prestashop\classes\Autoload.php on line 115
 
Fatal error: require(): Failed opening required '[windows_local_paht]\prestashop/' (include_path='.;C:\php\pear') in [windows_local_paht]\prestashop\classes\Autoload.php on line 115

Share this post


Link to post
Share on other sites

Does anybody have a solution for this?  Much appreciated, thanks!

 

Copy files from this post #54 , edit override/classes/Dispatcher.php 

'category_rule' => array(
			'controller' =>	'category',
			'rule' =>		'{category:/}{rewrite}/',
			'keywords' => array(
				'id' =>				array('regexp' => '[0-9]+'),
				'category' =>		array('regexp' => '[_a-zA-Z0-9-\pL]*'),
				'categories' =>		array('regexp' => '[/_a-zA-Z0-9-\pL]*'),
				'rewrite' =>		array('regexp' => '[_a-zA-Z0-9-\pL]*', 'param' => 'category_rewrite'),
				'meta_keywords' =>	array('regexp' => '[_a-zA-Z0-9-\pL]*'),
				'meta_title' =>		array('regexp' => '[_a-zA-Z0-9-\pL]*'),
				'parent_categories' =>		array('regexp' => '[/_a-zA-Z0-9-\pL]*'),
				),
			
		), 

and then change fields in SEO&url to "category".

  • Like 1

Share this post


Link to post
Share on other sites

Hy and Hello,

Does anybody know how to remove the ID out of the URL Preview in Product-Tab SEO???

Share this post


Link to post
Share on other sites
Hi, 

Question modulo cleanurls_v0.42.zip! 

how to remove a products: ". html"? 

I want to get the url without. "html"!

Edited by val22 (see edit history)

Share this post


Link to post
Share on other sites

Tested in 1.6.0.7

 

Upgraded Shop to new Version.

 

fixed the Part >>>>http://www.prestashop.com/forums/topic/204935-override-friendly-urls-without-id-number-for-v15/page-22?do=findComment&comment=1664079

 

Reactivate the 0.42 version of Clean Urls ...

 

then Go to Preferences > SEO & URL´s.... Try to make Changes like this

hxe5oc8j.jpg

 

Get Error Keyword "{id}" required for route Bla Bla...

 

Ok whats wrong....

You can try to go here

ae2paoh6.jpg

 

and make sure your overrides not are deactivated.

 

I activate it and then get nice Clean Url´s for Prestashop 1.6.0.7 

Thx 4 this great Module Sorry for the bad English ;)

 

 

Greets Magicalname

 

 

Update: Same in 1.6.0.8

thanks alot again . Its work with 1.6.0.8 super :) :) :) :)

Share this post


Link to post
Share on other sites

Thank you so much! I can also confirm, runs great with 1.6.0.8

Share this post


Link to post
Share on other sites

Thanks Magicalname , Thank you so much! I also confirm, runs great with PS v1.6.0.8 :) :) :)

 

Do still have to use .html at the end of the url?

Does it work ok with multistore?

 

I tried to install, all pages redirect to 404 page not found. 

 

Can you also share Dispatcher.php ?

 

edit: i managed to fix the 404 pages by setting : 

Route to products: {category:/}{rewrite}.html [.html prefix must be there]

Route to category: {categories:/}{rewrite}/

Edited by HaCos (see edit history)

Share this post


Link to post
Share on other sites

Hi!

I apologize but did not find the answer in the topic.

When using cleanurls 0.42 and smartblog (http://www.prestashop.com/forums/topic/317230-prestashop-blog-module/) I gives a 404 error when sult category blog pages or posts.
Do not tell me how to solve this issue?

 

Prestashop 1.6.0.8

 

UPD:

 

I solve issue.

Go to smartblog module settings an for "Use .html with Friendly Url" put "Disable"

Edited by wizips (see edit history)

Share this post


Link to post
Share on other sites

hi

version : presta shop 1.6.0.6

modules : cleanurls_v0.42.zip

---------------------------

please help me

Route to category : {categories:/}{rewrite}/

link now : www.iroption.com/shop/option/option-207/

change to link favorite : www.iroption.com/shop/option-207/

and please help me remove slash from end url link

Share this post


Link to post
Share on other sites

Hi,

 

H have installed clean URL module, I can navigate through my categories but can't anymore access to my products lists from the categories. Do you know how I could solve it?

Edited by consochris (see edit history)

Share this post


Link to post
Share on other sites

Hi,

 

This i have installed clean URL, I can navigate through my categories but can't anymore access to my products lists from the categories. Do you know how I could solve it?

Try to add .html at the end of Route to products url schema & a / at the end of Route to category url schema

Share this post


Link to post
Share on other sites

Try to add .html at the end of Route to products url schema & a / at the end of Route to category url schema

 

Thanks HaCos, I have already done so but it does not work.

here is my configuration:

 

route to products: {category:/}{rewrite}.html

route to category; {categories:/}{rewrite}/

 

Do you see another solution?

Thanks!

Share this post


Link to post
Share on other sites

Thanks HaCos, I have already done so but it does not work.

here is my configuration:

 

route to products: {category:/}{rewrite}.html

route to category; {categories:/}{rewrite}/

 

Do you see another solution?

Thanks!

Which module have you installed? I used this one https://github.com/Ha99y/PrestaShop-modules-CleanURLs

It didint worked straight away because some staff were cahed. What i did was to disable the module, disable Frienly URL from Backend, delete yourstore/cache/class_index.php and then renable module, Frienly URL and check your store .

Share this post


Link to post
Share on other sites

I've proceed to previous module unsintallation and i have just installed the module from your github link.

It is still the same, I can browse categories with very good URL rewriting but can't access to products.

Do you use 1.6 too?

Share this post


Link to post
Share on other sites

Ok I just discovered why. I have sub-categories that have the same name into different categories.

How can I resolve this without having to change all sub-categories naming?

Share this post


Link to post
Share on other sites
I installed the 0.42 version on PrestaShop 1.6.0.6 and it works fine until  following error: 

 

Warning: trim() expects parameter 1 to be string, array given in /Applications/MAMP/htdocs/prestashop/classes/Tools.php on line 1140

 

Someone has any idea what's wrong.

 

Thanks!

Share this post


Link to post
Share on other sites
I use this module for quite a while and am very satisfied. I only have a problem when exporting the product URLs with an export module. Although the friendly URLs will be exported, but look different. 

 

Like this: www. mydomain.com/de/product-name.html

instead of: www. mydomain.com/category1/category2/product-name.html

 

The funny thing is, these URLs even works. In the browser address line then is:

www. mydomain.com/de/product-name.html?product_rewrite=product-name

 

Does anyone have an idea where exactly the problem might be? 

greeting 

Martin
Edited by xMartin (see edit history)

Share this post


Link to post
Share on other sites

Hi!
Found that using the same rewrite (alias) for product with {categories:/}{id}-{rewrite}{-:ean13}.html, will only open the first product with this alias, as the search is on rewrite.

 

Find in: Prestashop 1.6 with Cleanurls_v0.42

Example:
We have in category (same category):
http://xyz.com/cat_a/cat_b/1112-pants.html
http://xyz.com/cat_a/cat_b/1113-pants.html
http://xyz.com/cat_a/cat_b/1114-pants.html
http://xyz.com/cat_a/cat_b/1115-pants.html
-----
When you click on any of these links will open the first page Item http://xyz.com/cat_a/cat_b/1112-pants.html.
 
To solve the problem, you should edit /override/controllers/front/ProductController.php
Replace
            $sql = 'SELECT `id_product`
                FROM `'._DB_PREFIX_.'product_lang`
                WHERE `link_rewrite` = \''.$rewrite_url.'\' AND `id_lang` = '. Context::getContext()->language->id;
With
            $id_product = (int)Tools::getValue('id_product');
            $sql = 'SELECT `id_product`
                FROM `'._DB_PREFIX_.'product_lang`
                WHERE `id_product` = \''.$id_product.'\' AND `link_rewrite` = \''.$rewrite_url.'\' AND `id_lang` = '. Context::getContext()->language->id;

Share this post


Link to post
Share on other sites

I testing cleanurls_0.4.2 in Prestashop 1.6.0.9, and it works fine... 

  • Like 1

Share this post


Link to post
Share on other sites

Hello!

How to solve duplicated url's with use this module?

 

I mean url which prestashop leaving after product moving to another category or another url modifying, like deleted category from product link.

 

First problem is detect this url.

Second problem is fix not properly working redirect.

 

Maybe someone solve this?

 

PS ver. 1.5.4.0

Share this post


Link to post
Share on other sites

amazing ! the same code is available at codecanyon (paid version) but that's the same code !

The author says code is compatible with PS 1.6 but there are some issues with categories and complex architectures - hope a new release is coming soon

 

JP

Share this post


Link to post
Share on other sites

Only the page of categories is blank, why?

 

The version is 1.5.6.2

 

Regards

Share this post


Link to post
Share on other sites

I have Clean URLs working perfectly following the advice in this thread, however, is it possible to have the category URL path consist of only the sub-category without the parent category path?

Edited by ASP (see edit history)
  • Like 1

Share this post


Link to post
Share on other sites

I need to have my category URL paths consist of only the destination category without the preceding parent categories shown in the URL path.

The Prestashop live demo site shows this is possible (see attached screenshot with URL path shown for subcategory).
post-823043-0-86623300-1409561571_thumb.jpg

I'd like my URLs to be constructed like this, but without the ID prefix. I've therefore installed the Clean URLs module and have it working perfectly, but now have the following URL:

domain.com/ladies/t-shirts-tops/ladies-t-shirts/

 

Instead of the required:

domain.com/ladies-t-shirts

 

Any help or advice would be greatly appreciated!. I'm desperate to go live, but really need these shorter URLs without duplicating categories and adding them to Home.

 
post-823043-0-50716500-1409043684_thumb.jpg

Share this post


Link to post
Share on other sites

Hello! I've installed the last version of this module in my Prestashop 1.6.0.9 and the urls of the products are ok, but now i cant enter in the dashboard of prestashop. The page never finishes loading.

 

Any solution?

Edited by jcarlosc (see edit history)

Share this post


Link to post
Share on other sites

Hi, if you want to see the entire route to subcategory you have to add a new keyword to category route named: categories

 

Modifications to make:

In override/classes/dispatcher in: public $default_routes

 

attachicon.gifdispatcher_override.jpg

 

and in override/classes/link in: public function getCategoryLink

 

attachicon.giflinkcore_override.jpg

 

Hope it helps you.

I know this is an old post but i need this hack too...

 

Can some1 confirm this works in prestashop 1.6 too? I tried and it did not work, categories urls got broken. Not sure is beacuse of the php codes or because of the route i used in SEO settings in admin (which was just {categories}{rewrite})

 

Thanks

Share this post


Link to post
Share on other sites

Hi, if you want to see the entire route to subcategory you have to add a new keyword to category route named: categories

 

Modifications to make:

In override/classes/dispatcher in: public $default_routes

 

attachicon.gifdispatcher_override.jpg

 

and in override/classes/link in: public function getCategoryLink

 

attachicon.giflinkcore_override.jpg

 

Hope it helps you.

 

I want the opposite of the above scenario and just require the subcategory without the parent route shown in the URL (as per the Prestashop live demo):

post-823043-0-86623300-1409561571_thumb. 

 

I'd like my URLs to be constructed like this, but without the ID prefix. I installed the Clean URLs module and have it working perfectly, but now have the following URL:

domain.com/ladies/t-shirts-tops/ladies-t-shirts/

 

Instead of the required:

domain.com/ladies-t-shirts

 

Any help or advice would be greatly appreciated!. I'm desperate to go live, but really need these shorter URLs without duplicating categories and adding them to Home.

Share this post


Link to post
Share on other sites

Hey, Module works with 1.6 but i can't edit categories in backend anymore ... anyone else have this issue, a solution?

Share this post


Link to post
Share on other sites

Copy files from this post #54 , edit override/classes/Dispatcher.php 

'category_rule' => array(
			'controller' =>	'category',
			'rule' =>		'{category:/}{rewrite}/',
			'keywords' => array(
				'id' =>				array('regexp' => '[0-9]+'),
				'category' =>		array('regexp' => '[_a-zA-Z0-9-\pL]*'),
				'categories' =>		array('regexp' => '[/_a-zA-Z0-9-\pL]*'),
				'rewrite' =>		array('regexp' => '[_a-zA-Z0-9-\pL]*', 'param' => 'category_rewrite'),
				'meta_keywords' =>	array('regexp' => '[_a-zA-Z0-9-\pL]*'),
				'meta_title' =>		array('regexp' => '[_a-zA-Z0-9-\pL]*'),
				'parent_categories' =>		array('regexp' => '[/_a-zA-Z0-9-\pL]*'),
				),
			
		), 

and then change fields in SEO&url to "category".

 

This solved my problem!  :D

  • Like 1

Share this post


Link to post
Share on other sites

Hey!

 

Thank you for the awesome module!

 

I have a little problem though. PS version: 1.5.6.0

 

Everything works fine, except the main categories, for example:

test.com/cars/ford/ford-fiesta.html : works

test.com/cars/ford/ : works

test.com/cars/ : page not exist error (but it should work, regarding to it's SEO friendly URL)

 

my config on SEO & URLs for product and categories:

Products: {category:/}{rewrite}.html

Categories: {categories:/}{rewrite}/

 

I played with these settings, but I cannot sort it out.

 

Can somebody advise?

It would be much appreciated.

 

Regards:

tUb26

Edited by tUb26 (see edit history)

Share this post


Link to post
Share on other sites

Hi. I am trying to get rid of the parent part in category URLs (what I want is to make all my categories URLs to look like example.com/categories/mycategory where mycategory is the category's "URL rewritten" field), no luck so far. I can see ASP reporting the Loki666's suggestion having had solved this problem but I doubt it's a good idea to use ~1.5-years-old files from the post #54 with the latest PrestaShop 1.6.9 and CleanURLs 0.42.1.

Share this post


Link to post
Share on other sites

I am using prestashop 1.5.6.2

 

Same case with me. After install clean url v0.42 module, all category page and sub category page got error. 

 

Route to category automatically change to {categories}{rewrite}.html. I remove {categories} the error message show Keyword "{categories}" required for route "category_rule" (rule: "{rewrite}.html")

 

How to make all category page working?

 

Will it possible to remove category on the url, change from http://shoppingononline.com/Wedding-Dresses/Wedding-Gowns/red-wedding-gown-ruffle-backless.html to http://shoppingononline.com/red-wedding-gown-ruffle-backless.html?

post-852368-0-91733800-1413023707_thumb.jpg

post-852368-0-15137100-1413023782_thumb.jpg

post-852368-0-37380000-1413024017_thumb.jpg

Edited by vivianlwy (see edit history)
  • Like 1

Share this post


Link to post
Share on other sites

Hello

 

I'am using Prestashop 1.6.0.8 and this awesome Module Clean URLs v0.42. After I activated SSL for my shop, I have errors in Chrome: 

 

The page at 'https://www.mydomain.com/product/' was loaded over HTTPS, but is submitting data to an insecure location at 'http://www.mydomain.com/product/?categories_rewrite=&noredirect=1': this content should also be submitted over HTTPS.

 

comes this error from Clean URLs?

  • Like 1

Share this post


Link to post
Share on other sites