Page 1 of 1
edit the urls from /index.php?route=information/contact
Posted: Fri Jun 16, 2017 10:46 pm
by MugMan
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
Re: edit the urls from /index.php?route=information/contact
Posted: Fri Jun 16, 2017 11:57 pm
by thekrotek
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
Re: edit the urls from /index.php?route=information/contact
Posted: Sat Jun 17, 2017 2:03 am
by n2rtechnologies
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
Re: edit the urls from /index.php?route=information/contact
Posted: Thu Nov 30, 2017 6:31 pm
by sitedeveloper999
Will this VQMOD work on OC 3.0.2.0? And if not, do you plan on making one for that version?
Thank you!
Re: edit the urls from /index.php?route=information/contact
Posted: Fri Dec 01, 2017 3:04 am
by IP_CAM
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
---

Re: edit the urls from /index.php?route=information/contact
Posted: Fri Dec 01, 2017 3:40 am
by sitedeveloper999
"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!
Re: edit the urls from /index.php?route=information/contact
Posted: Fri Dec 01, 2017 11:05 am
by IP_CAM
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!
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>
Re: edit the urls from /index.php?route=information/contact
Posted: Fri Dec 01, 2017 11:32 am
by IP_CAM
Well, I found something, by looking for something else !
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
---