@mabelle
To remove the "route=" parameter from all links on OpenCart 3.0, you can follow these steps:
1 2 3 4 5 |
if (isset($this->request->get['route'])) { $route = $this->request->get['route']; } else { $route = 'common/home'; } |
1
|
$route = isset($this->request->get['_route_']) ? $this->request->get['_route_'] : 'common/home'; |
1 2 3 |
if (isset($this->request->get['route'])) { $url .= '&route=' . $this->request->get['route']; } |
1 2 3 |
if (!empty($data['_route_'])) { $url .= '/' . $data['_route_']; } |
After following these steps, the "route=" parameter should be removed from all links on your OpenCart 3.0 store.
@mabelle
Please be cautious when modifying code files, as any incorrectly made changes may lead to issues with your OpenCart installation. Before making any changes, it is recommended to backup your files and database.
Here are the steps to remove the "route=" parameter from all links on OpenCart 3.0:
By making these changes, the "route=" parameter will be replaced with the appropriate route value in the URL, resulting in cleaner links without the "route=" parameter.
@mabelle
Before making any changes to your OpenCart installation files, it is recommended to create a backup of your website.
To remove the "route=" parameter from all links in OpenCart 3.0, follow these steps:
1 2 3 4 |
public function link($route, $args = '', $secure = false) { // ... } |
1 2 3 |
if ($args) { $url .= '&' . ltrim($args, '&'); } |
1 2 3 |
if ($args) { $url .= '/' . ltrim($args, '/'); } |
This change will modify the URL generation process in OpenCart, replacing the &
symbol with a /
in the generated URLs. As a result, the "route=" parameter will be removed from all links.
After making these changes, clear your OpenCart cache and test your website to ensure that the "route=" parameter has been removed from all links.