A
A
Alexey Suprun2019-04-07 01:28:35
opencart
Alexey Suprun, 2019-04-07 01:28:35

How to properly set custom prefix in url OpenCart 3 (SeoPro plugin)?

CMS ocStore 3.0.2.0.
It's not the first day I've been trying to solve the problem with adding product categories of the format -
domain.com/ category /item and domain.com/ category/subcategory /item
- an arbitrary prefix, say "katalog".
To get the following:
domain.com/ katalog / category / and domain.com/ katalog / category/subcategory /item
Previously, on version ocStore 2.3, this issue was resolved elementarily:

catalog/controller/startup/seo_pro.php

case 'path':  // Найдите этот блок и пропишите как тут
  $categories = explode('_', $value);
  $queries[] = 'category_suffix';
  $queries[] = 'category_id=' . end($categories);
  unset($data[$key]);
  break;

В менеджере SEO_URL добавьте  category_suffix = katalog

For ocStore 3, I did not find a solution. If I use the code above, I get "katalog" added before the categories, but the pages themselves become unavailable (404 error). The file is being edited at /system/library/seopro.php
I have already rummaged through tons of information on the second version, but I could not find any hints or clues for my case on the Internet =(
Please direct my searches in the right direction)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question