fix soucis categories urls postcms
This commit is contained in:
parent
6860adc7c1
commit
e9df08b863
@ -122,10 +122,12 @@ class SeoUrl extends Module {
|
||||
$urls = array();
|
||||
|
||||
$url_category = ManageSeoUrl::getByType($params['object']->id_category, ManageSeoUrl::TYPE_CATEGORY_CMS, FALSE, NULL, $id_shop);
|
||||
if (Validate::isLoadedObject($url_category)) {
|
||||
foreach (Language::getLanguages() as $language) {
|
||||
$id_lang = (int)$language['id_lang'];
|
||||
$urls[$id_lang] = $url_category->link_rewrite[$id_lang].$params['object']->id.'-'.$params['object']->slug[$id_lang].'.php';
|
||||
}
|
||||
}
|
||||
|
||||
if (!$seo_url instanceOf ManageSeoUrl) {
|
||||
ManageSeoUrl::createUrl(ManageSeoUrl::TYPE_POST_CMS, $params['object']->id, $urls);
|
||||
|
Loading…
x
Reference in New Issue
Block a user