Skip to content

Instantly share code, notes, and snippets.

@yasinkuyu
Last active August 5, 2020 23:40
Show Gist options
  • Save yasinkuyu/af8c0c1ed8634d2e8084bf55db83cfd0 to your computer and use it in GitHub Desktop.
Save yasinkuyu/af8c0c1ed8634d2e8084bf55db83cfd0 to your computer and use it in GitHub Desktop.
Opencart Remove Domain (ocmod) 2.0.x
<?xml version="1.0" encoding="utf-8"?>
<modification>
<name>insya_removedomain</name>
<code>insya_removedomain</code>
<description>Linklerden domaini silmek için eklendi. (@yasinkuyu)</description>
<version>1.0</version>
<author>[email protected]</author>
<link>http://insya.com</link>
<file path="system/library/url.php">
<operation>
<search position="before"><![CDATA[
public function link($route, $args = '', $secure = false) {
]]></search>
<add><![CDATA[
// SEO nedeniyle linklerden domaini silmek için eklendi. (@yasinkuyu)
// 3D ödeme sayfaları kontrol edilecek.
public function link2($route, $args = '', $secure = false) {
if (!$secure) {
$url = $this->domain;
} else {
$url = $this->ssl;
}
$url .= 'index.php?route=' . $route;
if ($args) {
$url .= str_replace('&', '&amp;', '&' . ltrim($args, '&'));
}
foreach ($this->rewrite as $rewrite) {
$url = $rewrite->rewrite($url);
}
if ( $secure ) {
$url = str_replace(HTTPS_SERVER, "/", $url);
} else {
$url = str_replace(HTTP_SERVER, "/", $url);
}
return $url;
}
]]></add>
</operation>
</file>
<file path="catalog/controller/common/header.php">
<operation>
<search position="replace"><![CDATA[$this->url->link('product/manufacturer]]></search>
<add><![CDATA[$this->url->link2('product/manufacturer]]></add>
</operation>
<operation>
<search position="replace"><![CDATA[$this->url->link('product/category]]></search>
<add><![CDATA[$this->url->link2('product/category]]></add>
</operation>
<operation>
<search position="replace"><![CDATA[$this->url->link('product/product]]></search>
<add><![CDATA[$this->url->link2('product/product]]></add>
</operation>
<operation>
<search position="replace"><![CDATA[$this->url->link('product/special]]></search>
<add><![CDATA[$this->url->link2('product/special]]></add>
</operation>
</file>
<file path="catalog/controller/product/*">
<operation>
<search position="replace"><![CDATA[$this->url->link('product/category]]></search>
<add><![CDATA[$this->url->link2('product/category]]></add>
</operation>
<operation>
<search position="replace"><![CDATA[$this->url->link('product/manufacturer]]></search>
<add><![CDATA[$this->url->link2('product/manufacturer]]></add>
</operation>
<operation>
<search position="replace"><![CDATA[$this->url->link('product/product]]></search>
<add><![CDATA[$this->url->link2('product/product]]></add>
</operation>
</file>
</modification>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment