How can I create custom SEO-friendly URLs in OpenCart?

It turns out this can be done with a relatively simple change to a single file. No .htaccess rewrite rules, simply patch the catalog/controller/common/seo_url.php file and add your pretty URLs to an existing database table. The patch to seo_url.php: Index: catalog/controller/common/seo_url.php =================================================================== — catalog/controller/common/seo_url.php (old) +++ catalog/controller/common/seo_url.php (new) @@ -48,7 +42,12 @@ $this->request->get[‘route’] = ‘product/manufacturer/product’; … Read more

How can I create custom SEO-friendly URLs in OpenCart?

It turns out this can be done with a relatively simple change to a single file. No .htaccess rewrite rules, simply patch the catalog/controller/common/seo_url.php file and add your pretty URLs to an existing database table. The patch to seo_url.php: Index: catalog/controller/common/seo_url.php =================================================================== — catalog/controller/common/seo_url.php (old) +++ catalog/controller/common/seo_url.php (new) @@ -48,7 +42,12 @@ $this->request->get[‘route’] = ‘product/manufacturer/product’; … Read more

How to create a custom admin page in opencart?

OpenCart 2.x The path names have changed in OpenCart 2 – you will want to create admin/controller/extension/module/hello.php admin/language/en-gb/extension/module/hello.php admin/view/template/extension/module/hello.tpl Then the route becomes admin/index.php?route=extension/module/hello OpenCart 1.x Include full MVC flow. I found out how to do this. OpenCart uses the MVC pattern. I recommend reading about How to be an OpenCart Guru? post about learning … Read more

Remove index.php?route=common/home from OpenCart

To simply remove that, you can do a basic replace in /catalog/controller/common/seo_url.php Find: return $link; Before it on a new line put: $link = str_replace(‘index.php?route=common/home’, ”, $link); Edit by TheBlackBenzKid: If you want full SEO just use this line instead of the above: $link = str_replace(‘index.php?route=”, “‘, $link); Also make sure SEO URLs is turned … Read more

How to become an OpenCart guru? [closed]

OpenCart 1.5.X developer quick start guide for beginners This guide is written for developers already familiar with PHP, OOP and the MVC architecture In the following, you’ll see examples for the catalog side of the cart. The admin side is identical in function with the exception of the views which is noted in the relevant … Read more

Open Cart – Passing Custom Variable

In Your controller it is not $amped = $this->full_uri( $token, $action, $endpoint ); but $this->data[‘amped’] = $this->full_uri($token, $action, $endpoint); The variable $this->data (which is of type array) is used as variables holder that is then used to assign values into it’s respective variables in the template.