Post by MugMan » Fri Jun 16, 2017 10:46 pm

Hi

Ver 2.3.0.2

Is there anyway to edit the urls from the default www.webstore.com/index.php?route=information/contact so its just www.webstore.com/contact or similar.

Thanks

Roy

New member

Posts

Joined
Sat Mar 18, 2017 3:45 pm

Post by thekrotek » Fri Jun 16, 2017 11:57 pm

By default you can't. There're lot of routes in OpenCart, which don't have a keyword, and you need to install a SEO extension with Custom URL Alias feature. Smart SEO can do this for you easily as well as many other useful things.

If you have more questions, feel free to poke me via support@thekrotek.com

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by n2rtechnologies » Sat Jun 17, 2017 2:03 am

Hi Please download the attach vqmod mode file..
<modification>
<id>Friendly URLs</id>
<version>1.0.0</version>
<vqmver>2.1.5</vqmver>
<author>N2R Technologies</author>
<file name="catalog/controller/startup/seo_url.php">
<operation>
<search position="replace"><![CDATA[$this->request->get['route'] = 'error/not_found';]]></search>
<add><![CDATA[
if ($this->request->get['_route_'] == 'contact') { $this->request->get['route'] = 'information/contact';}
else {
$this->request->get['route'] = 'error/not_found';
}
]]></add>
</operation>
<operation>
<search position="before"><![CDATA[$key == 'path']]></search>
<add><![CDATA[
} elseif (isset($data['route']) && $data['route'] == 'information/contact') { $url .= '/contact';
]]></add>
</operation>
</file>
</modification>


For support please contact http://www.n2rtechnologies.com

Attachments


Download Free OpenCart Module.
OpenCart FREE Extensions

Hire Us and Get Free Support.
Hire OpenCart Developer


User avatar

Posts

Joined
Wed Aug 10, 2016 10:51 pm

Post by sitedeveloper999 » Thu Nov 30, 2017 6:31 pm

Will this VQMOD work on OC 3.0.2.0? And if not, do you plan on making one for that version?

Thank you!

New member

Posts

Joined
Tue Aug 09, 2016 2:09 am

Post by IP_CAM » Fri Dec 01, 2017 3:04 am

Well, it would be comparably easy for a Developer, to compare the Code, ::)
but I did it for you, and found the same Code in OC2.2+ and OC 3.
Still, I cannot see, how this should work, in the lower Section at least, as shown
in the VqMod, by use of this:

Code: Select all

<search position="before"><![CDATA[$key == 'path']]></search>
adding this:

Code: Select all

} elseif (isset($data['route']) && $data['route'] ==   'information/contact') { $url .=  '/contact';
and so resulting in this:

Code: Select all

} elseif (} elseif (isset($data['route']) && $data['route'] ==   'information/contact') { $url .=  '/contact'; $key == 'path') {
so, in the bottom image, I tried to write it in a different way, but I cannot test anything... :'(
Possibly, the second 'vqmod - anchor/tag' line should be replaced in full !?
---
Ernie
---
Image

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by sitedeveloper999 » Fri Dec 01, 2017 3:40 am

"Still, I cannot see, how this should work, in the lower Section at least, as shown"

Exactly, I tried it & it made no sense. But I figured, hey, maybe I'm missing something...

Thanks for the additional info!

New member

Posts

Joined
Tue Aug 09, 2016 2:09 am

Post by IP_CAM » Fri Dec 01, 2017 11:05 am

Well, just for the laughs, you could try to install this OcMod
then clear/reset your OcMod Cache and VqMod Cache, and you'll know.
Or then, the OcMod LOG will tell you, where it screwed up!
Good Luck! :D
Ernie
---
name it: friendly_url.ocmod.xml and if you cannot install it, as it comes,
then upload it into the /system... Subdirectory, and restart your Shop,
then clean out the Cache Sections again, and re-check, what happen.

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<modification>
<name><![CDATA[Friendly Contact URL]]></name>
<code><![CDATA[friendly_contact_url]]></code>
<version><![CDATA[OC v.2.2 +]]></version>
<author><![CDATA[Ernie - IP_CAM]]></author>

<file path="catalog/controller/startup/seo_url.php">
<operation>
<search><![CDATA[$this->request->get['route'] = 'error/not_found';]]></search>
<add position="replace"><![CDATA[
	if ($this->request->get['_route_'] ==  'contact') { $this->request->get['route'] =  'information/contact';
	} else {
	$this->request->get['route'] = 'error/not_found';
	}
]]></add>
</operation>

<operation>
<search><![CDATA[} elseif ($key == 'path') {]]></search>
<add  position="replace"><![CDATA[
	} elseif (isset($data['route']) && $data['route'] ==   'information/contact') {
	$url .=  '/contact';
]]></add>
</operation>
</file>
</modification>

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by IP_CAM » Fri Dec 01, 2017 11:32 am

Well, I found something, by looking for something else ! :laugh:
It's a catalog/controller/startup/seo_url.php replacement File,
so, just rename the existing file, and upload the new one, to test it out.
Still, always clear out your cache Sections first.
Good Luck ;)
Ernie
---
SEO_URL remove common/home,information/contact ... index.php
https://www.opencart.com/index.php?rout ... n_id=32424
---

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland
Who is online

Users browsing this forum: No registered users and 40 guests