Hi All,
I'm working on my first Opencart project and I'm trying to make the urls with ?route= a bit nicer such as /index.php?route=checkout/cart becoming just /cart
I've added some rows to the url_alias table and if I go directly to /cart it works but I'm trying to work out how to generate the links to be consistent E.g. the links in the top nav
I've found answers on how to do this for older versions of Opencart but not for 2.x
I've looked in catalog/controller/common/seo_url.php as that's where people modified the older version to accomplish this but I don't understand why it's looking for $this->request->get['_route_'] when the url variable is just route without the underscores
Any help would be appreciated
Open your htaccess and you will find out the why of _route_
Code: Select all
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
Opencart Developer - My Extension Showcase
Contact me at aeon.yoda@gmail.com
Who is online
Users browsing this forum: No registered users and 13 guests