1

I want to change the url on osclass and replace the , with - now url is like : 127.0.0.1/en/search/region,9354963/category,books-magazines and I want to convert url to 127.0.0.1/en/search/region-9354963/category-books-magazines

I did try to change the init() in classes/Rewrite.php and add the code :

$modified_params = array();
for ($p = 1; $p < count($route_match); $p++) {
    $param_value = str_replace(',', '-', $route_match[$p]);
    $modified_params[] = $param_value;
}

// Set the modified parameters to Params
for ($p = 0; $p < count($modified_params); $p++) {
    if (isset($args[1][$p])) {
        Params::setParam($args[1][$p], $modified_params[$p]);
    } else {
        Params::setParam('route_param_' . ($p + 1), $modified_params[$p]);
    }
}

but still no luck

Professor Abronsius
  • 33,063
  • 5
  • 32
  • 46
Bynd
  • 675
  • 1
  • 15
  • 40

0 Answers0