Post by xinxilas » Mon Dec 31, 2018 12:19 am

Hello friends

Is there any reason Opencart only uses absolute links on html files?
(images and links too)
I was thinking about change all my links to relative

i.e.
htt ps://www .test.com.br/index.php?route=product/category&path=2_531
to
/index.php?route=product/category&path=2_531

if I (managed to) change this, will I have some compatibility problem?

Any tip how to do that?

New member

Posts

Joined
Mon Apr 27, 2015 7:46 am

Post by ocmta » Tue Jan 01, 2019 7:45 pm

You need to modify system/library/url.php . Changing this

Code: Select all

if ($this->ssl && $secure) {
	$url = $this->ssl . 'index.php?route=' . $route;
} else {
	$url = $this->url . 'index.php?route=' . $route;
}
to this

Code: Select all

if ($this->ssl && $secure) {
	$url = '/index.php?route=' . $route;
} else {
	$url = '/index.php?route=' . $route;
}
would be a start. Not sure what you mean by "compatibility problem".

Extensions for affiliates (openCart 1, 2, 3):
Advanced Multi Level Affiliate System
Customer and Affiliate Accounts Combined into one Account
Affiliate Tracking with Coupons
Discount for Referred Customers - Order Total
Type Tracking Code
Mass Pay
Affiliate Transactions for openCart 3
Affiliate Pack X - all modules with 40% discount


Active Member

Posts

Joined
Mon Mar 12, 2012 11:21 am

Who is online

Users browsing this forum: Gobbo, TMD Extension @ and 41 guests