S
S
Sergey Bard2018-03-30 16:21:20
opencart
Sergey Bard, 2018-03-30 16:21:20

How to add any word to url?

Hello everyone, I just can’t find a solution, I’m forming the CNC through seopro, opencart 2.3, now the url of the product is of this kind /category1/category2/name_product, I need the url to be of this plan /product/name_product - where product is an arbitrary word, disabled it through the admin panel item "CNC products with categories" and in the seopro.php file did like this

foreach($queries as $query) {
    if(preg_match("#product_id\=\d*?#", $query)){
         $seo_url .= '/product/' . rawurlencode($aliases[$query]);
    } else {
         $seo_url .= '/' . rawurlencode($aliases[$query]);
    }
}

now the link forms as needed i.e. /product/name_product but it says that this page does not exist, please tell me what I did wrong or what needs to be done.
Ps Please do not ask why you need this, etc. since in other topics I saw similar questions to the question and in the end they didn’t give any answer, I need to do this because the SEO specialist said so!, thanks)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
web-mechanic, 2018-03-30
@serg_small_developer

You better do the generation of seo url by the name of the product, otherwise you will ruin all seo with your "arbitrary words"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question