Post by promignavi » Thu May 27, 2010 12:58 pm

Please explain if you have any idea...

Previous version of opencart i.e. 1.4.0 have a class called 'Url' under system/engine to convert http and https urls like below:

Code: Select all

$this->data['home'] = $this->url->http('common/home');
$this->data['special'] = $this->url->http('product/special');
OR
'href'  => $this->model_tool_seo_url->rewrite($this->url->http('product/category&path=' . $menu['category_id']))
But in version 1.4.6 or 1.4.7, it has been removed and had coded like below:

Code: Select all

$this->data['home'] = HTTP_SERVER . 'index.php?route=common/home';
$this->data['special'] = HTTP_SERVER . 'index.php?route=product/special';
$this->data['redirect'] = $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=' . $route . $url);
Anyone help me to know, any big reason to make the above hard coded?? Think if someone wants to change the default page from 'index.php' to 'index1.php' or URL rewriting (by code).....how much it would be difficult to make changes everywhere?

Thanks....

.....
Last edited by i2Paq on Thu May 27, 2010 1:13 pm, edited 1 time in total.
Reason: Made it more readable.

Newbie

Posts

Joined
Tue Apr 20, 2010 3:10 pm

Post by NoExtraTime » Thu May 27, 2010 2:47 pm

I suggest you search this forum for "URL class". You will find alot of info..

Currently developing an awesome eBay integration extension for Open Cart
Demo is Live!
You can checkout screenshots and other development status on my website


New member

Posts

Joined
Wed Mar 03, 2010 5:17 pm

Post by Daniel » Thu May 27, 2010 5:30 pm

The old way the urls work is worng from a OOP perspective. The url class should be completly different from what it is.

Also it works better with multi-shop.

you can do $shop_info['store_url'] . 'index.php?route=common/home';



just openc up all the files you have changed and use a mass search and replace.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm
Who is online

Users browsing this forum: No registered users and 73 guests