Quote:
Originally Posted by tony_sologubov
Hello @ ant99,
1) Here is an external script that can generate SEO-friendly urls for your products and categories:
PHP Code:
<?php
include_once('top.inc.php');
foreach(\XLite\Core\Database::getRepo('\XLite\Model\Category')->findAll() as $category) {
$category->setCleanURL(\XLite\Core\Database::getRepo('\XLite\Model\Category')->generateCleanURL());
\XLite\Core\Database::getEM()->flush();
}
foreach(\XLite\Core\Database::getRepo('\XLite\Model\Product')->findAll() as $product) {
$product->setCleanURL(\XLite\Core\Database::getRepo('\XLite\Model\Product')
->generateCleanURL());
\XLite\Core\Database::getEM()->flush();
}
Of course, make a backup of your DB before running it.
2) There is no way of importing SEO-friendly urls, but you can put the history of them directly to the xc_clean_urls table. The value with highest ID is used as actual SEO-friendly url. The record with the same product_id, but lesser ID will be assumed as a history url.
Hopefully, it will help.
Tony
|
Hi tony, the support xcart migrated my store to xcart hosting server
and upgrade from 5.1.11 to 5.2.3 versiСn
after the update the clean urls doesnt Works properly the xcart support help me to solve this but not all the categories and products Works fine, so my programmer updated the products in the database again like he did in the 5.1.11 versiСn
but the clean url doesn╢t Works
If I go to the admin store I can see the clean url, but don╢t works
so, I changed manualy this clean url and then Works fine, then I export the products to see the difference and I notice in the export file
the product that i modified has .html at the end of the clean urlt
the others not, what do you think could be the problem ? and how can I solve this
every time the programmer update the products the clean url is changed and not Works, is the same url just without .HTML at the end