Post by oberheimer » Mon Jul 08, 2024 10:23 pm

Is it possible to strip parent categories from url like this plugin?
I need it for opencart 4
https://www.opencart.com/index.php?rout ... n_id=27744
They have not updated their version to opencart 4

New member

Posts

Joined
Fri Jun 22, 2012 5:28 am

Post by JNeuhoff » Mon Jul 08, 2024 11:29 pm

This extension doesn't make any sense, there is already a link-canonical generated using the lowest-level category name.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by oberheimer » Tue Jul 16, 2024 3:04 pm

It makes totally sense to me. I don't want 4-5 subcategories.
Here is an example for categories
example.com/butik/se/catalog/kryddor/curry
and for products it's even longer
example.com/butik/se/product/kryddor/curry/gul-curry

Butik is shop in Swedish so that's where the shop is then se for sweden
Out customers think it's spammy with that url

New member

Posts

Joined
Fri Jun 22, 2012 5:28 am

Post by halfhope » Tue Jul 16, 2024 4:15 pm

Hi!

Try to find SeoPro controller for this purposes. It's remove all page duplicates and have url cache.

My FREE extensions in marketplace. [ security | flexibility | speedup ]


User avatar
Active Member

Posts

Joined
Tue Dec 10, 2013 9:44 pm
Location - San Diego

Post by oberheimer » Thu Jul 18, 2024 4:29 pm

halfhope wrote:
Tue Jul 16, 2024 4:15 pm
Hi!

Try to find SeoPro controller for this purposes. It's remove all page duplicates and have url cache.
I can't find that plugin.

New member

Posts

Joined
Fri Jun 22, 2012 5:28 am

Post by oberheimer » Tue Aug 20, 2024 8:18 pm

Does anyone know how I can fix this?
I don't mind having the /en/ for English and other languages that I use

New member

Posts

Joined
Fri Jun 22, 2012 5:28 am

Post by halfhope » Wed Aug 21, 2024 7:30 am

Hi!

If you want, I can make fix for catalog/controller/startup/seo_url.php, which solve this problem for a cup of coffee.

1. It's not possible to make ocmod, because ocmod deprecated in 4.x
2. It's not possible to make extension with custom event because seo_url it's pre_action.

My FREE extensions in marketplace. [ security | flexibility | speedup ]


User avatar
Active Member

Posts

Joined
Tue Dec 10, 2013 9:44 pm
Location - San Diego

Post by halfhope » Thu Aug 22, 2024 8:47 am

Code: Select all

$is_product = false;

foreach ($parts as $part) {
	[$key, $value] = explode('=', $part);

	if ($key === 'product_id') {
		$is_product = true;
	}

	if ($is_product && $key === 'path') {
		$result = false;
		unset($query['path']);
	} else {
		$result = $this->model_design_seo_url->getSeoUrlByKeyValue((string)$key, (string)$value);
	}

	if ($result) {
		$paths[] = $result;

		unset($query[$key]);
	}
}

My FREE extensions in marketplace. [ security | flexibility | speedup ]


User avatar
Active Member

Posts

Joined
Tue Dec 10, 2013 9:44 pm
Location - San Diego

Post by oberheimer » Thu Oct 03, 2024 7:24 pm

Thanks, I will try it a bit later today.

New member

Posts

Joined
Fri Jun 22, 2012 5:28 am

Post by oberheimer » Fri Oct 04, 2024 3:18 pm

Is it possible to remove /catalog/ and /product/ and only show the last category you are in and any product?
For example (product) https://www.store.com/eng/dried-strawberries/
and (category) https://www.store.com/eng/whole-coffee-beans/
I could pay for it.

New member

Posts

Joined
Fri Jun 22, 2012 5:28 am
Who is online

Users browsing this forum: No registered users and 2 guests