Page 1 of 1

[SOLVED]SEO path without /en-gb/product/

Posted: Mon Sep 25, 2023 12:11 pm
by harap
Hello,

I have OC v4.0.2.3 installed.
How to get the SEO path without /en-gb/product/ ?
The existing path always show up like: mysite.com/en-gb/product/my-product-name/,
I want all products listing to get their individual SEO path like this: mysite.com/my-product-name/

Please advise. Thanks in advance!

Re: SEO path without /en-gb/product/

Posted: Mon Sep 25, 2023 7:34 pm
by Hourglasss
Design > SEO url

Re: SEO path without /en-gb/product/

Posted: Mon Sep 25, 2023 11:16 pm
by harap
Hello,
Can you please advise how to set it without /en-gb/product/ in Design>SEO url ? Thanks!

Re: SEO path without /en-gb/product/

Posted: Tue Sep 26, 2023 2:01 am
by harap
If I delete en-gb or any others from SEO url list, is there any potential issues for the site running?

Re: SEO path without /en-gb/product/

Posted: Wed Sep 27, 2023 1:12 pm
by harap
I deleted the en-gb and product keyword from Design>SEO.
How come "?route=product/product&language=en-gb" always follow the product's url instead?
Such as: mysite.com/my-product?route=product/product&language=en-gb

I want simply like: mysite.com/my-product.

Please help how to make it. Thanks in advance!

Re: SEO path without /en-gb/product/

Posted: Wed Sep 27, 2023 7:32 pm
by WaxedPerfection
harap wrote:
Wed Sep 27, 2023 1:12 pm
I deleted the en-gb and product keyword from Design>SEO.
How come "?route=product/product&language=en-gb" always follow the product's url instead?
Such as: mysite.com/my-product?route=product/product&language=en-gb

I want simply like: mysite.com/my-product.

Please help how to make it. Thanks in advance!
have you set up SEO urls, and set up each product / page with its own url?

here is how to for OC.3.X i have never setup SEO iv OC4.x but im sure it will be almost the same
https://www.opencart.com/blog?blog_id=206

another good page again for OC3.x but worth a read
https://webocreation.com/25-seo-best-pr ... #gsc.tab=0

Re: SEO path without /en-gb/product/

Posted: Wed Sep 27, 2023 7:50 pm
by paulfeakins
harap wrote:
Wed Sep 27, 2023 1:12 pm
I want simply like: mysite.com/my-product.
That's how OC 3 worked, is this not possible in OC 4?

Re: SEO path without /en-gb/product/

Posted: Wed Sep 27, 2023 8:24 pm
by WaxedPerfection
paulfeakins wrote:
Wed Sep 27, 2023 7:50 pm
harap wrote:
Wed Sep 27, 2023 1:12 pm
I want simply like: mysite.com/my-product.
That's how OC 3 worked, is this not possible in OC 4?
Maybe it is / was https://webocreation.com/how-to-remove- ... #gsc.tab=0
i will let your professional eye cast over it.

Re: SEO path without /en-gb/product/

Posted: Thu Sep 28, 2023 2:29 pm
by harap
WaxedPerfection wrote:
Wed Sep 27, 2023 8:24 pm
paulfeakins wrote:
Wed Sep 27, 2023 7:50 pm
harap wrote:
Wed Sep 27, 2023 1:12 pm
I want simply like: mysite.com/my-product.
That's how OC 3 worked, is this not possible in OC 4?
Maybe it is / was https://webocreation.com/how-to-remove- ... #gsc.tab=0
i will let your professional eye cast over it.
According to: https://webocreation.com/how-to-remove- ... #gsc.tab=0
I tested by replacing with:
if (!$js) {
return str_replace('en-gb/', '', str_replace('&', '&', $url));
} else {
return str_replace('en-gb/', '',$url);
}

It is not working.

Re: SEO path without /en-gb/product/

Posted: Thu Sep 28, 2023 3:07 pm
by WaxedPerfection
Looks like Paul was right then its not possible.

Re: SEO path without /en-gb/product/

Posted: Fri Sep 29, 2023 7:56 pm
by paulfeakins
WaxedPerfection wrote:
Thu Sep 28, 2023 3:07 pm
Looks like Paul was right then its not possible.
That is a shame for people who wanted cleaner URLs but probably not going to cause any SEO problems.

Re: SEO path without /en-gb/product/

Posted: Sun Oct 08, 2023 2:15 am
by harap
SEO url simply like "mysite.com/my-product" is working on OC version 2x and OC version 3x. How come not working on OC version 4.0.2.3 ?
I want to use the same SEO url for my product url on OC 4.0.2.3 to migrate from OC 2x.
Hope this mission is possible.

Re: SEO path without /en-gb/product/

Posted: Mon Oct 09, 2023 6:24 pm
by paulfeakins
harap wrote:
Sun Oct 08, 2023 2:15 am
SEO url simply like "mysite.com/my-product" is working on OC version 2x and OC version 3x. How come not working on OC version 4.0.2.3 ?
I want to use the same SEO url for my product url on OC 4.0.2.3 to migrate from OC 2x.
Hope this mission is possible.
You could set up 301 redirects in your .htaccess.

Re: SEO path without /en-gb/product/

Posted: Thu Oct 12, 2023 4:41 am
by briggsbridget2
Hi All OC Experts,

I need some help with this as well.
I am using OC Version 4.0.2.1.
using Journal theme

I have enabled SEO URLs in System>Settings>Store>Server>Use SEO URLs
I have renamed .htaccess and RewriteEngine is ON

I do NOT have 'en-gb', 'information', 'manufacturers', 'product' or categories or any other keywords in Design>SEO URL
I have all above on my site
(Not sure if I need this and if yes, do not know what to add)

My site is not showing SEO-friendly URLs, it keeps showing me
mysite.com/my-product?route=product/product&language=en-gb

When adding 'en-gb' to Design>SEO URL it makes the SEO URL work but the page redirects back to the home page for all categories, information pages, products, and manufacturers. (but shows /en-gb/ in the path which I do not want)

I simply want clean URLs like

mysite.com/product
mysite.com/category
mysite.com/information-page
mysite.com/manufacturer

Thank you in advance for your help.

Re: SEO path without /en-gb/product/

Posted: Thu Oct 12, 2023 7:27 pm
by paulfeakins
briggsbridget2 wrote:
Thu Oct 12, 2023 4:41 am
My site is not showing SEO-friendly URLs, it keeps showing me
mysite.com/my-product?route=product/product&language=en-gb
This looks like a different problem so please start a new post.

Re: SEO path without /en-gb/product/

Posted: Tue Nov 28, 2023 9:40 am
by decomuc
briggsbridget2 wrote:
Thu Oct 12, 2023 4:41 am

My site is not showing SEO-friendly URLs, it keeps showing me
mysite.com/my-product?route=product/product&language=en-gb
You have installed Journal3.2 or a other template with sample data??
When yes, then the original seo_url entries from the standard installation are deleted.

Code: Select all

(0, 1, 'information_id', '1', 'about-us', 0),
(0, 1, 'information_id', '2', 'terms', 0),
(0, 1, 'information_id', '4', 'delivery', 0),
(0, 1, 'information_id', '3', 'privacy', 0),
(0, 1, 'language', 'en-gb', 'en-gb', -2),
(0, 1, 'route', 'information/information.info', 'info', 0),
(0, 1, 'route', 'information/information', 'information', -1),
(0, 1, 'route', 'product/product', 'product', -1),
(0, 1, 'route', 'product/category', 'catalog', -1),
(0, 1, 'route', 'product/manufacturer', 'brands', -1);
Thats the last part from the opencart.sql seo_url inserts...

After manual insert the missing parts you have no route=product/product&language=en-gb in your url, but mysite.com/en-gb/product/my-product

And then: Welcome to this thread :laugh:

Re: SEO path without /en-gb/product/

Posted: Wed Nov 29, 2023 2:52 am
by chongshengdz
route=product/product&language=en-gb
you can try to remove the above code from product controller.

Re: SEO path without /en-gb/product/

Posted: Wed Nov 29, 2023 8:28 pm
by paulfeakins
chongshengdz wrote:
Wed Nov 29, 2023 2:52 am
route=product/product&language=en-gb
you can try to remove the above code from product controller.
Sounds like a random guess that might break stuff ...

Re: SEO path without /en-gb/product/

Posted: Wed Jun 26, 2024 1:30 am
by harap
Complete SEO module helped.